ent

package
v0.0.0-...-3befcbb Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: GPL-3.0 Imports: 45 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.
	TypeAmount              = "Amount"
	TypeBodyPart            = "BodyPart"
	TypeDope                = "Dope"
	TypeEvent               = "Event"
	TypeGameHustler         = "GameHustler"
	TypeGameHustlerItem     = "GameHustlerItem"
	TypeGameHustlerQuest    = "GameHustlerQuest"
	TypeGameHustlerRelation = "GameHustlerRelation"
	TypeHustler             = "Hustler"
	TypeItem                = "Item"
	TypeListing             = "Listing"
	TypeSearch              = "Search"
	TypeSyncState           = "SyncState"
	TypeWallet              = "Wallet"
	TypeWalletItems         = "WalletItems"
)

Variables

View Source
var (
	// DopeOrderFieldRank orders Dope by rank.
	DopeOrderFieldRank = &DopeOrderField{
		field: dope.FieldRank,
		toCursor: func(d *Dope) Cursor {
			return Cursor{
				ID:    d.ID,
				Value: d.Rank,
			}
		},
	}
	// DopeOrderFieldOrder orders Dope by order.
	DopeOrderFieldOrder = &DopeOrderField{
		field: dope.FieldOrder,
		toCursor: func(d *Dope) Cursor {
			return Cursor{
				ID:    d.ID,
				Value: d.Order,
			}
		},
	}
)
View Source
var (
	// SearchOrderFieldGreatness orders Search by greatness.
	SearchOrderFieldGreatness = &SearchOrderField{
		field: search.FieldGreatness,
		toCursor: func(s *Search) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.Greatness,
			}
		},
	}
	// SearchOrderFieldSalePrice orders Search by sale_price.
	SearchOrderFieldSalePrice = &SearchOrderField{
		field: search.FieldSalePrice,
		toCursor: func(s *Search) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.SalePrice,
			}
		},
	}
	// SearchOrderFieldLastSalePrice orders Search by last_sale_price.
	SearchOrderFieldLastSalePrice = &SearchOrderField{
		field: search.FieldLastSalePrice,
		toCursor: func(s *Search) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.LastSalePrice,
			}
		},
	}
)
View Source
var DefaultAmountOrder = &AmountOrder{
	Direction: OrderDirectionAsc,
	Field: &AmountOrderField{
		field: amount.FieldID,
		toCursor: func(a *Amount) Cursor {
			return Cursor{ID: a.ID}
		},
	},
}

DefaultAmountOrder is the default ordering of Amount.

View Source
var DefaultBodyPartOrder = &BodyPartOrder{
	Direction: OrderDirectionAsc,
	Field: &BodyPartOrderField{
		field: bodypart.FieldID,
		toCursor: func(bp *BodyPart) Cursor {
			return Cursor{ID: bp.ID}
		},
	},
}

DefaultBodyPartOrder is the default ordering of BodyPart.

View Source
var DefaultDopeOrder = &DopeOrder{
	Direction: OrderDirectionAsc,
	Field: &DopeOrderField{
		field: dope.FieldID,
		toCursor: func(d *Dope) Cursor {
			return Cursor{ID: d.ID}
		},
	},
}

DefaultDopeOrder is the default ordering of Dope.

View Source
var DefaultEventOrder = &EventOrder{
	Direction: OrderDirectionAsc,
	Field: &EventOrderField{
		field: event.FieldID,
		toCursor: func(e *Event) Cursor {
			return Cursor{ID: e.ID}
		},
	},
}

DefaultEventOrder is the default ordering of Event.

View Source
var DefaultGameHustlerItemOrder = &GameHustlerItemOrder{
	Direction: OrderDirectionAsc,
	Field: &GameHustlerItemOrderField{
		field: gamehustleritem.FieldID,
		toCursor: func(ghi *GameHustlerItem) Cursor {
			return Cursor{ID: ghi.ID}
		},
	},
}

DefaultGameHustlerItemOrder is the default ordering of GameHustlerItem.

View Source
var DefaultGameHustlerOrder = &GameHustlerOrder{
	Direction: OrderDirectionAsc,
	Field: &GameHustlerOrderField{
		field: gamehustler.FieldID,
		toCursor: func(gh *GameHustler) Cursor {
			return Cursor{ID: gh.ID}
		},
	},
}

DefaultGameHustlerOrder is the default ordering of GameHustler.

View Source
var DefaultGameHustlerQuestOrder = &GameHustlerQuestOrder{
	Direction: OrderDirectionAsc,
	Field: &GameHustlerQuestOrderField{
		field: gamehustlerquest.FieldID,
		toCursor: func(ghq *GameHustlerQuest) Cursor {
			return Cursor{ID: ghq.ID}
		},
	},
}

DefaultGameHustlerQuestOrder is the default ordering of GameHustlerQuest.

View Source
var DefaultGameHustlerRelationOrder = &GameHustlerRelationOrder{
	Direction: OrderDirectionAsc,
	Field: &GameHustlerRelationOrderField{
		field: gamehustlerrelation.FieldID,
		toCursor: func(ghr *GameHustlerRelation) Cursor {
			return Cursor{ID: ghr.ID}
		},
	},
}

DefaultGameHustlerRelationOrder is the default ordering of GameHustlerRelation.

View Source
var DefaultHustlerOrder = &HustlerOrder{
	Direction: OrderDirectionAsc,
	Field: &HustlerOrderField{
		field: hustler.FieldID,
		toCursor: func(h *Hustler) Cursor {
			return Cursor{ID: h.ID}
		},
	},
}

DefaultHustlerOrder is the default ordering of Hustler.

View Source
var DefaultItemOrder = &ItemOrder{
	Direction: OrderDirectionAsc,
	Field: &ItemOrderField{
		field: item.FieldID,
		toCursor: func(i *Item) Cursor {
			return Cursor{ID: i.ID}
		},
	},
}

DefaultItemOrder is the default ordering of Item.

View Source
var DefaultListingOrder = &ListingOrder{
	Direction: OrderDirectionAsc,
	Field: &ListingOrderField{
		field: listing.FieldID,
		toCursor: func(l *Listing) Cursor {
			return Cursor{ID: l.ID}
		},
	},
}

DefaultListingOrder is the default ordering of Listing.

View Source
var DefaultSearchOrder = &SearchOrder{
	Direction: OrderDirectionAsc,
	Field: &SearchOrderField{
		field: search.FieldID,
		toCursor: func(s *Search) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultSearchOrder is the default ordering of Search.

View Source
var DefaultSyncStateOrder = &SyncStateOrder{
	Direction: OrderDirectionAsc,
	Field: &SyncStateOrderField{
		field: syncstate.FieldID,
		toCursor: func(ss *SyncState) Cursor {
			return Cursor{ID: ss.ID}
		},
	},
}

DefaultSyncStateOrder is the default ordering of SyncState.

View Source
var DefaultWalletItemsOrder = &WalletItemsOrder{
	Direction: OrderDirectionAsc,
	Field: &WalletItemsOrderField{
		field: walletitems.FieldID,
		toCursor: func(wi *WalletItems) Cursor {
			return Cursor{ID: wi.ID}
		},
	},
}

DefaultWalletItemsOrder is the default ordering of WalletItems.

View Source
var DefaultWalletOrder = &WalletOrder{
	Direction: OrderDirectionAsc,
	Field: &WalletOrderField{
		field: wallet.FieldID,
		toCursor: func(w *Wallet) Cursor {
			return Cursor{ID: w.ID}
		},
	},
}

DefaultWalletOrder is the default ordering of Wallet.

View Source
var (
	// GameHustlerOrderFieldCreatedAt orders GameHustler by created_at.
	GameHustlerOrderFieldCreatedAt = &GameHustlerOrderField{
		field: gamehustler.FieldCreatedAt,
		toCursor: func(gh *GameHustler) Cursor {
			return Cursor{
				ID:    gh.ID,
				Value: gh.CreatedAt,
			}
		},
	}
)
View Source
var (
	// HustlerOrderFieldCreatedAt orders Hustler by created_at.
	HustlerOrderFieldCreatedAt = &HustlerOrderField{
		field: hustler.FieldCreatedAt,
		toCursor: func(h *Hustler) Cursor {
			return Cursor{
				ID:    h.ID,
				Value: h.CreatedAt,
			}
		},
	}
)
View Source
var (
	// ItemOrderFieldGreatness orders Item by greatness.
	ItemOrderFieldGreatness = &ItemOrderField{
		field: item.FieldGreatness,
		toCursor: func(i *Item) Cursor {
			return Cursor{
				ID:    i.ID,
				Value: i.Greatness,
			}
		},
	}
)
View Source
var (
	// WalletOrderFieldCreatedAt orders Wallet by created_at.
	WalletOrderFieldCreatedAt = &WalletOrderField{
		field: wallet.FieldCreatedAt,
		toCursor: func(w *Wallet) Cursor {
			return Cursor{
				ID:    w.ID,
				Value: w.CreatedAt,
			}
		},
	}
)

Functions

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNoRowsInResultSetError

func IsNoRowsInResultSetError(e error) bool

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.

func WithTx

func WithTx(ctx context.Context, client *Client, fn func(tx *Tx) error) error

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 Amount

type Amount struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type amount.Type `json:"type,omitempty"`
	// Amount holds the value of the "amount" field.
	Amount schema.BigInt `json:"amount,omitempty"`
	// AssetID holds the value of the "asset_id" field.
	AssetID schema.BigInt `json:"asset_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AmountQuery when eager-loading is set.
	Edges AmountEdges `json:"edges"`
	// contains filtered or unexported fields
}

Amount is the model entity for the Amount schema.

func (*Amount) ListingInput

func (a *Amount) ListingInput(ctx context.Context) (*Listing, error)

func (*Amount) ListingOutput

func (a *Amount) ListingOutput(ctx context.Context) (*Listing, error)

func (*Amount) Node

func (a *Amount) Node(ctx context.Context) (node *Node, err error)

func (*Amount) QueryListingInput

func (a *Amount) QueryListingInput() *ListingQuery

QueryListingInput queries the "listing_input" edge of the Amount entity.

func (*Amount) QueryListingOutput

func (a *Amount) QueryListingOutput() *ListingQuery

QueryListingOutput queries the "listing_output" edge of the Amount entity.

func (*Amount) String

func (a *Amount) String() string

String implements the fmt.Stringer.

func (*Amount) ToEdge

func (a *Amount) ToEdge(order *AmountOrder) *AmountEdge

ToEdge converts Amount into AmountEdge.

func (*Amount) Unwrap

func (a *Amount) Unwrap() *Amount

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

func (a *Amount) Update() *AmountUpdateOne

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

type AmountClient

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

AmountClient is a client for the Amount schema.

func NewAmountClient

func NewAmountClient(c config) *AmountClient

NewAmountClient returns a client for the Amount from the given config.

func (*AmountClient) Create

func (c *AmountClient) Create() *AmountCreate

Create returns a create builder for Amount.

func (*AmountClient) CreateBulk

func (c *AmountClient) CreateBulk(builders ...*AmountCreate) *AmountCreateBulk

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

func (*AmountClient) Delete

func (c *AmountClient) Delete() *AmountDelete

Delete returns a delete builder for Amount.

func (*AmountClient) DeleteOne

func (c *AmountClient) DeleteOne(a *Amount) *AmountDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*AmountClient) DeleteOneID

func (c *AmountClient) DeleteOneID(id string) *AmountDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*AmountClient) Get

func (c *AmountClient) Get(ctx context.Context, id string) (*Amount, error)

Get returns a Amount entity by its id.

func (*AmountClient) GetX

func (c *AmountClient) GetX(ctx context.Context, id string) *Amount

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

func (*AmountClient) Hooks

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

Hooks returns the client hooks.

func (*AmountClient) Query

func (c *AmountClient) Query() *AmountQuery

Query returns a query builder for Amount.

func (*AmountClient) QueryListingInput

func (c *AmountClient) QueryListingInput(a *Amount) *ListingQuery

QueryListingInput queries the listing_input edge of a Amount.

func (*AmountClient) QueryListingOutput

func (c *AmountClient) QueryListingOutput(a *Amount) *ListingQuery

QueryListingOutput queries the listing_output edge of a Amount.

func (*AmountClient) Update

func (c *AmountClient) Update() *AmountUpdate

Update returns an update builder for Amount.

func (*AmountClient) UpdateOne

func (c *AmountClient) UpdateOne(a *Amount) *AmountUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AmountClient) UpdateOneID

func (c *AmountClient) UpdateOneID(id string) *AmountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AmountClient) Use

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

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

type AmountConnection

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

AmountConnection is the connection containing edges to Amount.

type AmountCreate

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

AmountCreate is the builder for creating a Amount entity.

func (*AmountCreate) Exec

func (ac *AmountCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AmountCreate) ExecX

func (ac *AmountCreate) ExecX(ctx context.Context)

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

func (*AmountCreate) Mutation

func (ac *AmountCreate) Mutation() *AmountMutation

Mutation returns the AmountMutation object of the builder.

func (*AmountCreate) OnConflict

func (ac *AmountCreate) OnConflict(opts ...sql.ConflictOption) *AmountUpsertOne

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

client.Amount.Create().
	SetType(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.AmountUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*AmountCreate) OnConflictColumns

func (ac *AmountCreate) OnConflictColumns(columns ...string) *AmountUpsertOne

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

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

func (*AmountCreate) Save

func (ac *AmountCreate) Save(ctx context.Context) (*Amount, error)

Save creates the Amount in the database.

func (*AmountCreate) SaveX

func (ac *AmountCreate) SaveX(ctx context.Context) *Amount

SaveX calls Save and panics if Save returns an error.

func (*AmountCreate) SetAmount

func (ac *AmountCreate) SetAmount(si schema.BigInt) *AmountCreate

SetAmount sets the "amount" field.

func (*AmountCreate) SetAssetID

func (ac *AmountCreate) SetAssetID(si schema.BigInt) *AmountCreate

SetAssetID sets the "asset_id" field.

func (*AmountCreate) SetID

func (ac *AmountCreate) SetID(s string) *AmountCreate

SetID sets the "id" field.

func (*AmountCreate) SetListingInput

func (ac *AmountCreate) SetListingInput(l *Listing) *AmountCreate

SetListingInput sets the "listing_input" edge to the Listing entity.

func (*AmountCreate) SetListingInputID

func (ac *AmountCreate) SetListingInputID(id string) *AmountCreate

SetListingInputID sets the "listing_input" edge to the Listing entity by ID.

func (*AmountCreate) SetListingOutput

func (ac *AmountCreate) SetListingOutput(l *Listing) *AmountCreate

SetListingOutput sets the "listing_output" edge to the Listing entity.

func (*AmountCreate) SetListingOutputID

func (ac *AmountCreate) SetListingOutputID(id string) *AmountCreate

SetListingOutputID sets the "listing_output" edge to the Listing entity by ID.

func (*AmountCreate) SetNillableAmount

func (ac *AmountCreate) SetNillableAmount(si *schema.BigInt) *AmountCreate

SetNillableAmount sets the "amount" field if the given value is not nil.

func (*AmountCreate) SetNillableAssetID

func (ac *AmountCreate) SetNillableAssetID(si *schema.BigInt) *AmountCreate

SetNillableAssetID sets the "asset_id" field if the given value is not nil.

func (*AmountCreate) SetNillableListingInputID

func (ac *AmountCreate) SetNillableListingInputID(id *string) *AmountCreate

SetNillableListingInputID sets the "listing_input" edge to the Listing entity by ID if the given value is not nil.

func (*AmountCreate) SetNillableListingOutputID

func (ac *AmountCreate) SetNillableListingOutputID(id *string) *AmountCreate

SetNillableListingOutputID sets the "listing_output" edge to the Listing entity by ID if the given value is not nil.

func (*AmountCreate) SetType

func (ac *AmountCreate) SetType(a amount.Type) *AmountCreate

SetType sets the "type" field.

type AmountCreateBulk

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

AmountCreateBulk is the builder for creating many Amount entities in bulk.

func (*AmountCreateBulk) Exec

func (acb *AmountCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AmountCreateBulk) ExecX

func (acb *AmountCreateBulk) ExecX(ctx context.Context)

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

func (*AmountCreateBulk) OnConflict

func (acb *AmountCreateBulk) OnConflict(opts ...sql.ConflictOption) *AmountUpsertBulk

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

client.Amount.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.AmountUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*AmountCreateBulk) OnConflictColumns

func (acb *AmountCreateBulk) OnConflictColumns(columns ...string) *AmountUpsertBulk

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

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

func (*AmountCreateBulk) Save

func (acb *AmountCreateBulk) Save(ctx context.Context) ([]*Amount, error)

Save creates the Amount entities in the database.

func (*AmountCreateBulk) SaveX

func (acb *AmountCreateBulk) SaveX(ctx context.Context) []*Amount

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

type AmountDelete

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

AmountDelete is the builder for deleting a Amount entity.

func (*AmountDelete) Exec

func (ad *AmountDelete) Exec(ctx context.Context) (int, error)

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

func (*AmountDelete) ExecX

func (ad *AmountDelete) ExecX(ctx context.Context) int

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

func (*AmountDelete) Where

func (ad *AmountDelete) Where(ps ...predicate.Amount) *AmountDelete

Where appends a list predicates to the AmountDelete builder.

type AmountDeleteOne

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

AmountDeleteOne is the builder for deleting a single Amount entity.

func (*AmountDeleteOne) Exec

func (ado *AmountDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AmountDeleteOne) ExecX

func (ado *AmountDeleteOne) ExecX(ctx context.Context)

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

type AmountEdge

type AmountEdge struct {
	Node   *Amount `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

AmountEdge is the edge representation of Amount.

type AmountEdges

type AmountEdges struct {
	// ListingInput holds the value of the listing_input edge.
	ListingInput *Listing `json:"listing_input,omitempty"`
	// ListingOutput holds the value of the listing_output edge.
	ListingOutput *Listing `json:"listing_output,omitempty"`
	// contains filtered or unexported fields
}

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

func (AmountEdges) ListingInputOrErr

func (e AmountEdges) ListingInputOrErr() (*Listing, error)

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

func (AmountEdges) ListingOutputOrErr

func (e AmountEdges) ListingOutputOrErr() (*Listing, error)

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

type AmountGroupBy

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

AmountGroupBy is the group-by builder for Amount entities.

func (*AmountGroupBy) Aggregate

func (agb *AmountGroupBy) Aggregate(fns ...AggregateFunc) *AmountGroupBy

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

func (*AmountGroupBy) Bool

func (agb *AmountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*AmountGroupBy) BoolX

func (agb *AmountGroupBy) BoolX(ctx context.Context) bool

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

func (*AmountGroupBy) Bools

func (agb *AmountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*AmountGroupBy) BoolsX

func (agb *AmountGroupBy) BoolsX(ctx context.Context) []bool

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

func (*AmountGroupBy) Float64

func (agb *AmountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*AmountGroupBy) Float64X

func (agb *AmountGroupBy) Float64X(ctx context.Context) float64

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

func (*AmountGroupBy) Float64s

func (agb *AmountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*AmountGroupBy) Float64sX

func (agb *AmountGroupBy) Float64sX(ctx context.Context) []float64

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

func (*AmountGroupBy) Int

func (agb *AmountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*AmountGroupBy) IntX

func (agb *AmountGroupBy) IntX(ctx context.Context) int

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

func (*AmountGroupBy) Ints

func (agb *AmountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*AmountGroupBy) IntsX

func (agb *AmountGroupBy) IntsX(ctx context.Context) []int

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

func (*AmountGroupBy) Scan

func (agb *AmountGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*AmountGroupBy) ScanX

func (agb *AmountGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*AmountGroupBy) String

func (agb *AmountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*AmountGroupBy) StringX

func (agb *AmountGroupBy) StringX(ctx context.Context) string

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

func (*AmountGroupBy) Strings

func (agb *AmountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*AmountGroupBy) StringsX

func (agb *AmountGroupBy) StringsX(ctx context.Context) []string

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

type AmountMutation

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

AmountMutation represents an operation that mutates the Amount nodes in the graph.

func (*AmountMutation) AddAmount

func (m *AmountMutation) AddAmount(si schema.BigInt)

AddAmount adds si to the "amount" field.

func (*AmountMutation) AddAssetID

func (m *AmountMutation) AddAssetID(si schema.BigInt)

AddAssetID adds si to the "asset_id" field.

func (*AmountMutation) AddField

func (m *AmountMutation) 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 (*AmountMutation) AddedAmount

func (m *AmountMutation) AddedAmount() (r schema.BigInt, exists bool)

AddedAmount returns the value that was added to the "amount" field in this mutation.

func (*AmountMutation) AddedAssetID

func (m *AmountMutation) AddedAssetID() (r schema.BigInt, exists bool)

AddedAssetID returns the value that was added to the "asset_id" field in this mutation.

func (*AmountMutation) AddedEdges

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

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

func (*AmountMutation) AddedField

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

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

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

func (*AmountMutation) AddedIDs

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

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

func (*AmountMutation) Amount

func (m *AmountMutation) Amount() (r schema.BigInt, exists bool)

Amount returns the value of the "amount" field in the mutation.

func (*AmountMutation) AssetID

func (m *AmountMutation) AssetID() (r schema.BigInt, exists bool)

AssetID returns the value of the "asset_id" field in the mutation.

func (*AmountMutation) ClearEdge

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

func (m *AmountMutation) 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 (*AmountMutation) ClearListingInput

func (m *AmountMutation) ClearListingInput()

ClearListingInput clears the "listing_input" edge to the Listing entity.

func (*AmountMutation) ClearListingOutput

func (m *AmountMutation) ClearListingOutput()

ClearListingOutput clears the "listing_output" edge to the Listing entity.

func (*AmountMutation) ClearedEdges

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

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

func (*AmountMutation) ClearedFields

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

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

func (AmountMutation) Client

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

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

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

func (*AmountMutation) Field

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

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

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

func (*AmountMutation) Fields

func (m *AmountMutation) 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 (*AmountMutation) GetType

func (m *AmountMutation) GetType() (r amount.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*AmountMutation) ID

func (m *AmountMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AmountMutation) IDs

func (m *AmountMutation) IDs(ctx context.Context) ([]string, error)

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

func (*AmountMutation) ListingInputCleared

func (m *AmountMutation) ListingInputCleared() bool

ListingInputCleared reports if the "listing_input" edge to the Listing entity was cleared.

func (*AmountMutation) ListingInputID

func (m *AmountMutation) ListingInputID() (id string, exists bool)

ListingInputID returns the "listing_input" edge ID in the mutation.

func (*AmountMutation) ListingInputIDs

func (m *AmountMutation) ListingInputIDs() (ids []string)

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

func (*AmountMutation) ListingOutputCleared

func (m *AmountMutation) ListingOutputCleared() bool

ListingOutputCleared reports if the "listing_output" edge to the Listing entity was cleared.

func (*AmountMutation) ListingOutputID

func (m *AmountMutation) ListingOutputID() (id string, exists bool)

ListingOutputID returns the "listing_output" edge ID in the mutation.

func (*AmountMutation) ListingOutputIDs

func (m *AmountMutation) ListingOutputIDs() (ids []string)

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

func (*AmountMutation) OldAmount

func (m *AmountMutation) OldAmount(ctx context.Context) (v schema.BigInt, err error)

OldAmount returns the old "amount" field's value of the Amount entity. If the Amount 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 (*AmountMutation) OldAssetID

func (m *AmountMutation) OldAssetID(ctx context.Context) (v schema.BigInt, err error)

OldAssetID returns the old "asset_id" field's value of the Amount entity. If the Amount 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 (*AmountMutation) OldField

func (m *AmountMutation) 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 (*AmountMutation) OldType

func (m *AmountMutation) OldType(ctx context.Context) (v amount.Type, err error)

OldType returns the old "type" field's value of the Amount entity. If the Amount 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 (*AmountMutation) Op

func (m *AmountMutation) Op() Op

Op returns the operation name.

func (*AmountMutation) RemovedEdges

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

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

func (*AmountMutation) RemovedIDs

func (m *AmountMutation) 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 (*AmountMutation) ResetAmount

func (m *AmountMutation) ResetAmount()

ResetAmount resets all changes to the "amount" field.

func (*AmountMutation) ResetAssetID

func (m *AmountMutation) ResetAssetID()

ResetAssetID resets all changes to the "asset_id" field.

func (*AmountMutation) ResetEdge

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

func (m *AmountMutation) 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 (*AmountMutation) ResetListingInput

func (m *AmountMutation) ResetListingInput()

ResetListingInput resets all changes to the "listing_input" edge.

func (*AmountMutation) ResetListingOutput

func (m *AmountMutation) ResetListingOutput()

ResetListingOutput resets all changes to the "listing_output" edge.

func (*AmountMutation) ResetType

func (m *AmountMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*AmountMutation) SetAmount

func (m *AmountMutation) SetAmount(si schema.BigInt)

SetAmount sets the "amount" field.

func (*AmountMutation) SetAssetID

func (m *AmountMutation) SetAssetID(si schema.BigInt)

SetAssetID sets the "asset_id" field.

func (*AmountMutation) SetField

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

func (m *AmountMutation) SetID(id string)

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

func (*AmountMutation) SetListingInputID

func (m *AmountMutation) SetListingInputID(id string)

SetListingInputID sets the "listing_input" edge to the Listing entity by id.

func (*AmountMutation) SetListingOutputID

func (m *AmountMutation) SetListingOutputID(id string)

SetListingOutputID sets the "listing_output" edge to the Listing entity by id.

func (*AmountMutation) SetType

func (m *AmountMutation) SetType(a amount.Type)

SetType sets the "type" field.

func (AmountMutation) Tx

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

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

func (*AmountMutation) Type

func (m *AmountMutation) Type() string

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

func (*AmountMutation) Where

func (m *AmountMutation) Where(ps ...predicate.Amount)

Where appends a list predicates to the AmountMutation builder.

type AmountOrder

type AmountOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *AmountOrderField `json:"field"`
}

AmountOrder defines the ordering of Amount.

type AmountOrderField

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

AmountOrderField defines the ordering field of Amount.

type AmountPaginateOption

type AmountPaginateOption func(*amountPager) error

AmountPaginateOption enables pagination customization.

func WithAmountFilter

func WithAmountFilter(filter func(*AmountQuery) (*AmountQuery, error)) AmountPaginateOption

WithAmountFilter configures pagination filter.

func WithAmountOrder

func WithAmountOrder(order *AmountOrder) AmountPaginateOption

WithAmountOrder configures pagination ordering.

type AmountQuery

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

AmountQuery is the builder for querying Amount entities.

func (*AmountQuery) All

func (aq *AmountQuery) All(ctx context.Context) ([]*Amount, error)

All executes the query and returns a list of Amounts.

func (*AmountQuery) AllX

func (aq *AmountQuery) AllX(ctx context.Context) []*Amount

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

func (*AmountQuery) Clone

func (aq *AmountQuery) Clone() *AmountQuery

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

func (*AmountQuery) CollectFields

func (a *AmountQuery) CollectFields(ctx context.Context, satisfies ...string) *AmountQuery

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

func (*AmountQuery) Count

func (aq *AmountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AmountQuery) CountX

func (aq *AmountQuery) CountX(ctx context.Context) int

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

func (*AmountQuery) Exist

func (aq *AmountQuery) Exist(ctx context.Context) (bool, error)

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

func (*AmountQuery) ExistX

func (aq *AmountQuery) ExistX(ctx context.Context) bool

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

func (*AmountQuery) First

func (aq *AmountQuery) First(ctx context.Context) (*Amount, error)

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

func (*AmountQuery) FirstID

func (aq *AmountQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*AmountQuery) FirstIDX

func (aq *AmountQuery) FirstIDX(ctx context.Context) string

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

func (*AmountQuery) FirstX

func (aq *AmountQuery) FirstX(ctx context.Context) *Amount

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

func (*AmountQuery) GroupBy

func (aq *AmountQuery) GroupBy(field string, fields ...string) *AmountGroupBy

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 {
	Type amount.Type `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Amount.Query().
	GroupBy(amount.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AmountQuery) IDs

func (aq *AmountQuery) IDs(ctx context.Context) ([]string, error)

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

func (*AmountQuery) IDsX

func (aq *AmountQuery) IDsX(ctx context.Context) []string

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

func (*AmountQuery) Limit

func (aq *AmountQuery) Limit(limit int) *AmountQuery

Limit adds a limit step to the query.

func (*AmountQuery) Offset

func (aq *AmountQuery) Offset(offset int) *AmountQuery

Offset adds an offset step to the query.

func (*AmountQuery) Only

func (aq *AmountQuery) Only(ctx context.Context) (*Amount, error)

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

func (*AmountQuery) OnlyID

func (aq *AmountQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*AmountQuery) OnlyIDX

func (aq *AmountQuery) OnlyIDX(ctx context.Context) string

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

func (*AmountQuery) OnlyX

func (aq *AmountQuery) OnlyX(ctx context.Context) *Amount

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

func (*AmountQuery) Order

func (aq *AmountQuery) Order(o ...OrderFunc) *AmountQuery

Order adds an order step to the query.

func (*AmountQuery) Paginate

func (a *AmountQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AmountPaginateOption,
) (*AmountConnection, error)

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

func (*AmountQuery) QueryListingInput

func (aq *AmountQuery) QueryListingInput() *ListingQuery

QueryListingInput chains the current query on the "listing_input" edge.

func (*AmountQuery) QueryListingOutput

func (aq *AmountQuery) QueryListingOutput() *ListingQuery

QueryListingOutput chains the current query on the "listing_output" edge.

func (*AmountQuery) Select

func (aq *AmountQuery) Select(fields ...string) *AmountSelect

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 {
	Type amount.Type `json:"type,omitempty"`
}

client.Amount.Query().
	Select(amount.FieldType).
	Scan(ctx, &v)

func (*AmountQuery) Unique

func (aq *AmountQuery) Unique(unique bool) *AmountQuery

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

func (aq *AmountQuery) Where(ps ...predicate.Amount) *AmountQuery

Where adds a new predicate for the AmountQuery builder.

func (*AmountQuery) WithListingInput

func (aq *AmountQuery) WithListingInput(opts ...func(*ListingQuery)) *AmountQuery

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

func (*AmountQuery) WithListingOutput

func (aq *AmountQuery) WithListingOutput(opts ...func(*ListingQuery)) *AmountQuery

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

type AmountSelect

type AmountSelect struct {
	*AmountQuery
	// contains filtered or unexported fields
}

AmountSelect is the builder for selecting fields of Amount entities.

func (*AmountSelect) Bool

func (as *AmountSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*AmountSelect) BoolX

func (as *AmountSelect) BoolX(ctx context.Context) bool

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

func (*AmountSelect) Bools

func (as *AmountSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*AmountSelect) BoolsX

func (as *AmountSelect) BoolsX(ctx context.Context) []bool

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

func (*AmountSelect) Float64

func (as *AmountSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*AmountSelect) Float64X

func (as *AmountSelect) Float64X(ctx context.Context) float64

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

func (*AmountSelect) Float64s

func (as *AmountSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*AmountSelect) Float64sX

func (as *AmountSelect) Float64sX(ctx context.Context) []float64

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

func (*AmountSelect) Int

func (as *AmountSelect) Int(ctx context.Context) (_ int, err error)

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

func (*AmountSelect) IntX

func (as *AmountSelect) IntX(ctx context.Context) int

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

func (*AmountSelect) Ints

func (as *AmountSelect) Ints(ctx context.Context) ([]int, error)

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

func (*AmountSelect) IntsX

func (as *AmountSelect) IntsX(ctx context.Context) []int

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

func (*AmountSelect) Scan

func (as *AmountSelect) Scan(ctx context.Context, v interface{}) error

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

func (*AmountSelect) ScanX

func (as *AmountSelect) ScanX(ctx context.Context, v interface{})

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

func (*AmountSelect) String

func (as *AmountSelect) String(ctx context.Context) (_ string, err error)

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

func (*AmountSelect) StringX

func (as *AmountSelect) StringX(ctx context.Context) string

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

func (*AmountSelect) Strings

func (as *AmountSelect) Strings(ctx context.Context) ([]string, error)

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

func (*AmountSelect) StringsX

func (as *AmountSelect) StringsX(ctx context.Context) []string

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

type AmountUpdate

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

AmountUpdate is the builder for updating Amount entities.

func (*AmountUpdate) AddAmount

func (au *AmountUpdate) AddAmount(si schema.BigInt) *AmountUpdate

AddAmount adds si to the "amount" field.

func (*AmountUpdate) AddAssetID

func (au *AmountUpdate) AddAssetID(si schema.BigInt) *AmountUpdate

AddAssetID adds si to the "asset_id" field.

func (*AmountUpdate) ClearListingInput

func (au *AmountUpdate) ClearListingInput() *AmountUpdate

ClearListingInput clears the "listing_input" edge to the Listing entity.

func (*AmountUpdate) ClearListingOutput

func (au *AmountUpdate) ClearListingOutput() *AmountUpdate

ClearListingOutput clears the "listing_output" edge to the Listing entity.

func (*AmountUpdate) Exec

func (au *AmountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AmountUpdate) ExecX

func (au *AmountUpdate) ExecX(ctx context.Context)

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

func (*AmountUpdate) Mutation

func (au *AmountUpdate) Mutation() *AmountMutation

Mutation returns the AmountMutation object of the builder.

func (*AmountUpdate) Save

func (au *AmountUpdate) Save(ctx context.Context) (int, error)

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

func (*AmountUpdate) SaveX

func (au *AmountUpdate) SaveX(ctx context.Context) int

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

func (*AmountUpdate) SetAmount

func (au *AmountUpdate) SetAmount(si schema.BigInt) *AmountUpdate

SetAmount sets the "amount" field.

func (*AmountUpdate) SetAssetID

func (au *AmountUpdate) SetAssetID(si schema.BigInt) *AmountUpdate

SetAssetID sets the "asset_id" field.

func (*AmountUpdate) SetListingInput

func (au *AmountUpdate) SetListingInput(l *Listing) *AmountUpdate

SetListingInput sets the "listing_input" edge to the Listing entity.

func (*AmountUpdate) SetListingInputID

func (au *AmountUpdate) SetListingInputID(id string) *AmountUpdate

SetListingInputID sets the "listing_input" edge to the Listing entity by ID.

func (*AmountUpdate) SetListingOutput

func (au *AmountUpdate) SetListingOutput(l *Listing) *AmountUpdate

SetListingOutput sets the "listing_output" edge to the Listing entity.

func (*AmountUpdate) SetListingOutputID

func (au *AmountUpdate) SetListingOutputID(id string) *AmountUpdate

SetListingOutputID sets the "listing_output" edge to the Listing entity by ID.

func (*AmountUpdate) SetNillableAmount

func (au *AmountUpdate) SetNillableAmount(si *schema.BigInt) *AmountUpdate

SetNillableAmount sets the "amount" field if the given value is not nil.

func (*AmountUpdate) SetNillableAssetID

func (au *AmountUpdate) SetNillableAssetID(si *schema.BigInt) *AmountUpdate

SetNillableAssetID sets the "asset_id" field if the given value is not nil.

func (*AmountUpdate) SetNillableListingInputID

func (au *AmountUpdate) SetNillableListingInputID(id *string) *AmountUpdate

SetNillableListingInputID sets the "listing_input" edge to the Listing entity by ID if the given value is not nil.

func (*AmountUpdate) SetNillableListingOutputID

func (au *AmountUpdate) SetNillableListingOutputID(id *string) *AmountUpdate

SetNillableListingOutputID sets the "listing_output" edge to the Listing entity by ID if the given value is not nil.

func (*AmountUpdate) Where

func (au *AmountUpdate) Where(ps ...predicate.Amount) *AmountUpdate

Where appends a list predicates to the AmountUpdate builder.

type AmountUpdateOne

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

AmountUpdateOne is the builder for updating a single Amount entity.

func (*AmountUpdateOne) AddAmount

func (auo *AmountUpdateOne) AddAmount(si schema.BigInt) *AmountUpdateOne

AddAmount adds si to the "amount" field.

func (*AmountUpdateOne) AddAssetID

func (auo *AmountUpdateOne) AddAssetID(si schema.BigInt) *AmountUpdateOne

AddAssetID adds si to the "asset_id" field.

func (*AmountUpdateOne) ClearListingInput

func (auo *AmountUpdateOne) ClearListingInput() *AmountUpdateOne

ClearListingInput clears the "listing_input" edge to the Listing entity.

func (*AmountUpdateOne) ClearListingOutput

func (auo *AmountUpdateOne) ClearListingOutput() *AmountUpdateOne

ClearListingOutput clears the "listing_output" edge to the Listing entity.

func (*AmountUpdateOne) Exec

func (auo *AmountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AmountUpdateOne) ExecX

func (auo *AmountUpdateOne) ExecX(ctx context.Context)

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

func (*AmountUpdateOne) Mutation

func (auo *AmountUpdateOne) Mutation() *AmountMutation

Mutation returns the AmountMutation object of the builder.

func (*AmountUpdateOne) Save

func (auo *AmountUpdateOne) Save(ctx context.Context) (*Amount, error)

Save executes the query and returns the updated Amount entity.

func (*AmountUpdateOne) SaveX

func (auo *AmountUpdateOne) SaveX(ctx context.Context) *Amount

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

func (*AmountUpdateOne) Select

func (auo *AmountUpdateOne) Select(field string, fields ...string) *AmountUpdateOne

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

func (*AmountUpdateOne) SetAmount

func (auo *AmountUpdateOne) SetAmount(si schema.BigInt) *AmountUpdateOne

SetAmount sets the "amount" field.

func (*AmountUpdateOne) SetAssetID

func (auo *AmountUpdateOne) SetAssetID(si schema.BigInt) *AmountUpdateOne

SetAssetID sets the "asset_id" field.

func (*AmountUpdateOne) SetListingInput

func (auo *AmountUpdateOne) SetListingInput(l *Listing) *AmountUpdateOne

SetListingInput sets the "listing_input" edge to the Listing entity.

func (*AmountUpdateOne) SetListingInputID

func (auo *AmountUpdateOne) SetListingInputID(id string) *AmountUpdateOne

SetListingInputID sets the "listing_input" edge to the Listing entity by ID.

func (*AmountUpdateOne) SetListingOutput

func (auo *AmountUpdateOne) SetListingOutput(l *Listing) *AmountUpdateOne

SetListingOutput sets the "listing_output" edge to the Listing entity.

func (*AmountUpdateOne) SetListingOutputID

func (auo *AmountUpdateOne) SetListingOutputID(id string) *AmountUpdateOne

SetListingOutputID sets the "listing_output" edge to the Listing entity by ID.

func (*AmountUpdateOne) SetNillableAmount

func (auo *AmountUpdateOne) SetNillableAmount(si *schema.BigInt) *AmountUpdateOne

SetNillableAmount sets the "amount" field if the given value is not nil.

func (*AmountUpdateOne) SetNillableAssetID

func (auo *AmountUpdateOne) SetNillableAssetID(si *schema.BigInt) *AmountUpdateOne

SetNillableAssetID sets the "asset_id" field if the given value is not nil.

func (*AmountUpdateOne) SetNillableListingInputID

func (auo *AmountUpdateOne) SetNillableListingInputID(id *string) *AmountUpdateOne

SetNillableListingInputID sets the "listing_input" edge to the Listing entity by ID if the given value is not nil.

func (*AmountUpdateOne) SetNillableListingOutputID

func (auo *AmountUpdateOne) SetNillableListingOutputID(id *string) *AmountUpdateOne

SetNillableListingOutputID sets the "listing_output" edge to the Listing entity by ID if the given value is not nil.

type AmountUpsert

type AmountUpsert struct {
	*sql.UpdateSet
}

AmountUpsert is the "OnConflict" setter.

func (*AmountUpsert) AddAmount

func (u *AmountUpsert) AddAmount(v schema.BigInt) *AmountUpsert

AddAmount adds v to the "amount" field.

func (*AmountUpsert) AddAssetID

func (u *AmountUpsert) AddAssetID(v schema.BigInt) *AmountUpsert

AddAssetID adds v to the "asset_id" field.

func (*AmountUpsert) SetAmount

func (u *AmountUpsert) SetAmount(v schema.BigInt) *AmountUpsert

SetAmount sets the "amount" field.

func (*AmountUpsert) SetAssetID

func (u *AmountUpsert) SetAssetID(v schema.BigInt) *AmountUpsert

SetAssetID sets the "asset_id" field.

func (*AmountUpsert) SetType

func (u *AmountUpsert) SetType(v amount.Type) *AmountUpsert

SetType sets the "type" field.

func (*AmountUpsert) UpdateAmount

func (u *AmountUpsert) UpdateAmount() *AmountUpsert

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

func (*AmountUpsert) UpdateAssetID

func (u *AmountUpsert) UpdateAssetID() *AmountUpsert

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

func (*AmountUpsert) UpdateType

func (u *AmountUpsert) UpdateType() *AmountUpsert

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

type AmountUpsertBulk

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

AmountUpsertBulk is the builder for "upsert"-ing a bulk of Amount nodes.

func (*AmountUpsertBulk) AddAmount

AddAmount adds v to the "amount" field.

func (*AmountUpsertBulk) AddAssetID

func (u *AmountUpsertBulk) AddAssetID(v schema.BigInt) *AmountUpsertBulk

AddAssetID adds v to the "asset_id" field.

func (*AmountUpsertBulk) DoNothing

func (u *AmountUpsertBulk) DoNothing() *AmountUpsertBulk

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

func (*AmountUpsertBulk) Exec

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

Exec executes the query.

func (*AmountUpsertBulk) ExecX

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

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

func (*AmountUpsertBulk) Ignore

func (u *AmountUpsertBulk) Ignore() *AmountUpsertBulk

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

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

func (*AmountUpsertBulk) SetAmount

SetAmount sets the "amount" field.

func (*AmountUpsertBulk) SetAssetID

func (u *AmountUpsertBulk) SetAssetID(v schema.BigInt) *AmountUpsertBulk

SetAssetID sets the "asset_id" field.

func (*AmountUpsertBulk) SetType

SetType sets the "type" field.

func (*AmountUpsertBulk) Update

func (u *AmountUpsertBulk) Update(set func(*AmountUpsert)) *AmountUpsertBulk

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

func (*AmountUpsertBulk) UpdateAmount

func (u *AmountUpsertBulk) UpdateAmount() *AmountUpsertBulk

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

func (*AmountUpsertBulk) UpdateAssetID

func (u *AmountUpsertBulk) UpdateAssetID() *AmountUpsertBulk

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

func (*AmountUpsertBulk) UpdateNewValues

func (u *AmountUpsertBulk) UpdateNewValues() *AmountUpsertBulk

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

client.Amount.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(amount.FieldID)
		}),
	).
	Exec(ctx)

func (*AmountUpsertBulk) UpdateType

func (u *AmountUpsertBulk) UpdateType() *AmountUpsertBulk

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

type AmountUpsertOne

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

AmountUpsertOne is the builder for "upsert"-ing

one Amount node.

func (*AmountUpsertOne) AddAmount

func (u *AmountUpsertOne) AddAmount(v schema.BigInt) *AmountUpsertOne

AddAmount adds v to the "amount" field.

func (*AmountUpsertOne) AddAssetID

func (u *AmountUpsertOne) AddAssetID(v schema.BigInt) *AmountUpsertOne

AddAssetID adds v to the "asset_id" field.

func (*AmountUpsertOne) DoNothing

func (u *AmountUpsertOne) DoNothing() *AmountUpsertOne

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

func (*AmountUpsertOne) Exec

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

Exec executes the query.

func (*AmountUpsertOne) ExecX

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

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

func (*AmountUpsertOne) ID

func (u *AmountUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*AmountUpsertOne) IDX

func (u *AmountUpsertOne) IDX(ctx context.Context) string

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

func (*AmountUpsertOne) Ignore

func (u *AmountUpsertOne) Ignore() *AmountUpsertOne

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

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

func (*AmountUpsertOne) SetAmount

func (u *AmountUpsertOne) SetAmount(v schema.BigInt) *AmountUpsertOne

SetAmount sets the "amount" field.

func (*AmountUpsertOne) SetAssetID

func (u *AmountUpsertOne) SetAssetID(v schema.BigInt) *AmountUpsertOne

SetAssetID sets the "asset_id" field.

func (*AmountUpsertOne) SetType

func (u *AmountUpsertOne) SetType(v amount.Type) *AmountUpsertOne

SetType sets the "type" field.

func (*AmountUpsertOne) Update

func (u *AmountUpsertOne) Update(set func(*AmountUpsert)) *AmountUpsertOne

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

func (*AmountUpsertOne) UpdateAmount

func (u *AmountUpsertOne) UpdateAmount() *AmountUpsertOne

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

func (*AmountUpsertOne) UpdateAssetID

func (u *AmountUpsertOne) UpdateAssetID() *AmountUpsertOne

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

func (*AmountUpsertOne) UpdateNewValues

func (u *AmountUpsertOne) UpdateNewValues() *AmountUpsertOne

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.Amount.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(amount.FieldID)
		}),
	).
	Exec(ctx)

func (*AmountUpsertOne) UpdateType

func (u *AmountUpsertOne) UpdateType() *AmountUpsertOne

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

type AmountWhereInput

type AmountWhereInput struct {
	Not *AmountWhereInput   `json:"not,omitempty"`
	Or  []*AmountWhereInput `json:"or,omitempty"`
	And []*AmountWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "type" field predicates.
	Type      *amount.Type  `json:"type,omitempty"`
	TypeNEQ   *amount.Type  `json:"typeNEQ,omitempty"`
	TypeIn    []amount.Type `json:"typeIn,omitempty"`
	TypeNotIn []amount.Type `json:"typeNotIn,omitempty"`

	// "amount" field predicates.
	Amount      *schema.BigInt  `json:"amount,omitempty"`
	AmountNEQ   *schema.BigInt  `json:"amountNEQ,omitempty"`
	AmountIn    []schema.BigInt `json:"amountIn,omitempty"`
	AmountNotIn []schema.BigInt `json:"amountNotIn,omitempty"`
	AmountGT    *schema.BigInt  `json:"amountGT,omitempty"`
	AmountGTE   *schema.BigInt  `json:"amountGTE,omitempty"`
	AmountLT    *schema.BigInt  `json:"amountLT,omitempty"`
	AmountLTE   *schema.BigInt  `json:"amountLTE,omitempty"`

	// "asset_id" field predicates.
	AssetID      *schema.BigInt  `json:"assetID,omitempty"`
	AssetIDNEQ   *schema.BigInt  `json:"assetIDNEQ,omitempty"`
	AssetIDIn    []schema.BigInt `json:"assetIDIn,omitempty"`
	AssetIDNotIn []schema.BigInt `json:"assetIDNotIn,omitempty"`
	AssetIDGT    *schema.BigInt  `json:"assetIDGT,omitempty"`
	AssetIDGTE   *schema.BigInt  `json:"assetIDGTE,omitempty"`
	AssetIDLT    *schema.BigInt  `json:"assetIDLT,omitempty"`
	AssetIDLTE   *schema.BigInt  `json:"assetIDLTE,omitempty"`

	// "listing_input" edge predicates.
	HasListingInput     *bool                `json:"hasListingInput,omitempty"`
	HasListingInputWith []*ListingWhereInput `json:"hasListingInputWith,omitempty"`

	// "listing_output" edge predicates.
	HasListingOutput     *bool                `json:"hasListingOutput,omitempty"`
	HasListingOutputWith []*ListingWhereInput `json:"hasListingOutputWith,omitempty"`
}

AmountWhereInput represents a where input for filtering Amount queries.

func (*AmountWhereInput) Filter

func (i *AmountWhereInput) Filter(q *AmountQuery) (*AmountQuery, error)

Filter applies the AmountWhereInput filter on the AmountQuery builder.

func (*AmountWhereInput) P

P returns a predicate for filtering amounts. An error is returned if the input is empty or invalid.

type Amounts

type Amounts []*Amount

Amounts is a parsable slice of Amount.

type BodyPart

type BodyPart struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type bodypart.Type `json:"type,omitempty"`
	// Sex holds the value of the "sex" field.
	Sex bodypart.Sex `json:"sex,omitempty"`
	// Rle holds the value of the "rle" field.
	Rle string `json:"rle,omitempty"`
	// Sprite holds the value of the "sprite" field.
	Sprite string `json:"sprite,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BodyPartQuery when eager-loading is set.
	Edges BodyPartEdges `json:"edges"`
	// contains filtered or unexported fields
}

BodyPart is the model entity for the BodyPart schema.

func (*BodyPart) HustlerBeards

func (bp *BodyPart) HustlerBeards(ctx context.Context) ([]*Hustler, error)

func (*BodyPart) HustlerBodies

func (bp *BodyPart) HustlerBodies(ctx context.Context) ([]*Hustler, error)

func (*BodyPart) HustlerHairs

func (bp *BodyPart) HustlerHairs(ctx context.Context) ([]*Hustler, error)

func (*BodyPart) Node

func (bp *BodyPart) Node(ctx context.Context) (node *Node, err error)

func (*BodyPart) QueryHustlerBeards

func (bp *BodyPart) QueryHustlerBeards() *HustlerQuery

QueryHustlerBeards queries the "hustler_beards" edge of the BodyPart entity.

func (*BodyPart) QueryHustlerBodies

func (bp *BodyPart) QueryHustlerBodies() *HustlerQuery

QueryHustlerBodies queries the "hustler_bodies" edge of the BodyPart entity.

func (*BodyPart) QueryHustlerHairs

func (bp *BodyPart) QueryHustlerHairs() *HustlerQuery

QueryHustlerHairs queries the "hustler_hairs" edge of the BodyPart entity.

func (*BodyPart) String

func (bp *BodyPart) String() string

String implements the fmt.Stringer.

func (*BodyPart) ToEdge

func (bp *BodyPart) ToEdge(order *BodyPartOrder) *BodyPartEdge

ToEdge converts BodyPart into BodyPartEdge.

func (*BodyPart) Unwrap

func (bp *BodyPart) Unwrap() *BodyPart

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

func (bp *BodyPart) Update() *BodyPartUpdateOne

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

type BodyPartClient

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

BodyPartClient is a client for the BodyPart schema.

func NewBodyPartClient

func NewBodyPartClient(c config) *BodyPartClient

NewBodyPartClient returns a client for the BodyPart from the given config.

func (*BodyPartClient) Create

func (c *BodyPartClient) Create() *BodyPartCreate

Create returns a create builder for BodyPart.

func (*BodyPartClient) CreateBulk

func (c *BodyPartClient) CreateBulk(builders ...*BodyPartCreate) *BodyPartCreateBulk

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

func (*BodyPartClient) Delete

func (c *BodyPartClient) Delete() *BodyPartDelete

Delete returns a delete builder for BodyPart.

func (*BodyPartClient) DeleteOne

func (c *BodyPartClient) DeleteOne(bp *BodyPart) *BodyPartDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*BodyPartClient) DeleteOneID

func (c *BodyPartClient) DeleteOneID(id string) *BodyPartDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*BodyPartClient) Get

func (c *BodyPartClient) Get(ctx context.Context, id string) (*BodyPart, error)

Get returns a BodyPart entity by its id.

func (*BodyPartClient) GetX

func (c *BodyPartClient) GetX(ctx context.Context, id string) *BodyPart

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

func (*BodyPartClient) Hooks

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

Hooks returns the client hooks.

func (*BodyPartClient) Query

func (c *BodyPartClient) Query() *BodyPartQuery

Query returns a query builder for BodyPart.

func (*BodyPartClient) QueryHustlerBeards

func (c *BodyPartClient) QueryHustlerBeards(bp *BodyPart) *HustlerQuery

QueryHustlerBeards queries the hustler_beards edge of a BodyPart.

func (*BodyPartClient) QueryHustlerBodies

func (c *BodyPartClient) QueryHustlerBodies(bp *BodyPart) *HustlerQuery

QueryHustlerBodies queries the hustler_bodies edge of a BodyPart.

func (*BodyPartClient) QueryHustlerHairs

func (c *BodyPartClient) QueryHustlerHairs(bp *BodyPart) *HustlerQuery

QueryHustlerHairs queries the hustler_hairs edge of a BodyPart.

func (*BodyPartClient) Update

func (c *BodyPartClient) Update() *BodyPartUpdate

Update returns an update builder for BodyPart.

func (*BodyPartClient) UpdateOne

func (c *BodyPartClient) UpdateOne(bp *BodyPart) *BodyPartUpdateOne

UpdateOne returns an update builder for the given entity.

func (*BodyPartClient) UpdateOneID

func (c *BodyPartClient) UpdateOneID(id string) *BodyPartUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BodyPartClient) Use

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

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

type BodyPartConnection

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

BodyPartConnection is the connection containing edges to BodyPart.

type BodyPartCreate

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

BodyPartCreate is the builder for creating a BodyPart entity.

func (*BodyPartCreate) AddHustlerBeardIDs

func (bpc *BodyPartCreate) AddHustlerBeardIDs(ids ...string) *BodyPartCreate

AddHustlerBeardIDs adds the "hustler_beards" edge to the Hustler entity by IDs.

func (*BodyPartCreate) AddHustlerBeards

func (bpc *BodyPartCreate) AddHustlerBeards(h ...*Hustler) *BodyPartCreate

AddHustlerBeards adds the "hustler_beards" edges to the Hustler entity.

func (*BodyPartCreate) AddHustlerBodies

func (bpc *BodyPartCreate) AddHustlerBodies(h ...*Hustler) *BodyPartCreate

AddHustlerBodies adds the "hustler_bodies" edges to the Hustler entity.

func (*BodyPartCreate) AddHustlerBodyIDs

func (bpc *BodyPartCreate) AddHustlerBodyIDs(ids ...string) *BodyPartCreate

AddHustlerBodyIDs adds the "hustler_bodies" edge to the Hustler entity by IDs.

func (*BodyPartCreate) AddHustlerHairIDs

func (bpc *BodyPartCreate) AddHustlerHairIDs(ids ...string) *BodyPartCreate

AddHustlerHairIDs adds the "hustler_hairs" edge to the Hustler entity by IDs.

func (*BodyPartCreate) AddHustlerHairs

func (bpc *BodyPartCreate) AddHustlerHairs(h ...*Hustler) *BodyPartCreate

AddHustlerHairs adds the "hustler_hairs" edges to the Hustler entity.

func (*BodyPartCreate) Exec

func (bpc *BodyPartCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BodyPartCreate) ExecX

func (bpc *BodyPartCreate) ExecX(ctx context.Context)

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

func (*BodyPartCreate) Mutation

func (bpc *BodyPartCreate) Mutation() *BodyPartMutation

Mutation returns the BodyPartMutation object of the builder.

func (*BodyPartCreate) OnConflict

func (bpc *BodyPartCreate) OnConflict(opts ...sql.ConflictOption) *BodyPartUpsertOne

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

client.BodyPart.Create().
	SetType(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.BodyPartUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*BodyPartCreate) OnConflictColumns

func (bpc *BodyPartCreate) OnConflictColumns(columns ...string) *BodyPartUpsertOne

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

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

func (*BodyPartCreate) Save

func (bpc *BodyPartCreate) Save(ctx context.Context) (*BodyPart, error)

Save creates the BodyPart in the database.

func (*BodyPartCreate) SaveX

func (bpc *BodyPartCreate) SaveX(ctx context.Context) *BodyPart

SaveX calls Save and panics if Save returns an error.

func (*BodyPartCreate) SetID

func (bpc *BodyPartCreate) SetID(s string) *BodyPartCreate

SetID sets the "id" field.

func (*BodyPartCreate) SetNillableSprite

func (bpc *BodyPartCreate) SetNillableSprite(s *string) *BodyPartCreate

SetNillableSprite sets the "sprite" field if the given value is not nil.

func (*BodyPartCreate) SetRle

func (bpc *BodyPartCreate) SetRle(s string) *BodyPartCreate

SetRle sets the "rle" field.

func (*BodyPartCreate) SetSex

func (bpc *BodyPartCreate) SetSex(b bodypart.Sex) *BodyPartCreate

SetSex sets the "sex" field.

func (*BodyPartCreate) SetSprite

func (bpc *BodyPartCreate) SetSprite(s string) *BodyPartCreate

SetSprite sets the "sprite" field.

func (*BodyPartCreate) SetType

func (bpc *BodyPartCreate) SetType(b bodypart.Type) *BodyPartCreate

SetType sets the "type" field.

type BodyPartCreateBulk

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

BodyPartCreateBulk is the builder for creating many BodyPart entities in bulk.

func (*BodyPartCreateBulk) Exec

func (bpcb *BodyPartCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BodyPartCreateBulk) ExecX

func (bpcb *BodyPartCreateBulk) ExecX(ctx context.Context)

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

func (*BodyPartCreateBulk) OnConflict

func (bpcb *BodyPartCreateBulk) OnConflict(opts ...sql.ConflictOption) *BodyPartUpsertBulk

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

client.BodyPart.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.BodyPartUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*BodyPartCreateBulk) OnConflictColumns

func (bpcb *BodyPartCreateBulk) OnConflictColumns(columns ...string) *BodyPartUpsertBulk

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

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

func (*BodyPartCreateBulk) Save

func (bpcb *BodyPartCreateBulk) Save(ctx context.Context) ([]*BodyPart, error)

Save creates the BodyPart entities in the database.

func (*BodyPartCreateBulk) SaveX

func (bpcb *BodyPartCreateBulk) SaveX(ctx context.Context) []*BodyPart

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

type BodyPartDelete

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

BodyPartDelete is the builder for deleting a BodyPart entity.

func (*BodyPartDelete) Exec

func (bpd *BodyPartDelete) Exec(ctx context.Context) (int, error)

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

func (*BodyPartDelete) ExecX

func (bpd *BodyPartDelete) ExecX(ctx context.Context) int

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

func (*BodyPartDelete) Where

func (bpd *BodyPartDelete) Where(ps ...predicate.BodyPart) *BodyPartDelete

Where appends a list predicates to the BodyPartDelete builder.

type BodyPartDeleteOne

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

BodyPartDeleteOne is the builder for deleting a single BodyPart entity.

func (*BodyPartDeleteOne) Exec

func (bpdo *BodyPartDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BodyPartDeleteOne) ExecX

func (bpdo *BodyPartDeleteOne) ExecX(ctx context.Context)

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

type BodyPartEdge

type BodyPartEdge struct {
	Node   *BodyPart `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

BodyPartEdge is the edge representation of BodyPart.

type BodyPartEdges

type BodyPartEdges struct {
	// HustlerBodies holds the value of the hustler_bodies edge.
	HustlerBodies []*Hustler `json:"hustler_bodies,omitempty"`
	// HustlerHairs holds the value of the hustler_hairs edge.
	HustlerHairs []*Hustler `json:"hustler_hairs,omitempty"`
	// HustlerBeards holds the value of the hustler_beards edge.
	HustlerBeards []*Hustler `json:"hustler_beards,omitempty"`
	// contains filtered or unexported fields
}

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

func (BodyPartEdges) HustlerBeardsOrErr

func (e BodyPartEdges) HustlerBeardsOrErr() ([]*Hustler, error)

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

func (BodyPartEdges) HustlerBodiesOrErr

func (e BodyPartEdges) HustlerBodiesOrErr() ([]*Hustler, error)

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

func (BodyPartEdges) HustlerHairsOrErr

func (e BodyPartEdges) HustlerHairsOrErr() ([]*Hustler, error)

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

type BodyPartGroupBy

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

BodyPartGroupBy is the group-by builder for BodyPart entities.

func (*BodyPartGroupBy) Aggregate

func (bpgb *BodyPartGroupBy) Aggregate(fns ...AggregateFunc) *BodyPartGroupBy

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

func (*BodyPartGroupBy) Bool

func (bpgb *BodyPartGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BodyPartGroupBy) BoolX

func (bpgb *BodyPartGroupBy) BoolX(ctx context.Context) bool

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

func (*BodyPartGroupBy) Bools

func (bpgb *BodyPartGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*BodyPartGroupBy) BoolsX

func (bpgb *BodyPartGroupBy) BoolsX(ctx context.Context) []bool

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

func (*BodyPartGroupBy) Float64

func (bpgb *BodyPartGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BodyPartGroupBy) Float64X

func (bpgb *BodyPartGroupBy) Float64X(ctx context.Context) float64

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

func (*BodyPartGroupBy) Float64s

func (bpgb *BodyPartGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*BodyPartGroupBy) Float64sX

func (bpgb *BodyPartGroupBy) Float64sX(ctx context.Context) []float64

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

func (*BodyPartGroupBy) Int

func (bpgb *BodyPartGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BodyPartGroupBy) IntX

func (bpgb *BodyPartGroupBy) IntX(ctx context.Context) int

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

func (*BodyPartGroupBy) Ints

func (bpgb *BodyPartGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*BodyPartGroupBy) IntsX

func (bpgb *BodyPartGroupBy) IntsX(ctx context.Context) []int

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

func (*BodyPartGroupBy) Scan

func (bpgb *BodyPartGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*BodyPartGroupBy) ScanX

func (bpgb *BodyPartGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*BodyPartGroupBy) String

func (bpgb *BodyPartGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BodyPartGroupBy) StringX

func (bpgb *BodyPartGroupBy) StringX(ctx context.Context) string

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

func (*BodyPartGroupBy) Strings

func (bpgb *BodyPartGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*BodyPartGroupBy) StringsX

func (bpgb *BodyPartGroupBy) StringsX(ctx context.Context) []string

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

type BodyPartMutation

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

BodyPartMutation represents an operation that mutates the BodyPart nodes in the graph.

func (*BodyPartMutation) AddField

func (m *BodyPartMutation) 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 (*BodyPartMutation) AddHustlerBeardIDs

func (m *BodyPartMutation) AddHustlerBeardIDs(ids ...string)

AddHustlerBeardIDs adds the "hustler_beards" edge to the Hustler entity by ids.

func (*BodyPartMutation) AddHustlerBodyIDs

func (m *BodyPartMutation) AddHustlerBodyIDs(ids ...string)

AddHustlerBodyIDs adds the "hustler_bodies" edge to the Hustler entity by ids.

func (*BodyPartMutation) AddHustlerHairIDs

func (m *BodyPartMutation) AddHustlerHairIDs(ids ...string)

AddHustlerHairIDs adds the "hustler_hairs" edge to the Hustler entity by ids.

func (*BodyPartMutation) AddedEdges

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

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

func (*BodyPartMutation) AddedField

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

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

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

func (*BodyPartMutation) AddedIDs

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

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

func (*BodyPartMutation) ClearEdge

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

func (m *BodyPartMutation) 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 (*BodyPartMutation) ClearHustlerBeards

func (m *BodyPartMutation) ClearHustlerBeards()

ClearHustlerBeards clears the "hustler_beards" edge to the Hustler entity.

func (*BodyPartMutation) ClearHustlerBodies

func (m *BodyPartMutation) ClearHustlerBodies()

ClearHustlerBodies clears the "hustler_bodies" edge to the Hustler entity.

func (*BodyPartMutation) ClearHustlerHairs

func (m *BodyPartMutation) ClearHustlerHairs()

ClearHustlerHairs clears the "hustler_hairs" edge to the Hustler entity.

func (*BodyPartMutation) ClearSprite

func (m *BodyPartMutation) ClearSprite()

ClearSprite clears the value of the "sprite" field.

func (*BodyPartMutation) ClearedEdges

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

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

func (*BodyPartMutation) ClearedFields

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

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

func (BodyPartMutation) Client

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

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

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

func (*BodyPartMutation) Field

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

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

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

func (*BodyPartMutation) Fields

func (m *BodyPartMutation) 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 (*BodyPartMutation) GetType

func (m *BodyPartMutation) GetType() (r bodypart.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*BodyPartMutation) HustlerBeardsCleared

func (m *BodyPartMutation) HustlerBeardsCleared() bool

HustlerBeardsCleared reports if the "hustler_beards" edge to the Hustler entity was cleared.

func (*BodyPartMutation) HustlerBeardsIDs

func (m *BodyPartMutation) HustlerBeardsIDs() (ids []string)

HustlerBeardsIDs returns the "hustler_beards" edge IDs in the mutation.

func (*BodyPartMutation) HustlerBodiesCleared

func (m *BodyPartMutation) HustlerBodiesCleared() bool

HustlerBodiesCleared reports if the "hustler_bodies" edge to the Hustler entity was cleared.

func (*BodyPartMutation) HustlerBodiesIDs

func (m *BodyPartMutation) HustlerBodiesIDs() (ids []string)

HustlerBodiesIDs returns the "hustler_bodies" edge IDs in the mutation.

func (*BodyPartMutation) HustlerHairsCleared

func (m *BodyPartMutation) HustlerHairsCleared() bool

HustlerHairsCleared reports if the "hustler_hairs" edge to the Hustler entity was cleared.

func (*BodyPartMutation) HustlerHairsIDs

func (m *BodyPartMutation) HustlerHairsIDs() (ids []string)

HustlerHairsIDs returns the "hustler_hairs" edge IDs in the mutation.

func (*BodyPartMutation) ID

func (m *BodyPartMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*BodyPartMutation) IDs

func (m *BodyPartMutation) IDs(ctx context.Context) ([]string, error)

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

func (*BodyPartMutation) OldField

func (m *BodyPartMutation) 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 (*BodyPartMutation) OldRle

func (m *BodyPartMutation) OldRle(ctx context.Context) (v string, err error)

OldRle returns the old "rle" field's value of the BodyPart entity. If the BodyPart 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 (*BodyPartMutation) OldSex

func (m *BodyPartMutation) OldSex(ctx context.Context) (v bodypart.Sex, err error)

OldSex returns the old "sex" field's value of the BodyPart entity. If the BodyPart 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 (*BodyPartMutation) OldSprite

func (m *BodyPartMutation) OldSprite(ctx context.Context) (v string, err error)

OldSprite returns the old "sprite" field's value of the BodyPart entity. If the BodyPart 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 (*BodyPartMutation) OldType

func (m *BodyPartMutation) OldType(ctx context.Context) (v bodypart.Type, err error)

OldType returns the old "type" field's value of the BodyPart entity. If the BodyPart 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 (*BodyPartMutation) Op

func (m *BodyPartMutation) Op() Op

Op returns the operation name.

func (*BodyPartMutation) RemoveHustlerBeardIDs

func (m *BodyPartMutation) RemoveHustlerBeardIDs(ids ...string)

RemoveHustlerBeardIDs removes the "hustler_beards" edge to the Hustler entity by IDs.

func (*BodyPartMutation) RemoveHustlerBodyIDs

func (m *BodyPartMutation) RemoveHustlerBodyIDs(ids ...string)

RemoveHustlerBodyIDs removes the "hustler_bodies" edge to the Hustler entity by IDs.

func (*BodyPartMutation) RemoveHustlerHairIDs

func (m *BodyPartMutation) RemoveHustlerHairIDs(ids ...string)

RemoveHustlerHairIDs removes the "hustler_hairs" edge to the Hustler entity by IDs.

func (*BodyPartMutation) RemovedEdges

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

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

func (*BodyPartMutation) RemovedHustlerBeardsIDs

func (m *BodyPartMutation) RemovedHustlerBeardsIDs() (ids []string)

RemovedHustlerBeards returns the removed IDs of the "hustler_beards" edge to the Hustler entity.

func (*BodyPartMutation) RemovedHustlerBodiesIDs

func (m *BodyPartMutation) RemovedHustlerBodiesIDs() (ids []string)

RemovedHustlerBodies returns the removed IDs of the "hustler_bodies" edge to the Hustler entity.

func (*BodyPartMutation) RemovedHustlerHairsIDs

func (m *BodyPartMutation) RemovedHustlerHairsIDs() (ids []string)

RemovedHustlerHairs returns the removed IDs of the "hustler_hairs" edge to the Hustler entity.

func (*BodyPartMutation) RemovedIDs

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

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

func (m *BodyPartMutation) 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 (*BodyPartMutation) ResetHustlerBeards

func (m *BodyPartMutation) ResetHustlerBeards()

ResetHustlerBeards resets all changes to the "hustler_beards" edge.

func (*BodyPartMutation) ResetHustlerBodies

func (m *BodyPartMutation) ResetHustlerBodies()

ResetHustlerBodies resets all changes to the "hustler_bodies" edge.

func (*BodyPartMutation) ResetHustlerHairs

func (m *BodyPartMutation) ResetHustlerHairs()

ResetHustlerHairs resets all changes to the "hustler_hairs" edge.

func (*BodyPartMutation) ResetRle

func (m *BodyPartMutation) ResetRle()

ResetRle resets all changes to the "rle" field.

func (*BodyPartMutation) ResetSex

func (m *BodyPartMutation) ResetSex()

ResetSex resets all changes to the "sex" field.

func (*BodyPartMutation) ResetSprite

func (m *BodyPartMutation) ResetSprite()

ResetSprite resets all changes to the "sprite" field.

func (*BodyPartMutation) ResetType

func (m *BodyPartMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*BodyPartMutation) Rle

func (m *BodyPartMutation) Rle() (r string, exists bool)

Rle returns the value of the "rle" field in the mutation.

func (*BodyPartMutation) SetField

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

func (m *BodyPartMutation) SetID(id string)

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

func (*BodyPartMutation) SetRle

func (m *BodyPartMutation) SetRle(s string)

SetRle sets the "rle" field.

func (*BodyPartMutation) SetSex

func (m *BodyPartMutation) SetSex(b bodypart.Sex)

SetSex sets the "sex" field.

func (*BodyPartMutation) SetSprite

func (m *BodyPartMutation) SetSprite(s string)

SetSprite sets the "sprite" field.

func (*BodyPartMutation) SetType

func (m *BodyPartMutation) SetType(b bodypart.Type)

SetType sets the "type" field.

func (*BodyPartMutation) Sex

func (m *BodyPartMutation) Sex() (r bodypart.Sex, exists bool)

Sex returns the value of the "sex" field in the mutation.

func (*BodyPartMutation) Sprite

func (m *BodyPartMutation) Sprite() (r string, exists bool)

Sprite returns the value of the "sprite" field in the mutation.

func (*BodyPartMutation) SpriteCleared

func (m *BodyPartMutation) SpriteCleared() bool

SpriteCleared returns if the "sprite" field was cleared in this mutation.

func (BodyPartMutation) Tx

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

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

func (*BodyPartMutation) Type

func (m *BodyPartMutation) Type() string

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

func (*BodyPartMutation) Where

func (m *BodyPartMutation) Where(ps ...predicate.BodyPart)

Where appends a list predicates to the BodyPartMutation builder.

type BodyPartOrder

type BodyPartOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *BodyPartOrderField `json:"field"`
}

BodyPartOrder defines the ordering of BodyPart.

type BodyPartOrderField

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

BodyPartOrderField defines the ordering field of BodyPart.

type BodyPartPaginateOption

type BodyPartPaginateOption func(*bodyPartPager) error

BodyPartPaginateOption enables pagination customization.

func WithBodyPartFilter

func WithBodyPartFilter(filter func(*BodyPartQuery) (*BodyPartQuery, error)) BodyPartPaginateOption

WithBodyPartFilter configures pagination filter.

func WithBodyPartOrder

func WithBodyPartOrder(order *BodyPartOrder) BodyPartPaginateOption

WithBodyPartOrder configures pagination ordering.

type BodyPartQuery

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

BodyPartQuery is the builder for querying BodyPart entities.

func (*BodyPartQuery) All

func (bpq *BodyPartQuery) All(ctx context.Context) ([]*BodyPart, error)

All executes the query and returns a list of BodyParts.

func (*BodyPartQuery) AllX

func (bpq *BodyPartQuery) AllX(ctx context.Context) []*BodyPart

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

func (*BodyPartQuery) Clone

func (bpq *BodyPartQuery) Clone() *BodyPartQuery

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

func (*BodyPartQuery) CollectFields

func (bp *BodyPartQuery) CollectFields(ctx context.Context, satisfies ...string) *BodyPartQuery

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

func (*BodyPartQuery) Count

func (bpq *BodyPartQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BodyPartQuery) CountX

func (bpq *BodyPartQuery) CountX(ctx context.Context) int

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

func (*BodyPartQuery) Exist

func (bpq *BodyPartQuery) Exist(ctx context.Context) (bool, error)

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

func (*BodyPartQuery) ExistX

func (bpq *BodyPartQuery) ExistX(ctx context.Context) bool

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

func (*BodyPartQuery) First

func (bpq *BodyPartQuery) First(ctx context.Context) (*BodyPart, error)

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

func (*BodyPartQuery) FirstID

func (bpq *BodyPartQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*BodyPartQuery) FirstIDX

func (bpq *BodyPartQuery) FirstIDX(ctx context.Context) string

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

func (*BodyPartQuery) FirstX

func (bpq *BodyPartQuery) FirstX(ctx context.Context) *BodyPart

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

func (*BodyPartQuery) GroupBy

func (bpq *BodyPartQuery) GroupBy(field string, fields ...string) *BodyPartGroupBy

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 {
	Type bodypart.Type `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.BodyPart.Query().
	GroupBy(bodypart.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BodyPartQuery) IDs

func (bpq *BodyPartQuery) IDs(ctx context.Context) ([]string, error)

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

func (*BodyPartQuery) IDsX

func (bpq *BodyPartQuery) IDsX(ctx context.Context) []string

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

func (*BodyPartQuery) Limit

func (bpq *BodyPartQuery) Limit(limit int) *BodyPartQuery

Limit adds a limit step to the query.

func (*BodyPartQuery) Offset

func (bpq *BodyPartQuery) Offset(offset int) *BodyPartQuery

Offset adds an offset step to the query.

func (*BodyPartQuery) Only

func (bpq *BodyPartQuery) Only(ctx context.Context) (*BodyPart, error)

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

func (*BodyPartQuery) OnlyID

func (bpq *BodyPartQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*BodyPartQuery) OnlyIDX

func (bpq *BodyPartQuery) OnlyIDX(ctx context.Context) string

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

func (*BodyPartQuery) OnlyX

func (bpq *BodyPartQuery) OnlyX(ctx context.Context) *BodyPart

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

func (*BodyPartQuery) Order

func (bpq *BodyPartQuery) Order(o ...OrderFunc) *BodyPartQuery

Order adds an order step to the query.

func (*BodyPartQuery) Paginate

func (bp *BodyPartQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...BodyPartPaginateOption,
) (*BodyPartConnection, error)

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

func (*BodyPartQuery) QueryHustlerBeards

func (bpq *BodyPartQuery) QueryHustlerBeards() *HustlerQuery

QueryHustlerBeards chains the current query on the "hustler_beards" edge.

func (*BodyPartQuery) QueryHustlerBodies

func (bpq *BodyPartQuery) QueryHustlerBodies() *HustlerQuery

QueryHustlerBodies chains the current query on the "hustler_bodies" edge.

func (*BodyPartQuery) QueryHustlerHairs

func (bpq *BodyPartQuery) QueryHustlerHairs() *HustlerQuery

QueryHustlerHairs chains the current query on the "hustler_hairs" edge.

func (*BodyPartQuery) Select

func (bpq *BodyPartQuery) Select(fields ...string) *BodyPartSelect

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 {
	Type bodypart.Type `json:"type,omitempty"`
}

client.BodyPart.Query().
	Select(bodypart.FieldType).
	Scan(ctx, &v)

func (*BodyPartQuery) Unique

func (bpq *BodyPartQuery) Unique(unique bool) *BodyPartQuery

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

func (bpq *BodyPartQuery) Where(ps ...predicate.BodyPart) *BodyPartQuery

Where adds a new predicate for the BodyPartQuery builder.

func (*BodyPartQuery) WithHustlerBeards

func (bpq *BodyPartQuery) WithHustlerBeards(opts ...func(*HustlerQuery)) *BodyPartQuery

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

func (*BodyPartQuery) WithHustlerBodies

func (bpq *BodyPartQuery) WithHustlerBodies(opts ...func(*HustlerQuery)) *BodyPartQuery

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

func (*BodyPartQuery) WithHustlerHairs

func (bpq *BodyPartQuery) WithHustlerHairs(opts ...func(*HustlerQuery)) *BodyPartQuery

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

type BodyPartSelect

type BodyPartSelect struct {
	*BodyPartQuery
	// contains filtered or unexported fields
}

BodyPartSelect is the builder for selecting fields of BodyPart entities.

func (*BodyPartSelect) Bool

func (bps *BodyPartSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*BodyPartSelect) BoolX

func (bps *BodyPartSelect) BoolX(ctx context.Context) bool

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

func (*BodyPartSelect) Bools

func (bps *BodyPartSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*BodyPartSelect) BoolsX

func (bps *BodyPartSelect) BoolsX(ctx context.Context) []bool

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

func (*BodyPartSelect) Float64

func (bps *BodyPartSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*BodyPartSelect) Float64X

func (bps *BodyPartSelect) Float64X(ctx context.Context) float64

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

func (*BodyPartSelect) Float64s

func (bps *BodyPartSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*BodyPartSelect) Float64sX

func (bps *BodyPartSelect) Float64sX(ctx context.Context) []float64

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

func (*BodyPartSelect) Int

func (bps *BodyPartSelect) Int(ctx context.Context) (_ int, err error)

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

func (*BodyPartSelect) IntX

func (bps *BodyPartSelect) IntX(ctx context.Context) int

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

func (*BodyPartSelect) Ints

func (bps *BodyPartSelect) Ints(ctx context.Context) ([]int, error)

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

func (*BodyPartSelect) IntsX

func (bps *BodyPartSelect) IntsX(ctx context.Context) []int

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

func (*BodyPartSelect) Scan

func (bps *BodyPartSelect) Scan(ctx context.Context, v interface{}) error

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

func (*BodyPartSelect) ScanX

func (bps *BodyPartSelect) ScanX(ctx context.Context, v interface{})

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

func (*BodyPartSelect) String

func (bps *BodyPartSelect) String(ctx context.Context) (_ string, err error)

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

func (*BodyPartSelect) StringX

func (bps *BodyPartSelect) StringX(ctx context.Context) string

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

func (*BodyPartSelect) Strings

func (bps *BodyPartSelect) Strings(ctx context.Context) ([]string, error)

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

func (*BodyPartSelect) StringsX

func (bps *BodyPartSelect) StringsX(ctx context.Context) []string

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

type BodyPartUpdate

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

BodyPartUpdate is the builder for updating BodyPart entities.

func (*BodyPartUpdate) AddHustlerBeardIDs

func (bpu *BodyPartUpdate) AddHustlerBeardIDs(ids ...string) *BodyPartUpdate

AddHustlerBeardIDs adds the "hustler_beards" edge to the Hustler entity by IDs.

func (*BodyPartUpdate) AddHustlerBeards

func (bpu *BodyPartUpdate) AddHustlerBeards(h ...*Hustler) *BodyPartUpdate

AddHustlerBeards adds the "hustler_beards" edges to the Hustler entity.

func (*BodyPartUpdate) AddHustlerBodies

func (bpu *BodyPartUpdate) AddHustlerBodies(h ...*Hustler) *BodyPartUpdate

AddHustlerBodies adds the "hustler_bodies" edges to the Hustler entity.

func (*BodyPartUpdate) AddHustlerBodyIDs

func (bpu *BodyPartUpdate) AddHustlerBodyIDs(ids ...string) *BodyPartUpdate

AddHustlerBodyIDs adds the "hustler_bodies" edge to the Hustler entity by IDs.

func (*BodyPartUpdate) AddHustlerHairIDs

func (bpu *BodyPartUpdate) AddHustlerHairIDs(ids ...string) *BodyPartUpdate

AddHustlerHairIDs adds the "hustler_hairs" edge to the Hustler entity by IDs.

func (*BodyPartUpdate) AddHustlerHairs

func (bpu *BodyPartUpdate) AddHustlerHairs(h ...*Hustler) *BodyPartUpdate

AddHustlerHairs adds the "hustler_hairs" edges to the Hustler entity.

func (*BodyPartUpdate) ClearHustlerBeards

func (bpu *BodyPartUpdate) ClearHustlerBeards() *BodyPartUpdate

ClearHustlerBeards clears all "hustler_beards" edges to the Hustler entity.

func (*BodyPartUpdate) ClearHustlerBodies

func (bpu *BodyPartUpdate) ClearHustlerBodies() *BodyPartUpdate

ClearHustlerBodies clears all "hustler_bodies" edges to the Hustler entity.

func (*BodyPartUpdate) ClearHustlerHairs

func (bpu *BodyPartUpdate) ClearHustlerHairs() *BodyPartUpdate

ClearHustlerHairs clears all "hustler_hairs" edges to the Hustler entity.

func (*BodyPartUpdate) ClearSprite

func (bpu *BodyPartUpdate) ClearSprite() *BodyPartUpdate

ClearSprite clears the value of the "sprite" field.

func (*BodyPartUpdate) Exec

func (bpu *BodyPartUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BodyPartUpdate) ExecX

func (bpu *BodyPartUpdate) ExecX(ctx context.Context)

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

func (*BodyPartUpdate) Mutation

func (bpu *BodyPartUpdate) Mutation() *BodyPartMutation

Mutation returns the BodyPartMutation object of the builder.

func (*BodyPartUpdate) RemoveHustlerBeardIDs

func (bpu *BodyPartUpdate) RemoveHustlerBeardIDs(ids ...string) *BodyPartUpdate

RemoveHustlerBeardIDs removes the "hustler_beards" edge to Hustler entities by IDs.

func (*BodyPartUpdate) RemoveHustlerBeards

func (bpu *BodyPartUpdate) RemoveHustlerBeards(h ...*Hustler) *BodyPartUpdate

RemoveHustlerBeards removes "hustler_beards" edges to Hustler entities.

func (*BodyPartUpdate) RemoveHustlerBodies

func (bpu *BodyPartUpdate) RemoveHustlerBodies(h ...*Hustler) *BodyPartUpdate

RemoveHustlerBodies removes "hustler_bodies" edges to Hustler entities.

func (*BodyPartUpdate) RemoveHustlerBodyIDs

func (bpu *BodyPartUpdate) RemoveHustlerBodyIDs(ids ...string) *BodyPartUpdate

RemoveHustlerBodyIDs removes the "hustler_bodies" edge to Hustler entities by IDs.

func (*BodyPartUpdate) RemoveHustlerHairIDs

func (bpu *BodyPartUpdate) RemoveHustlerHairIDs(ids ...string) *BodyPartUpdate

RemoveHustlerHairIDs removes the "hustler_hairs" edge to Hustler entities by IDs.

func (*BodyPartUpdate) RemoveHustlerHairs

func (bpu *BodyPartUpdate) RemoveHustlerHairs(h ...*Hustler) *BodyPartUpdate

RemoveHustlerHairs removes "hustler_hairs" edges to Hustler entities.

func (*BodyPartUpdate) Save

func (bpu *BodyPartUpdate) Save(ctx context.Context) (int, error)

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

func (*BodyPartUpdate) SaveX

func (bpu *BodyPartUpdate) SaveX(ctx context.Context) int

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

func (*BodyPartUpdate) SetNillableSprite

func (bpu *BodyPartUpdate) SetNillableSprite(s *string) *BodyPartUpdate

SetNillableSprite sets the "sprite" field if the given value is not nil.

func (*BodyPartUpdate) SetSprite

func (bpu *BodyPartUpdate) SetSprite(s string) *BodyPartUpdate

SetSprite sets the "sprite" field.

func (*BodyPartUpdate) Where

func (bpu *BodyPartUpdate) Where(ps ...predicate.BodyPart) *BodyPartUpdate

Where appends a list predicates to the BodyPartUpdate builder.

type BodyPartUpdateOne

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

BodyPartUpdateOne is the builder for updating a single BodyPart entity.

func (*BodyPartUpdateOne) AddHustlerBeardIDs

func (bpuo *BodyPartUpdateOne) AddHustlerBeardIDs(ids ...string) *BodyPartUpdateOne

AddHustlerBeardIDs adds the "hustler_beards" edge to the Hustler entity by IDs.

func (*BodyPartUpdateOne) AddHustlerBeards

func (bpuo *BodyPartUpdateOne) AddHustlerBeards(h ...*Hustler) *BodyPartUpdateOne

AddHustlerBeards adds the "hustler_beards" edges to the Hustler entity.

func (*BodyPartUpdateOne) AddHustlerBodies

func (bpuo *BodyPartUpdateOne) AddHustlerBodies(h ...*Hustler) *BodyPartUpdateOne

AddHustlerBodies adds the "hustler_bodies" edges to the Hustler entity.

func (*BodyPartUpdateOne) AddHustlerBodyIDs

func (bpuo *BodyPartUpdateOne) AddHustlerBodyIDs(ids ...string) *BodyPartUpdateOne

AddHustlerBodyIDs adds the "hustler_bodies" edge to the Hustler entity by IDs.

func (*BodyPartUpdateOne) AddHustlerHairIDs

func (bpuo *BodyPartUpdateOne) AddHustlerHairIDs(ids ...string) *BodyPartUpdateOne

AddHustlerHairIDs adds the "hustler_hairs" edge to the Hustler entity by IDs.

func (*BodyPartUpdateOne) AddHustlerHairs

func (bpuo *BodyPartUpdateOne) AddHustlerHairs(h ...*Hustler) *BodyPartUpdateOne

AddHustlerHairs adds the "hustler_hairs" edges to the Hustler entity.

func (*BodyPartUpdateOne) ClearHustlerBeards

func (bpuo *BodyPartUpdateOne) ClearHustlerBeards() *BodyPartUpdateOne

ClearHustlerBeards clears all "hustler_beards" edges to the Hustler entity.

func (*BodyPartUpdateOne) ClearHustlerBodies

func (bpuo *BodyPartUpdateOne) ClearHustlerBodies() *BodyPartUpdateOne

ClearHustlerBodies clears all "hustler_bodies" edges to the Hustler entity.

func (*BodyPartUpdateOne) ClearHustlerHairs

func (bpuo *BodyPartUpdateOne) ClearHustlerHairs() *BodyPartUpdateOne

ClearHustlerHairs clears all "hustler_hairs" edges to the Hustler entity.

func (*BodyPartUpdateOne) ClearSprite

func (bpuo *BodyPartUpdateOne) ClearSprite() *BodyPartUpdateOne

ClearSprite clears the value of the "sprite" field.

func (*BodyPartUpdateOne) Exec

func (bpuo *BodyPartUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BodyPartUpdateOne) ExecX

func (bpuo *BodyPartUpdateOne) ExecX(ctx context.Context)

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

func (*BodyPartUpdateOne) Mutation

func (bpuo *BodyPartUpdateOne) Mutation() *BodyPartMutation

Mutation returns the BodyPartMutation object of the builder.

func (*BodyPartUpdateOne) RemoveHustlerBeardIDs

func (bpuo *BodyPartUpdateOne) RemoveHustlerBeardIDs(ids ...string) *BodyPartUpdateOne

RemoveHustlerBeardIDs removes the "hustler_beards" edge to Hustler entities by IDs.

func (*BodyPartUpdateOne) RemoveHustlerBeards

func (bpuo *BodyPartUpdateOne) RemoveHustlerBeards(h ...*Hustler) *BodyPartUpdateOne

RemoveHustlerBeards removes "hustler_beards" edges to Hustler entities.

func (*BodyPartUpdateOne) RemoveHustlerBodies

func (bpuo *BodyPartUpdateOne) RemoveHustlerBodies(h ...*Hustler) *BodyPartUpdateOne

RemoveHustlerBodies removes "hustler_bodies" edges to Hustler entities.

func (*BodyPartUpdateOne) RemoveHustlerBodyIDs

func (bpuo *BodyPartUpdateOne) RemoveHustlerBodyIDs(ids ...string) *BodyPartUpdateOne

RemoveHustlerBodyIDs removes the "hustler_bodies" edge to Hustler entities by IDs.

func (*BodyPartUpdateOne) RemoveHustlerHairIDs

func (bpuo *BodyPartUpdateOne) RemoveHustlerHairIDs(ids ...string) *BodyPartUpdateOne

RemoveHustlerHairIDs removes the "hustler_hairs" edge to Hustler entities by IDs.

func (*BodyPartUpdateOne) RemoveHustlerHairs

func (bpuo *BodyPartUpdateOne) RemoveHustlerHairs(h ...*Hustler) *BodyPartUpdateOne

RemoveHustlerHairs removes "hustler_hairs" edges to Hustler entities.

func (*BodyPartUpdateOne) Save

func (bpuo *BodyPartUpdateOne) Save(ctx context.Context) (*BodyPart, error)

Save executes the query and returns the updated BodyPart entity.

func (*BodyPartUpdateOne) SaveX

func (bpuo *BodyPartUpdateOne) SaveX(ctx context.Context) *BodyPart

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

func (*BodyPartUpdateOne) Select

func (bpuo *BodyPartUpdateOne) Select(field string, fields ...string) *BodyPartUpdateOne

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

func (*BodyPartUpdateOne) SetNillableSprite

func (bpuo *BodyPartUpdateOne) SetNillableSprite(s *string) *BodyPartUpdateOne

SetNillableSprite sets the "sprite" field if the given value is not nil.

func (*BodyPartUpdateOne) SetSprite

func (bpuo *BodyPartUpdateOne) SetSprite(s string) *BodyPartUpdateOne

SetSprite sets the "sprite" field.

type BodyPartUpsert

type BodyPartUpsert struct {
	*sql.UpdateSet
}

BodyPartUpsert is the "OnConflict" setter.

func (*BodyPartUpsert) ClearSprite

func (u *BodyPartUpsert) ClearSprite() *BodyPartUpsert

ClearSprite clears the value of the "sprite" field.

func (*BodyPartUpsert) SetRle

func (u *BodyPartUpsert) SetRle(v string) *BodyPartUpsert

SetRle sets the "rle" field.

func (*BodyPartUpsert) SetSex

func (u *BodyPartUpsert) SetSex(v bodypart.Sex) *BodyPartUpsert

SetSex sets the "sex" field.

func (*BodyPartUpsert) SetSprite

func (u *BodyPartUpsert) SetSprite(v string) *BodyPartUpsert

SetSprite sets the "sprite" field.

func (*BodyPartUpsert) SetType

func (u *BodyPartUpsert) SetType(v bodypart.Type) *BodyPartUpsert

SetType sets the "type" field.

func (*BodyPartUpsert) UpdateRle

func (u *BodyPartUpsert) UpdateRle() *BodyPartUpsert

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

func (*BodyPartUpsert) UpdateSex

func (u *BodyPartUpsert) UpdateSex() *BodyPartUpsert

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

func (*BodyPartUpsert) UpdateSprite

func (u *BodyPartUpsert) UpdateSprite() *BodyPartUpsert

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

func (*BodyPartUpsert) UpdateType

func (u *BodyPartUpsert) UpdateType() *BodyPartUpsert

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

type BodyPartUpsertBulk

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

BodyPartUpsertBulk is the builder for "upsert"-ing a bulk of BodyPart nodes.

func (*BodyPartUpsertBulk) ClearSprite

func (u *BodyPartUpsertBulk) ClearSprite() *BodyPartUpsertBulk

ClearSprite clears the value of the "sprite" field.

func (*BodyPartUpsertBulk) DoNothing

func (u *BodyPartUpsertBulk) DoNothing() *BodyPartUpsertBulk

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

func (*BodyPartUpsertBulk) Exec

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

Exec executes the query.

func (*BodyPartUpsertBulk) ExecX

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

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

func (*BodyPartUpsertBulk) Ignore

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

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

func (*BodyPartUpsertBulk) SetRle

SetRle sets the "rle" field.

func (*BodyPartUpsertBulk) SetSex

SetSex sets the "sex" field.

func (*BodyPartUpsertBulk) SetSprite

func (u *BodyPartUpsertBulk) SetSprite(v string) *BodyPartUpsertBulk

SetSprite sets the "sprite" field.

func (*BodyPartUpsertBulk) SetType

SetType sets the "type" field.

func (*BodyPartUpsertBulk) Update

func (u *BodyPartUpsertBulk) Update(set func(*BodyPartUpsert)) *BodyPartUpsertBulk

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

func (*BodyPartUpsertBulk) UpdateNewValues

func (u *BodyPartUpsertBulk) UpdateNewValues() *BodyPartUpsertBulk

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

client.BodyPart.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(bodypart.FieldID)
		}),
	).
	Exec(ctx)

func (*BodyPartUpsertBulk) UpdateRle

func (u *BodyPartUpsertBulk) UpdateRle() *BodyPartUpsertBulk

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

func (*BodyPartUpsertBulk) UpdateSex

func (u *BodyPartUpsertBulk) UpdateSex() *BodyPartUpsertBulk

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

func (*BodyPartUpsertBulk) UpdateSprite

func (u *BodyPartUpsertBulk) UpdateSprite() *BodyPartUpsertBulk

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

func (*BodyPartUpsertBulk) UpdateType

func (u *BodyPartUpsertBulk) UpdateType() *BodyPartUpsertBulk

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

type BodyPartUpsertOne

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

BodyPartUpsertOne is the builder for "upsert"-ing

one BodyPart node.

func (*BodyPartUpsertOne) ClearSprite

func (u *BodyPartUpsertOne) ClearSprite() *BodyPartUpsertOne

ClearSprite clears the value of the "sprite" field.

func (*BodyPartUpsertOne) DoNothing

func (u *BodyPartUpsertOne) DoNothing() *BodyPartUpsertOne

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

func (*BodyPartUpsertOne) Exec

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

Exec executes the query.

func (*BodyPartUpsertOne) ExecX

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

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

func (*BodyPartUpsertOne) ID

func (u *BodyPartUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*BodyPartUpsertOne) IDX

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

func (*BodyPartUpsertOne) Ignore

func (u *BodyPartUpsertOne) Ignore() *BodyPartUpsertOne

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

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

func (*BodyPartUpsertOne) SetRle

SetRle sets the "rle" field.

func (*BodyPartUpsertOne) SetSex

SetSex sets the "sex" field.

func (*BodyPartUpsertOne) SetSprite

func (u *BodyPartUpsertOne) SetSprite(v string) *BodyPartUpsertOne

SetSprite sets the "sprite" field.

func (*BodyPartUpsertOne) SetType

SetType sets the "type" field.

func (*BodyPartUpsertOne) Update

func (u *BodyPartUpsertOne) Update(set func(*BodyPartUpsert)) *BodyPartUpsertOne

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

func (*BodyPartUpsertOne) UpdateNewValues

func (u *BodyPartUpsertOne) UpdateNewValues() *BodyPartUpsertOne

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.BodyPart.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(bodypart.FieldID)
		}),
	).
	Exec(ctx)

func (*BodyPartUpsertOne) UpdateRle

func (u *BodyPartUpsertOne) UpdateRle() *BodyPartUpsertOne

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

func (*BodyPartUpsertOne) UpdateSex

func (u *BodyPartUpsertOne) UpdateSex() *BodyPartUpsertOne

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

func (*BodyPartUpsertOne) UpdateSprite

func (u *BodyPartUpsertOne) UpdateSprite() *BodyPartUpsertOne

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

func (*BodyPartUpsertOne) UpdateType

func (u *BodyPartUpsertOne) UpdateType() *BodyPartUpsertOne

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

type BodyPartWhereInput

type BodyPartWhereInput struct {
	Not *BodyPartWhereInput   `json:"not,omitempty"`
	Or  []*BodyPartWhereInput `json:"or,omitempty"`
	And []*BodyPartWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "type" field predicates.
	Type      *bodypart.Type  `json:"type,omitempty"`
	TypeNEQ   *bodypart.Type  `json:"typeNEQ,omitempty"`
	TypeIn    []bodypart.Type `json:"typeIn,omitempty"`
	TypeNotIn []bodypart.Type `json:"typeNotIn,omitempty"`

	// "sex" field predicates.
	Sex      *bodypart.Sex  `json:"sex,omitempty"`
	SexNEQ   *bodypart.Sex  `json:"sexNEQ,omitempty"`
	SexIn    []bodypart.Sex `json:"sexIn,omitempty"`
	SexNotIn []bodypart.Sex `json:"sexNotIn,omitempty"`

	// "rle" field predicates.
	Rle             *string  `json:"rle,omitempty"`
	RleNEQ          *string  `json:"rleNEQ,omitempty"`
	RleIn           []string `json:"rleIn,omitempty"`
	RleNotIn        []string `json:"rleNotIn,omitempty"`
	RleGT           *string  `json:"rleGT,omitempty"`
	RleGTE          *string  `json:"rleGTE,omitempty"`
	RleLT           *string  `json:"rleLT,omitempty"`
	RleLTE          *string  `json:"rleLTE,omitempty"`
	RleContains     *string  `json:"rleContains,omitempty"`
	RleHasPrefix    *string  `json:"rleHasPrefix,omitempty"`
	RleHasSuffix    *string  `json:"rleHasSuffix,omitempty"`
	RleEqualFold    *string  `json:"rleEqualFold,omitempty"`
	RleContainsFold *string  `json:"rleContainsFold,omitempty"`

	// "sprite" field predicates.
	Sprite             *string  `json:"sprite,omitempty"`
	SpriteNEQ          *string  `json:"spriteNEQ,omitempty"`
	SpriteIn           []string `json:"spriteIn,omitempty"`
	SpriteNotIn        []string `json:"spriteNotIn,omitempty"`
	SpriteGT           *string  `json:"spriteGT,omitempty"`
	SpriteGTE          *string  `json:"spriteGTE,omitempty"`
	SpriteLT           *string  `json:"spriteLT,omitempty"`
	SpriteLTE          *string  `json:"spriteLTE,omitempty"`
	SpriteContains     *string  `json:"spriteContains,omitempty"`
	SpriteHasPrefix    *string  `json:"spriteHasPrefix,omitempty"`
	SpriteHasSuffix    *string  `json:"spriteHasSuffix,omitempty"`
	SpriteIsNil        bool     `json:"spriteIsNil,omitempty"`
	SpriteNotNil       bool     `json:"spriteNotNil,omitempty"`
	SpriteEqualFold    *string  `json:"spriteEqualFold,omitempty"`
	SpriteContainsFold *string  `json:"spriteContainsFold,omitempty"`

	// "hustler_bodies" edge predicates.
	HasHustlerBodies     *bool                `json:"hasHustlerBodies,omitempty"`
	HasHustlerBodiesWith []*HustlerWhereInput `json:"hasHustlerBodiesWith,omitempty"`

	// "hustler_hairs" edge predicates.
	HasHustlerHairs     *bool                `json:"hasHustlerHairs,omitempty"`
	HasHustlerHairsWith []*HustlerWhereInput `json:"hasHustlerHairsWith,omitempty"`

	// "hustler_beards" edge predicates.
	HasHustlerBeards     *bool                `json:"hasHustlerBeards,omitempty"`
	HasHustlerBeardsWith []*HustlerWhereInput `json:"hasHustlerBeardsWith,omitempty"`
}

BodyPartWhereInput represents a where input for filtering BodyPart queries.

func (*BodyPartWhereInput) Filter

Filter applies the BodyPartWhereInput filter on the BodyPartQuery builder.

func (*BodyPartWhereInput) P

P returns a predicate for filtering bodyparts. An error is returned if the input is empty or invalid.

type BodyParts

type BodyParts []*BodyPart

BodyParts is a parsable slice of BodyPart.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Amount is the client for interacting with the Amount builders.
	Amount *AmountClient
	// BodyPart is the client for interacting with the BodyPart builders.
	BodyPart *BodyPartClient
	// Dope is the client for interacting with the Dope builders.
	Dope *DopeClient
	// Event is the client for interacting with the Event builders.
	Event *EventClient
	// GameHustler is the client for interacting with the GameHustler builders.
	GameHustler *GameHustlerClient
	// GameHustlerItem is the client for interacting with the GameHustlerItem builders.
	GameHustlerItem *GameHustlerItemClient
	// GameHustlerQuest is the client for interacting with the GameHustlerQuest builders.
	GameHustlerQuest *GameHustlerQuestClient
	// GameHustlerRelation is the client for interacting with the GameHustlerRelation builders.
	GameHustlerRelation *GameHustlerRelationClient
	// Hustler is the client for interacting with the Hustler builders.
	Hustler *HustlerClient
	// Item is the client for interacting with the Item builders.
	Item *ItemClient
	// Listing is the client for interacting with the Listing builders.
	Listing *ListingClient
	// Search is the client for interacting with the Search builders.
	Search *SearchClient
	// SyncState is the client for interacting with the SyncState builders.
	SyncState *SyncStateClient
	// Wallet is the client for interacting with the Wallet builders.
	Wallet *WalletClient
	// WalletItems is the client for interacting with the WalletItems builders.
	WalletItems *WalletItemsClient
	// 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().
	Amount.
	Query().
	Count(ctx)

func (*Client) Node

func (c *Client) Node(ctx context.Context, id string) (*Node, error)

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id string, 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(pet.Table))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []string, 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) RefreshSearchIndex

func (c *Client) RefreshSearchIndex(ctx context.Context) error

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Cursor

type Cursor struct {
	ID    string `msgpack:"i"`
	Value Value  `msgpack:"v,omitempty"`
}

Cursor of an edge type.

func (Cursor) MarshalGQL

func (c Cursor) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (*Cursor) UnmarshalGQL

func (c *Cursor) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type Dope

type Dope struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Claimed holds the value of the "claimed" field.
	Claimed bool `json:"claimed,omitempty"`
	// Opened holds the value of the "opened" field.
	Opened bool `json:"opened,omitempty"`
	// Score holds the value of the "score" field.
	Score int `json:"score,omitempty"`
	// Rank holds the value of the "rank" field.
	Rank int `json:"rank,omitempty"`
	// Order holds the value of the "order" field.
	Order int `json:"order,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DopeQuery when eager-loading is set.
	Edges DopeEdges `json:"edges"`
	// contains filtered or unexported fields
}

Dope is the model entity for the Dope schema.

func (*Dope) Index

func (d *Dope) Index(ctx context.Context) (*Search, error)

func (*Dope) IsSearchResult

func (*Dope) IsSearchResult()

func (*Dope) IsToken

func (*Dope) IsToken()

func (*Dope) Items

func (d *Dope) Items(ctx context.Context) ([]*Item, error)

func (*Dope) LastSale

func (d *Dope) LastSale(ctx context.Context) (*Listing, error)

func (*Dope) Listings

func (d *Dope) Listings(ctx context.Context) ([]*Listing, error)

func (*Dope) Node

func (d *Dope) Node(ctx context.Context) (node *Node, err error)

func (*Dope) QueryIndex

func (d *Dope) QueryIndex() *SearchQuery

QueryIndex queries the "index" edge of the Dope entity.

func (*Dope) QueryItems

func (d *Dope) QueryItems() *ItemQuery

QueryItems queries the "items" edge of the Dope entity.

func (*Dope) QueryLastSale

func (d *Dope) QueryLastSale() *ListingQuery

QueryLastSale queries the "last_sale" edge of the Dope entity.

func (*Dope) QueryListings

func (d *Dope) QueryListings() *ListingQuery

QueryListings queries the "listings" edge of the Dope entity.

func (*Dope) QueryWallet

func (d *Dope) QueryWallet() *WalletQuery

QueryWallet queries the "wallet" edge of the Dope entity.

func (*Dope) String

func (d *Dope) String() string

String implements the fmt.Stringer.

func (*Dope) ToEdge

func (d *Dope) ToEdge(order *DopeOrder) *DopeEdge

ToEdge converts Dope into DopeEdge.

func (*Dope) Unwrap

func (d *Dope) Unwrap() *Dope

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

func (d *Dope) Update() *DopeUpdateOne

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

func (*Dope) Wallet

func (d *Dope) Wallet(ctx context.Context) (*Wallet, error)

type DopeClient

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

DopeClient is a client for the Dope schema.

func NewDopeClient

func NewDopeClient(c config) *DopeClient

NewDopeClient returns a client for the Dope from the given config.

func (*DopeClient) Create

func (c *DopeClient) Create() *DopeCreate

Create returns a create builder for Dope.

func (*DopeClient) CreateBulk

func (c *DopeClient) CreateBulk(builders ...*DopeCreate) *DopeCreateBulk

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

func (*DopeClient) Delete

func (c *DopeClient) Delete() *DopeDelete

Delete returns a delete builder for Dope.

func (*DopeClient) DeleteOne

func (c *DopeClient) DeleteOne(d *Dope) *DopeDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*DopeClient) DeleteOneID

func (c *DopeClient) DeleteOneID(id string) *DopeDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*DopeClient) Get

func (c *DopeClient) Get(ctx context.Context, id string) (*Dope, error)

Get returns a Dope entity by its id.

func (*DopeClient) GetX

func (c *DopeClient) GetX(ctx context.Context, id string) *Dope

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

func (*DopeClient) Hooks

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

Hooks returns the client hooks.

func (*DopeClient) Query

func (c *DopeClient) Query() *DopeQuery

Query returns a query builder for Dope.

func (*DopeClient) QueryIndex

func (c *DopeClient) QueryIndex(d *Dope) *SearchQuery

QueryIndex queries the index edge of a Dope.

func (*DopeClient) QueryItems

func (c *DopeClient) QueryItems(d *Dope) *ItemQuery

QueryItems queries the items edge of a Dope.

func (*DopeClient) QueryLastSale

func (c *DopeClient) QueryLastSale(d *Dope) *ListingQuery

QueryLastSale queries the last_sale edge of a Dope.

func (*DopeClient) QueryListings

func (c *DopeClient) QueryListings(d *Dope) *ListingQuery

QueryListings queries the listings edge of a Dope.

func (*DopeClient) QueryWallet

func (c *DopeClient) QueryWallet(d *Dope) *WalletQuery

QueryWallet queries the wallet edge of a Dope.

func (*DopeClient) Update

func (c *DopeClient) Update() *DopeUpdate

Update returns an update builder for Dope.

func (*DopeClient) UpdateOne

func (c *DopeClient) UpdateOne(d *Dope) *DopeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DopeClient) UpdateOneID

func (c *DopeClient) UpdateOneID(id string) *DopeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DopeClient) Use

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

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

type DopeConnection

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

DopeConnection is the connection containing edges to Dope.

type DopeCreate

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

DopeCreate is the builder for creating a Dope entity.

func (*DopeCreate) AddItemIDs

func (dc *DopeCreate) AddItemIDs(ids ...string) *DopeCreate

AddItemIDs adds the "items" edge to the Item entity by IDs.

func (*DopeCreate) AddItems

func (dc *DopeCreate) AddItems(i ...*Item) *DopeCreate

AddItems adds the "items" edges to the Item entity.

func (*DopeCreate) AddListingIDs

func (dc *DopeCreate) AddListingIDs(ids ...string) *DopeCreate

AddListingIDs adds the "listings" edge to the Listing entity by IDs.

func (*DopeCreate) AddListings

func (dc *DopeCreate) AddListings(l ...*Listing) *DopeCreate

AddListings adds the "listings" edges to the Listing entity.

func (*DopeCreate) Exec

func (dc *DopeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DopeCreate) ExecX

func (dc *DopeCreate) ExecX(ctx context.Context)

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

func (*DopeCreate) Mutation

func (dc *DopeCreate) Mutation() *DopeMutation

Mutation returns the DopeMutation object of the builder.

func (*DopeCreate) OnConflict

func (dc *DopeCreate) OnConflict(opts ...sql.ConflictOption) *DopeUpsertOne

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

client.Dope.Create().
	SetClaimed(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.DopeUpsert) {
		SetClaimed(v+v).
	}).
	Exec(ctx)

func (*DopeCreate) OnConflictColumns

func (dc *DopeCreate) OnConflictColumns(columns ...string) *DopeUpsertOne

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

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

func (*DopeCreate) Save

func (dc *DopeCreate) Save(ctx context.Context) (*Dope, error)

Save creates the Dope in the database.

func (*DopeCreate) SaveX

func (dc *DopeCreate) SaveX(ctx context.Context) *Dope

SaveX calls Save and panics if Save returns an error.

func (*DopeCreate) SetClaimed

func (dc *DopeCreate) SetClaimed(b bool) *DopeCreate

SetClaimed sets the "claimed" field.

func (*DopeCreate) SetID

func (dc *DopeCreate) SetID(s string) *DopeCreate

SetID sets the "id" field.

func (*DopeCreate) SetIndex

func (dc *DopeCreate) SetIndex(s *Search) *DopeCreate

SetIndex sets the "index" edge to the Search entity.

func (*DopeCreate) SetIndexID

func (dc *DopeCreate) SetIndexID(id string) *DopeCreate

SetIndexID sets the "index" edge to the Search entity by ID.

func (*DopeCreate) SetLastSale

func (dc *DopeCreate) SetLastSale(l *Listing) *DopeCreate

SetLastSale sets the "last_sale" edge to the Listing entity.

func (*DopeCreate) SetLastSaleID

func (dc *DopeCreate) SetLastSaleID(id string) *DopeCreate

SetLastSaleID sets the "last_sale" edge to the Listing entity by ID.

func (*DopeCreate) SetNillableClaimed

func (dc *DopeCreate) SetNillableClaimed(b *bool) *DopeCreate

SetNillableClaimed sets the "claimed" field if the given value is not nil.

func (*DopeCreate) SetNillableIndexID

func (dc *DopeCreate) SetNillableIndexID(id *string) *DopeCreate

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*DopeCreate) SetNillableLastSaleID

func (dc *DopeCreate) SetNillableLastSaleID(id *string) *DopeCreate

SetNillableLastSaleID sets the "last_sale" edge to the Listing entity by ID if the given value is not nil.

func (*DopeCreate) SetNillableOpened

func (dc *DopeCreate) SetNillableOpened(b *bool) *DopeCreate

SetNillableOpened sets the "opened" field if the given value is not nil.

func (*DopeCreate) SetNillableRank

func (dc *DopeCreate) SetNillableRank(i *int) *DopeCreate

SetNillableRank sets the "rank" field if the given value is not nil.

func (*DopeCreate) SetNillableScore

func (dc *DopeCreate) SetNillableScore(i *int) *DopeCreate

SetNillableScore sets the "score" field if the given value is not nil.

func (*DopeCreate) SetNillableWalletID

func (dc *DopeCreate) SetNillableWalletID(id *string) *DopeCreate

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*DopeCreate) SetOpened

func (dc *DopeCreate) SetOpened(b bool) *DopeCreate

SetOpened sets the "opened" field.

func (*DopeCreate) SetOrder

func (dc *DopeCreate) SetOrder(i int) *DopeCreate

SetOrder sets the "order" field.

func (*DopeCreate) SetRank

func (dc *DopeCreate) SetRank(i int) *DopeCreate

SetRank sets the "rank" field.

func (*DopeCreate) SetScore

func (dc *DopeCreate) SetScore(i int) *DopeCreate

SetScore sets the "score" field.

func (*DopeCreate) SetWallet

func (dc *DopeCreate) SetWallet(w *Wallet) *DopeCreate

SetWallet sets the "wallet" edge to the Wallet entity.

func (*DopeCreate) SetWalletID

func (dc *DopeCreate) SetWalletID(id string) *DopeCreate

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

type DopeCreateBulk

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

DopeCreateBulk is the builder for creating many Dope entities in bulk.

func (*DopeCreateBulk) Exec

func (dcb *DopeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DopeCreateBulk) ExecX

func (dcb *DopeCreateBulk) ExecX(ctx context.Context)

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

func (*DopeCreateBulk) OnConflict

func (dcb *DopeCreateBulk) OnConflict(opts ...sql.ConflictOption) *DopeUpsertBulk

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

client.Dope.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.DopeUpsert) {
		SetClaimed(v+v).
	}).
	Exec(ctx)

func (*DopeCreateBulk) OnConflictColumns

func (dcb *DopeCreateBulk) OnConflictColumns(columns ...string) *DopeUpsertBulk

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

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

func (*DopeCreateBulk) Save

func (dcb *DopeCreateBulk) Save(ctx context.Context) ([]*Dope, error)

Save creates the Dope entities in the database.

func (*DopeCreateBulk) SaveX

func (dcb *DopeCreateBulk) SaveX(ctx context.Context) []*Dope

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

type DopeDelete

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

DopeDelete is the builder for deleting a Dope entity.

func (*DopeDelete) Exec

func (dd *DopeDelete) Exec(ctx context.Context) (int, error)

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

func (*DopeDelete) ExecX

func (dd *DopeDelete) ExecX(ctx context.Context) int

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

func (*DopeDelete) Where

func (dd *DopeDelete) Where(ps ...predicate.Dope) *DopeDelete

Where appends a list predicates to the DopeDelete builder.

type DopeDeleteOne

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

DopeDeleteOne is the builder for deleting a single Dope entity.

func (*DopeDeleteOne) Exec

func (ddo *DopeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DopeDeleteOne) ExecX

func (ddo *DopeDeleteOne) ExecX(ctx context.Context)

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

type DopeEdge

type DopeEdge struct {
	Node   *Dope  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

DopeEdge is the edge representation of Dope.

type DopeEdges

type DopeEdges struct {
	// Wallet holds the value of the wallet edge.
	Wallet *Wallet `json:"wallet,omitempty"`
	// LastSale holds the value of the last_sale edge.
	LastSale *Listing `json:"last_sale,omitempty"`
	// Listings holds the value of the listings edge.
	Listings []*Listing `json:"listings,omitempty"`
	// Items holds the value of the items edge.
	Items []*Item `json:"items,omitempty"`
	// Index holds the value of the index edge.
	Index *Search `json:"index,omitempty"`
	// contains filtered or unexported fields
}

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

func (DopeEdges) IndexOrErr

func (e DopeEdges) IndexOrErr() (*Search, error)

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

func (DopeEdges) ItemsOrErr

func (e DopeEdges) ItemsOrErr() ([]*Item, error)

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

func (DopeEdges) LastSaleOrErr

func (e DopeEdges) LastSaleOrErr() (*Listing, error)

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

func (DopeEdges) ListingsOrErr

func (e DopeEdges) ListingsOrErr() ([]*Listing, error)

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

func (DopeEdges) WalletOrErr

func (e DopeEdges) WalletOrErr() (*Wallet, error)

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

type DopeGroupBy

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

DopeGroupBy is the group-by builder for Dope entities.

func (*DopeGroupBy) Aggregate

func (dgb *DopeGroupBy) Aggregate(fns ...AggregateFunc) *DopeGroupBy

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

func (*DopeGroupBy) Bool

func (dgb *DopeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DopeGroupBy) BoolX

func (dgb *DopeGroupBy) BoolX(ctx context.Context) bool

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

func (*DopeGroupBy) Bools

func (dgb *DopeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*DopeGroupBy) BoolsX

func (dgb *DopeGroupBy) BoolsX(ctx context.Context) []bool

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

func (*DopeGroupBy) Float64

func (dgb *DopeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DopeGroupBy) Float64X

func (dgb *DopeGroupBy) Float64X(ctx context.Context) float64

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

func (*DopeGroupBy) Float64s

func (dgb *DopeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*DopeGroupBy) Float64sX

func (dgb *DopeGroupBy) Float64sX(ctx context.Context) []float64

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

func (*DopeGroupBy) Int

func (dgb *DopeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DopeGroupBy) IntX

func (dgb *DopeGroupBy) IntX(ctx context.Context) int

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

func (*DopeGroupBy) Ints

func (dgb *DopeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*DopeGroupBy) IntsX

func (dgb *DopeGroupBy) IntsX(ctx context.Context) []int

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

func (*DopeGroupBy) Scan

func (dgb *DopeGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*DopeGroupBy) ScanX

func (dgb *DopeGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*DopeGroupBy) String

func (dgb *DopeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DopeGroupBy) StringX

func (dgb *DopeGroupBy) StringX(ctx context.Context) string

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

func (*DopeGroupBy) Strings

func (dgb *DopeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*DopeGroupBy) StringsX

func (dgb *DopeGroupBy) StringsX(ctx context.Context) []string

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

type DopeMutation

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

DopeMutation represents an operation that mutates the Dope nodes in the graph.

func (*DopeMutation) AddField

func (m *DopeMutation) 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 (*DopeMutation) AddItemIDs

func (m *DopeMutation) AddItemIDs(ids ...string)

AddItemIDs adds the "items" edge to the Item entity by ids.

func (*DopeMutation) AddListingIDs

func (m *DopeMutation) AddListingIDs(ids ...string)

AddListingIDs adds the "listings" edge to the Listing entity by ids.

func (*DopeMutation) AddOrder

func (m *DopeMutation) AddOrder(i int)

AddOrder adds i to the "order" field.

func (*DopeMutation) AddRank

func (m *DopeMutation) AddRank(i int)

AddRank adds i to the "rank" field.

func (*DopeMutation) AddScore

func (m *DopeMutation) AddScore(i int)

AddScore adds i to the "score" field.

func (*DopeMutation) AddedEdges

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

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

func (*DopeMutation) AddedField

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

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

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

func (*DopeMutation) AddedIDs

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

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

func (*DopeMutation) AddedOrder

func (m *DopeMutation) AddedOrder() (r int, exists bool)

AddedOrder returns the value that was added to the "order" field in this mutation.

func (*DopeMutation) AddedRank

func (m *DopeMutation) AddedRank() (r int, exists bool)

AddedRank returns the value that was added to the "rank" field in this mutation.

func (*DopeMutation) AddedScore

func (m *DopeMutation) AddedScore() (r int, exists bool)

AddedScore returns the value that was added to the "score" field in this mutation.

func (*DopeMutation) Claimed

func (m *DopeMutation) Claimed() (r bool, exists bool)

Claimed returns the value of the "claimed" field in the mutation.

func (*DopeMutation) ClearEdge

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

func (m *DopeMutation) 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 (*DopeMutation) ClearIndex

func (m *DopeMutation) ClearIndex()

ClearIndex clears the "index" edge to the Search entity.

func (*DopeMutation) ClearItems

func (m *DopeMutation) ClearItems()

ClearItems clears the "items" edge to the Item entity.

func (*DopeMutation) ClearLastSale

func (m *DopeMutation) ClearLastSale()

ClearLastSale clears the "last_sale" edge to the Listing entity.

func (*DopeMutation) ClearListings

func (m *DopeMutation) ClearListings()

ClearListings clears the "listings" edge to the Listing entity.

func (*DopeMutation) ClearRank

func (m *DopeMutation) ClearRank()

ClearRank clears the value of the "rank" field.

func (*DopeMutation) ClearScore

func (m *DopeMutation) ClearScore()

ClearScore clears the value of the "score" field.

func (*DopeMutation) ClearWallet

func (m *DopeMutation) ClearWallet()

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*DopeMutation) ClearedEdges

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

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

func (*DopeMutation) ClearedFields

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

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

func (DopeMutation) Client

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

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

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

func (*DopeMutation) Field

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

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

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

func (*DopeMutation) Fields

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

func (m *DopeMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DopeMutation) IDs

func (m *DopeMutation) IDs(ctx context.Context) ([]string, error)

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

func (*DopeMutation) IndexCleared

func (m *DopeMutation) IndexCleared() bool

IndexCleared reports if the "index" edge to the Search entity was cleared.

func (*DopeMutation) IndexID

func (m *DopeMutation) IndexID() (id string, exists bool)

IndexID returns the "index" edge ID in the mutation.

func (*DopeMutation) IndexIDs

func (m *DopeMutation) IndexIDs() (ids []string)

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

func (*DopeMutation) ItemsCleared

func (m *DopeMutation) ItemsCleared() bool

ItemsCleared reports if the "items" edge to the Item entity was cleared.

func (*DopeMutation) ItemsIDs

func (m *DopeMutation) ItemsIDs() (ids []string)

ItemsIDs returns the "items" edge IDs in the mutation.

func (*DopeMutation) LastSaleCleared

func (m *DopeMutation) LastSaleCleared() bool

LastSaleCleared reports if the "last_sale" edge to the Listing entity was cleared.

func (*DopeMutation) LastSaleID

func (m *DopeMutation) LastSaleID() (id string, exists bool)

LastSaleID returns the "last_sale" edge ID in the mutation.

func (*DopeMutation) LastSaleIDs

func (m *DopeMutation) LastSaleIDs() (ids []string)

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

func (*DopeMutation) ListingsCleared

func (m *DopeMutation) ListingsCleared() bool

ListingsCleared reports if the "listings" edge to the Listing entity was cleared.

func (*DopeMutation) ListingsIDs

func (m *DopeMutation) ListingsIDs() (ids []string)

ListingsIDs returns the "listings" edge IDs in the mutation.

func (*DopeMutation) OldClaimed

func (m *DopeMutation) OldClaimed(ctx context.Context) (v bool, err error)

OldClaimed returns the old "claimed" field's value of the Dope entity. If the Dope 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 (*DopeMutation) OldField

func (m *DopeMutation) 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 (*DopeMutation) OldOpened

func (m *DopeMutation) OldOpened(ctx context.Context) (v bool, err error)

OldOpened returns the old "opened" field's value of the Dope entity. If the Dope 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 (*DopeMutation) OldOrder

func (m *DopeMutation) OldOrder(ctx context.Context) (v int, err error)

OldOrder returns the old "order" field's value of the Dope entity. If the Dope 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 (*DopeMutation) OldRank

func (m *DopeMutation) OldRank(ctx context.Context) (v int, err error)

OldRank returns the old "rank" field's value of the Dope entity. If the Dope 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 (*DopeMutation) OldScore

func (m *DopeMutation) OldScore(ctx context.Context) (v int, err error)

OldScore returns the old "score" field's value of the Dope entity. If the Dope 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 (*DopeMutation) Op

func (m *DopeMutation) Op() Op

Op returns the operation name.

func (*DopeMutation) Opened

func (m *DopeMutation) Opened() (r bool, exists bool)

Opened returns the value of the "opened" field in the mutation.

func (*DopeMutation) Order

func (m *DopeMutation) Order() (r int, exists bool)

Order returns the value of the "order" field in the mutation.

func (*DopeMutation) Rank

func (m *DopeMutation) Rank() (r int, exists bool)

Rank returns the value of the "rank" field in the mutation.

func (*DopeMutation) RankCleared

func (m *DopeMutation) RankCleared() bool

RankCleared returns if the "rank" field was cleared in this mutation.

func (*DopeMutation) RemoveItemIDs

func (m *DopeMutation) RemoveItemIDs(ids ...string)

RemoveItemIDs removes the "items" edge to the Item entity by IDs.

func (*DopeMutation) RemoveListingIDs

func (m *DopeMutation) RemoveListingIDs(ids ...string)

RemoveListingIDs removes the "listings" edge to the Listing entity by IDs.

func (*DopeMutation) RemovedEdges

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

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

func (*DopeMutation) RemovedIDs

func (m *DopeMutation) 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 (*DopeMutation) RemovedItemsIDs

func (m *DopeMutation) RemovedItemsIDs() (ids []string)

RemovedItems returns the removed IDs of the "items" edge to the Item entity.

func (*DopeMutation) RemovedListingsIDs

func (m *DopeMutation) RemovedListingsIDs() (ids []string)

RemovedListings returns the removed IDs of the "listings" edge to the Listing entity.

func (*DopeMutation) ResetClaimed

func (m *DopeMutation) ResetClaimed()

ResetClaimed resets all changes to the "claimed" field.

func (*DopeMutation) ResetEdge

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

func (m *DopeMutation) 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 (*DopeMutation) ResetIndex

func (m *DopeMutation) ResetIndex()

ResetIndex resets all changes to the "index" edge.

func (*DopeMutation) ResetItems

func (m *DopeMutation) ResetItems()

ResetItems resets all changes to the "items" edge.

func (*DopeMutation) ResetLastSale

func (m *DopeMutation) ResetLastSale()

ResetLastSale resets all changes to the "last_sale" edge.

func (*DopeMutation) ResetListings

func (m *DopeMutation) ResetListings()

ResetListings resets all changes to the "listings" edge.

func (*DopeMutation) ResetOpened

func (m *DopeMutation) ResetOpened()

ResetOpened resets all changes to the "opened" field.

func (*DopeMutation) ResetOrder

func (m *DopeMutation) ResetOrder()

ResetOrder resets all changes to the "order" field.

func (*DopeMutation) ResetRank

func (m *DopeMutation) ResetRank()

ResetRank resets all changes to the "rank" field.

func (*DopeMutation) ResetScore

func (m *DopeMutation) ResetScore()

ResetScore resets all changes to the "score" field.

func (*DopeMutation) ResetWallet

func (m *DopeMutation) ResetWallet()

ResetWallet resets all changes to the "wallet" edge.

func (*DopeMutation) Score

func (m *DopeMutation) Score() (r int, exists bool)

Score returns the value of the "score" field in the mutation.

func (*DopeMutation) ScoreCleared

func (m *DopeMutation) ScoreCleared() bool

ScoreCleared returns if the "score" field was cleared in this mutation.

func (*DopeMutation) SetClaimed

func (m *DopeMutation) SetClaimed(b bool)

SetClaimed sets the "claimed" field.

func (*DopeMutation) SetField

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

func (m *DopeMutation) SetID(id string)

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

func (*DopeMutation) SetIndexID

func (m *DopeMutation) SetIndexID(id string)

SetIndexID sets the "index" edge to the Search entity by id.

func (*DopeMutation) SetLastSaleID

func (m *DopeMutation) SetLastSaleID(id string)

SetLastSaleID sets the "last_sale" edge to the Listing entity by id.

func (*DopeMutation) SetOpened

func (m *DopeMutation) SetOpened(b bool)

SetOpened sets the "opened" field.

func (*DopeMutation) SetOrder

func (m *DopeMutation) SetOrder(i int)

SetOrder sets the "order" field.

func (*DopeMutation) SetRank

func (m *DopeMutation) SetRank(i int)

SetRank sets the "rank" field.

func (*DopeMutation) SetScore

func (m *DopeMutation) SetScore(i int)

SetScore sets the "score" field.

func (*DopeMutation) SetWalletID

func (m *DopeMutation) SetWalletID(id string)

SetWalletID sets the "wallet" edge to the Wallet entity by id.

func (DopeMutation) Tx

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

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

func (*DopeMutation) Type

func (m *DopeMutation) Type() string

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

func (*DopeMutation) WalletCleared

func (m *DopeMutation) WalletCleared() bool

WalletCleared reports if the "wallet" edge to the Wallet entity was cleared.

func (*DopeMutation) WalletID

func (m *DopeMutation) WalletID() (id string, exists bool)

WalletID returns the "wallet" edge ID in the mutation.

func (*DopeMutation) WalletIDs

func (m *DopeMutation) WalletIDs() (ids []string)

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

func (*DopeMutation) Where

func (m *DopeMutation) Where(ps ...predicate.Dope)

Where appends a list predicates to the DopeMutation builder.

type DopeOrder

type DopeOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *DopeOrderField `json:"field"`
}

DopeOrder defines the ordering of Dope.

type DopeOrderField

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

DopeOrderField defines the ordering field of Dope.

func (DopeOrderField) MarshalGQL

func (f DopeOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (DopeOrderField) String

func (f DopeOrderField) String() string

String implement fmt.Stringer interface.

func (*DopeOrderField) UnmarshalGQL

func (f *DopeOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type DopePaginateOption

type DopePaginateOption func(*dopePager) error

DopePaginateOption enables pagination customization.

func WithDopeFilter

func WithDopeFilter(filter func(*DopeQuery) (*DopeQuery, error)) DopePaginateOption

WithDopeFilter configures pagination filter.

func WithDopeOrder

func WithDopeOrder(order *DopeOrder) DopePaginateOption

WithDopeOrder configures pagination ordering.

type DopeQuery

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

DopeQuery is the builder for querying Dope entities.

func (*DopeQuery) All

func (dq *DopeQuery) All(ctx context.Context) ([]*Dope, error)

All executes the query and returns a list of Dopes.

func (*DopeQuery) AllX

func (dq *DopeQuery) AllX(ctx context.Context) []*Dope

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

func (*DopeQuery) Clone

func (dq *DopeQuery) Clone() *DopeQuery

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

func (*DopeQuery) CollectFields

func (d *DopeQuery) CollectFields(ctx context.Context, satisfies ...string) *DopeQuery

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

func (*DopeQuery) Count

func (dq *DopeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DopeQuery) CountX

func (dq *DopeQuery) CountX(ctx context.Context) int

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

func (*DopeQuery) Exist

func (dq *DopeQuery) Exist(ctx context.Context) (bool, error)

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

func (*DopeQuery) ExistX

func (dq *DopeQuery) ExistX(ctx context.Context) bool

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

func (*DopeQuery) First

func (dq *DopeQuery) First(ctx context.Context) (*Dope, error)

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

func (*DopeQuery) FirstID

func (dq *DopeQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*DopeQuery) FirstIDX

func (dq *DopeQuery) FirstIDX(ctx context.Context) string

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

func (*DopeQuery) FirstX

func (dq *DopeQuery) FirstX(ctx context.Context) *Dope

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

func (*DopeQuery) GroupBy

func (dq *DopeQuery) GroupBy(field string, fields ...string) *DopeGroupBy

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

client.Dope.Query().
	GroupBy(dope.FieldClaimed).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DopeQuery) IDs

func (dq *DopeQuery) IDs(ctx context.Context) ([]string, error)

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

func (*DopeQuery) IDsX

func (dq *DopeQuery) IDsX(ctx context.Context) []string

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

func (*DopeQuery) Limit

func (dq *DopeQuery) Limit(limit int) *DopeQuery

Limit adds a limit step to the query.

func (*DopeQuery) Offset

func (dq *DopeQuery) Offset(offset int) *DopeQuery

Offset adds an offset step to the query.

func (*DopeQuery) Only

func (dq *DopeQuery) Only(ctx context.Context) (*Dope, error)

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

func (*DopeQuery) OnlyID

func (dq *DopeQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*DopeQuery) OnlyIDX

func (dq *DopeQuery) OnlyIDX(ctx context.Context) string

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

func (*DopeQuery) OnlyX

func (dq *DopeQuery) OnlyX(ctx context.Context) *Dope

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

func (*DopeQuery) Order

func (dq *DopeQuery) Order(o ...OrderFunc) *DopeQuery

Order adds an order step to the query.

func (*DopeQuery) Paginate

func (d *DopeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DopePaginateOption,
) (*DopeConnection, error)

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

func (*DopeQuery) QueryIndex

func (dq *DopeQuery) QueryIndex() *SearchQuery

QueryIndex chains the current query on the "index" edge.

func (*DopeQuery) QueryItems

func (dq *DopeQuery) QueryItems() *ItemQuery

QueryItems chains the current query on the "items" edge.

func (*DopeQuery) QueryLastSale

func (dq *DopeQuery) QueryLastSale() *ListingQuery

QueryLastSale chains the current query on the "last_sale" edge.

func (*DopeQuery) QueryListings

func (dq *DopeQuery) QueryListings() *ListingQuery

QueryListings chains the current query on the "listings" edge.

func (*DopeQuery) QueryWallet

func (dq *DopeQuery) QueryWallet() *WalletQuery

QueryWallet chains the current query on the "wallet" edge.

func (*DopeQuery) Select

func (dq *DopeQuery) Select(fields ...string) *DopeSelect

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

client.Dope.Query().
	Select(dope.FieldClaimed).
	Scan(ctx, &v)

func (*DopeQuery) Unique

func (dq *DopeQuery) Unique(unique bool) *DopeQuery

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

func (dq *DopeQuery) Where(ps ...predicate.Dope) *DopeQuery

Where adds a new predicate for the DopeQuery builder.

func (*DopeQuery) WithIndex

func (dq *DopeQuery) WithIndex(opts ...func(*SearchQuery)) *DopeQuery

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

func (*DopeQuery) WithItems

func (dq *DopeQuery) WithItems(opts ...func(*ItemQuery)) *DopeQuery

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

func (*DopeQuery) WithLastSale

func (dq *DopeQuery) WithLastSale(opts ...func(*ListingQuery)) *DopeQuery

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

func (*DopeQuery) WithListings

func (dq *DopeQuery) WithListings(opts ...func(*ListingQuery)) *DopeQuery

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

func (*DopeQuery) WithWallet

func (dq *DopeQuery) WithWallet(opts ...func(*WalletQuery)) *DopeQuery

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

type DopeSelect

type DopeSelect struct {
	*DopeQuery
	// contains filtered or unexported fields
}

DopeSelect is the builder for selecting fields of Dope entities.

func (*DopeSelect) Bool

func (ds *DopeSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*DopeSelect) BoolX

func (ds *DopeSelect) BoolX(ctx context.Context) bool

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

func (*DopeSelect) Bools

func (ds *DopeSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*DopeSelect) BoolsX

func (ds *DopeSelect) BoolsX(ctx context.Context) []bool

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

func (*DopeSelect) Float64

func (ds *DopeSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*DopeSelect) Float64X

func (ds *DopeSelect) Float64X(ctx context.Context) float64

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

func (*DopeSelect) Float64s

func (ds *DopeSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*DopeSelect) Float64sX

func (ds *DopeSelect) Float64sX(ctx context.Context) []float64

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

func (*DopeSelect) Int

func (ds *DopeSelect) Int(ctx context.Context) (_ int, err error)

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

func (*DopeSelect) IntX

func (ds *DopeSelect) IntX(ctx context.Context) int

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

func (*DopeSelect) Ints

func (ds *DopeSelect) Ints(ctx context.Context) ([]int, error)

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

func (*DopeSelect) IntsX

func (ds *DopeSelect) IntsX(ctx context.Context) []int

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

func (*DopeSelect) Scan

func (ds *DopeSelect) Scan(ctx context.Context, v interface{}) error

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

func (*DopeSelect) ScanX

func (ds *DopeSelect) ScanX(ctx context.Context, v interface{})

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

func (*DopeSelect) String

func (ds *DopeSelect) String(ctx context.Context) (_ string, err error)

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

func (*DopeSelect) StringX

func (ds *DopeSelect) StringX(ctx context.Context) string

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

func (*DopeSelect) Strings

func (ds *DopeSelect) Strings(ctx context.Context) ([]string, error)

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

func (*DopeSelect) StringsX

func (ds *DopeSelect) StringsX(ctx context.Context) []string

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

type DopeUpdate

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

DopeUpdate is the builder for updating Dope entities.

func (*DopeUpdate) AddItemIDs

func (du *DopeUpdate) AddItemIDs(ids ...string) *DopeUpdate

AddItemIDs adds the "items" edge to the Item entity by IDs.

func (*DopeUpdate) AddItems

func (du *DopeUpdate) AddItems(i ...*Item) *DopeUpdate

AddItems adds the "items" edges to the Item entity.

func (*DopeUpdate) AddListingIDs

func (du *DopeUpdate) AddListingIDs(ids ...string) *DopeUpdate

AddListingIDs adds the "listings" edge to the Listing entity by IDs.

func (*DopeUpdate) AddListings

func (du *DopeUpdate) AddListings(l ...*Listing) *DopeUpdate

AddListings adds the "listings" edges to the Listing entity.

func (*DopeUpdate) AddRank

func (du *DopeUpdate) AddRank(i int) *DopeUpdate

AddRank adds i to the "rank" field.

func (*DopeUpdate) AddScore

func (du *DopeUpdate) AddScore(i int) *DopeUpdate

AddScore adds i to the "score" field.

func (*DopeUpdate) ClearIndex

func (du *DopeUpdate) ClearIndex() *DopeUpdate

ClearIndex clears the "index" edge to the Search entity.

func (*DopeUpdate) ClearItems

func (du *DopeUpdate) ClearItems() *DopeUpdate

ClearItems clears all "items" edges to the Item entity.

func (*DopeUpdate) ClearLastSale

func (du *DopeUpdate) ClearLastSale() *DopeUpdate

ClearLastSale clears the "last_sale" edge to the Listing entity.

func (*DopeUpdate) ClearListings

func (du *DopeUpdate) ClearListings() *DopeUpdate

ClearListings clears all "listings" edges to the Listing entity.

func (*DopeUpdate) ClearRank

func (du *DopeUpdate) ClearRank() *DopeUpdate

ClearRank clears the value of the "rank" field.

func (*DopeUpdate) ClearScore

func (du *DopeUpdate) ClearScore() *DopeUpdate

ClearScore clears the value of the "score" field.

func (*DopeUpdate) ClearWallet

func (du *DopeUpdate) ClearWallet() *DopeUpdate

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*DopeUpdate) Exec

func (du *DopeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DopeUpdate) ExecX

func (du *DopeUpdate) ExecX(ctx context.Context)

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

func (*DopeUpdate) Mutation

func (du *DopeUpdate) Mutation() *DopeMutation

Mutation returns the DopeMutation object of the builder.

func (*DopeUpdate) RemoveItemIDs

func (du *DopeUpdate) RemoveItemIDs(ids ...string) *DopeUpdate

RemoveItemIDs removes the "items" edge to Item entities by IDs.

func (*DopeUpdate) RemoveItems

func (du *DopeUpdate) RemoveItems(i ...*Item) *DopeUpdate

RemoveItems removes "items" edges to Item entities.

func (*DopeUpdate) RemoveListingIDs

func (du *DopeUpdate) RemoveListingIDs(ids ...string) *DopeUpdate

RemoveListingIDs removes the "listings" edge to Listing entities by IDs.

func (*DopeUpdate) RemoveListings

func (du *DopeUpdate) RemoveListings(l ...*Listing) *DopeUpdate

RemoveListings removes "listings" edges to Listing entities.

func (*DopeUpdate) Save

func (du *DopeUpdate) Save(ctx context.Context) (int, error)

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

func (*DopeUpdate) SaveX

func (du *DopeUpdate) SaveX(ctx context.Context) int

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

func (*DopeUpdate) SetClaimed

func (du *DopeUpdate) SetClaimed(b bool) *DopeUpdate

SetClaimed sets the "claimed" field.

func (*DopeUpdate) SetIndex

func (du *DopeUpdate) SetIndex(s *Search) *DopeUpdate

SetIndex sets the "index" edge to the Search entity.

func (*DopeUpdate) SetIndexID

func (du *DopeUpdate) SetIndexID(id string) *DopeUpdate

SetIndexID sets the "index" edge to the Search entity by ID.

func (*DopeUpdate) SetLastSale

func (du *DopeUpdate) SetLastSale(l *Listing) *DopeUpdate

SetLastSale sets the "last_sale" edge to the Listing entity.

func (*DopeUpdate) SetLastSaleID

func (du *DopeUpdate) SetLastSaleID(id string) *DopeUpdate

SetLastSaleID sets the "last_sale" edge to the Listing entity by ID.

func (*DopeUpdate) SetNillableClaimed

func (du *DopeUpdate) SetNillableClaimed(b *bool) *DopeUpdate

SetNillableClaimed sets the "claimed" field if the given value is not nil.

func (*DopeUpdate) SetNillableIndexID

func (du *DopeUpdate) SetNillableIndexID(id *string) *DopeUpdate

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*DopeUpdate) SetNillableLastSaleID

func (du *DopeUpdate) SetNillableLastSaleID(id *string) *DopeUpdate

SetNillableLastSaleID sets the "last_sale" edge to the Listing entity by ID if the given value is not nil.

func (*DopeUpdate) SetNillableOpened

func (du *DopeUpdate) SetNillableOpened(b *bool) *DopeUpdate

SetNillableOpened sets the "opened" field if the given value is not nil.

func (*DopeUpdate) SetNillableRank

func (du *DopeUpdate) SetNillableRank(i *int) *DopeUpdate

SetNillableRank sets the "rank" field if the given value is not nil.

func (*DopeUpdate) SetNillableScore

func (du *DopeUpdate) SetNillableScore(i *int) *DopeUpdate

SetNillableScore sets the "score" field if the given value is not nil.

func (*DopeUpdate) SetNillableWalletID

func (du *DopeUpdate) SetNillableWalletID(id *string) *DopeUpdate

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*DopeUpdate) SetOpened

func (du *DopeUpdate) SetOpened(b bool) *DopeUpdate

SetOpened sets the "opened" field.

func (*DopeUpdate) SetRank

func (du *DopeUpdate) SetRank(i int) *DopeUpdate

SetRank sets the "rank" field.

func (*DopeUpdate) SetScore

func (du *DopeUpdate) SetScore(i int) *DopeUpdate

SetScore sets the "score" field.

func (*DopeUpdate) SetWallet

func (du *DopeUpdate) SetWallet(w *Wallet) *DopeUpdate

SetWallet sets the "wallet" edge to the Wallet entity.

func (*DopeUpdate) SetWalletID

func (du *DopeUpdate) SetWalletID(id string) *DopeUpdate

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

func (*DopeUpdate) Where

func (du *DopeUpdate) Where(ps ...predicate.Dope) *DopeUpdate

Where appends a list predicates to the DopeUpdate builder.

type DopeUpdateOne

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

DopeUpdateOne is the builder for updating a single Dope entity.

func (*DopeUpdateOne) AddItemIDs

func (duo *DopeUpdateOne) AddItemIDs(ids ...string) *DopeUpdateOne

AddItemIDs adds the "items" edge to the Item entity by IDs.

func (*DopeUpdateOne) AddItems

func (duo *DopeUpdateOne) AddItems(i ...*Item) *DopeUpdateOne

AddItems adds the "items" edges to the Item entity.

func (*DopeUpdateOne) AddListingIDs

func (duo *DopeUpdateOne) AddListingIDs(ids ...string) *DopeUpdateOne

AddListingIDs adds the "listings" edge to the Listing entity by IDs.

func (*DopeUpdateOne) AddListings

func (duo *DopeUpdateOne) AddListings(l ...*Listing) *DopeUpdateOne

AddListings adds the "listings" edges to the Listing entity.

func (*DopeUpdateOne) AddRank

func (duo *DopeUpdateOne) AddRank(i int) *DopeUpdateOne

AddRank adds i to the "rank" field.

func (*DopeUpdateOne) AddScore

func (duo *DopeUpdateOne) AddScore(i int) *DopeUpdateOne

AddScore adds i to the "score" field.

func (*DopeUpdateOne) ClearIndex

func (duo *DopeUpdateOne) ClearIndex() *DopeUpdateOne

ClearIndex clears the "index" edge to the Search entity.

func (*DopeUpdateOne) ClearItems

func (duo *DopeUpdateOne) ClearItems() *DopeUpdateOne

ClearItems clears all "items" edges to the Item entity.

func (*DopeUpdateOne) ClearLastSale

func (duo *DopeUpdateOne) ClearLastSale() *DopeUpdateOne

ClearLastSale clears the "last_sale" edge to the Listing entity.

func (*DopeUpdateOne) ClearListings

func (duo *DopeUpdateOne) ClearListings() *DopeUpdateOne

ClearListings clears all "listings" edges to the Listing entity.

func (*DopeUpdateOne) ClearRank

func (duo *DopeUpdateOne) ClearRank() *DopeUpdateOne

ClearRank clears the value of the "rank" field.

func (*DopeUpdateOne) ClearScore

func (duo *DopeUpdateOne) ClearScore() *DopeUpdateOne

ClearScore clears the value of the "score" field.

func (*DopeUpdateOne) ClearWallet

func (duo *DopeUpdateOne) ClearWallet() *DopeUpdateOne

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*DopeUpdateOne) Exec

func (duo *DopeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DopeUpdateOne) ExecX

func (duo *DopeUpdateOne) ExecX(ctx context.Context)

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

func (*DopeUpdateOne) Mutation

func (duo *DopeUpdateOne) Mutation() *DopeMutation

Mutation returns the DopeMutation object of the builder.

func (*DopeUpdateOne) RemoveItemIDs

func (duo *DopeUpdateOne) RemoveItemIDs(ids ...string) *DopeUpdateOne

RemoveItemIDs removes the "items" edge to Item entities by IDs.

func (*DopeUpdateOne) RemoveItems

func (duo *DopeUpdateOne) RemoveItems(i ...*Item) *DopeUpdateOne

RemoveItems removes "items" edges to Item entities.

func (*DopeUpdateOne) RemoveListingIDs

func (duo *DopeUpdateOne) RemoveListingIDs(ids ...string) *DopeUpdateOne

RemoveListingIDs removes the "listings" edge to Listing entities by IDs.

func (*DopeUpdateOne) RemoveListings

func (duo *DopeUpdateOne) RemoveListings(l ...*Listing) *DopeUpdateOne

RemoveListings removes "listings" edges to Listing entities.

func (*DopeUpdateOne) Save

func (duo *DopeUpdateOne) Save(ctx context.Context) (*Dope, error)

Save executes the query and returns the updated Dope entity.

func (*DopeUpdateOne) SaveX

func (duo *DopeUpdateOne) SaveX(ctx context.Context) *Dope

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

func (*DopeUpdateOne) Select

func (duo *DopeUpdateOne) Select(field string, fields ...string) *DopeUpdateOne

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

func (*DopeUpdateOne) SetClaimed

func (duo *DopeUpdateOne) SetClaimed(b bool) *DopeUpdateOne

SetClaimed sets the "claimed" field.

func (*DopeUpdateOne) SetIndex

func (duo *DopeUpdateOne) SetIndex(s *Search) *DopeUpdateOne

SetIndex sets the "index" edge to the Search entity.

func (*DopeUpdateOne) SetIndexID

func (duo *DopeUpdateOne) SetIndexID(id string) *DopeUpdateOne

SetIndexID sets the "index" edge to the Search entity by ID.

func (*DopeUpdateOne) SetLastSale

func (duo *DopeUpdateOne) SetLastSale(l *Listing) *DopeUpdateOne

SetLastSale sets the "last_sale" edge to the Listing entity.

func (*DopeUpdateOne) SetLastSaleID

func (duo *DopeUpdateOne) SetLastSaleID(id string) *DopeUpdateOne

SetLastSaleID sets the "last_sale" edge to the Listing entity by ID.

func (*DopeUpdateOne) SetNillableClaimed

func (duo *DopeUpdateOne) SetNillableClaimed(b *bool) *DopeUpdateOne

SetNillableClaimed sets the "claimed" field if the given value is not nil.

func (*DopeUpdateOne) SetNillableIndexID

func (duo *DopeUpdateOne) SetNillableIndexID(id *string) *DopeUpdateOne

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*DopeUpdateOne) SetNillableLastSaleID

func (duo *DopeUpdateOne) SetNillableLastSaleID(id *string) *DopeUpdateOne

SetNillableLastSaleID sets the "last_sale" edge to the Listing entity by ID if the given value is not nil.

func (*DopeUpdateOne) SetNillableOpened

func (duo *DopeUpdateOne) SetNillableOpened(b *bool) *DopeUpdateOne

SetNillableOpened sets the "opened" field if the given value is not nil.

func (*DopeUpdateOne) SetNillableRank

func (duo *DopeUpdateOne) SetNillableRank(i *int) *DopeUpdateOne

SetNillableRank sets the "rank" field if the given value is not nil.

func (*DopeUpdateOne) SetNillableScore

func (duo *DopeUpdateOne) SetNillableScore(i *int) *DopeUpdateOne

SetNillableScore sets the "score" field if the given value is not nil.

func (*DopeUpdateOne) SetNillableWalletID

func (duo *DopeUpdateOne) SetNillableWalletID(id *string) *DopeUpdateOne

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*DopeUpdateOne) SetOpened

func (duo *DopeUpdateOne) SetOpened(b bool) *DopeUpdateOne

SetOpened sets the "opened" field.

func (*DopeUpdateOne) SetRank

func (duo *DopeUpdateOne) SetRank(i int) *DopeUpdateOne

SetRank sets the "rank" field.

func (*DopeUpdateOne) SetScore

func (duo *DopeUpdateOne) SetScore(i int) *DopeUpdateOne

SetScore sets the "score" field.

func (*DopeUpdateOne) SetWallet

func (duo *DopeUpdateOne) SetWallet(w *Wallet) *DopeUpdateOne

SetWallet sets the "wallet" edge to the Wallet entity.

func (*DopeUpdateOne) SetWalletID

func (duo *DopeUpdateOne) SetWalletID(id string) *DopeUpdateOne

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

type DopeUpsert

type DopeUpsert struct {
	*sql.UpdateSet
}

DopeUpsert is the "OnConflict" setter.

func (*DopeUpsert) AddOrder

func (u *DopeUpsert) AddOrder(v int) *DopeUpsert

AddOrder adds v to the "order" field.

func (*DopeUpsert) AddRank

func (u *DopeUpsert) AddRank(v int) *DopeUpsert

AddRank adds v to the "rank" field.

func (*DopeUpsert) AddScore

func (u *DopeUpsert) AddScore(v int) *DopeUpsert

AddScore adds v to the "score" field.

func (*DopeUpsert) ClearRank

func (u *DopeUpsert) ClearRank() *DopeUpsert

ClearRank clears the value of the "rank" field.

func (*DopeUpsert) ClearScore

func (u *DopeUpsert) ClearScore() *DopeUpsert

ClearScore clears the value of the "score" field.

func (*DopeUpsert) SetClaimed

func (u *DopeUpsert) SetClaimed(v bool) *DopeUpsert

SetClaimed sets the "claimed" field.

func (*DopeUpsert) SetOpened

func (u *DopeUpsert) SetOpened(v bool) *DopeUpsert

SetOpened sets the "opened" field.

func (*DopeUpsert) SetOrder

func (u *DopeUpsert) SetOrder(v int) *DopeUpsert

SetOrder sets the "order" field.

func (*DopeUpsert) SetRank

func (u *DopeUpsert) SetRank(v int) *DopeUpsert

SetRank sets the "rank" field.

func (*DopeUpsert) SetScore

func (u *DopeUpsert) SetScore(v int) *DopeUpsert

SetScore sets the "score" field.

func (*DopeUpsert) UpdateClaimed

func (u *DopeUpsert) UpdateClaimed() *DopeUpsert

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

func (*DopeUpsert) UpdateOpened

func (u *DopeUpsert) UpdateOpened() *DopeUpsert

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

func (*DopeUpsert) UpdateOrder

func (u *DopeUpsert) UpdateOrder() *DopeUpsert

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

func (*DopeUpsert) UpdateRank

func (u *DopeUpsert) UpdateRank() *DopeUpsert

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

func (*DopeUpsert) UpdateScore

func (u *DopeUpsert) UpdateScore() *DopeUpsert

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

type DopeUpsertBulk

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

DopeUpsertBulk is the builder for "upsert"-ing a bulk of Dope nodes.

func (*DopeUpsertBulk) AddOrder

func (u *DopeUpsertBulk) AddOrder(v int) *DopeUpsertBulk

AddOrder adds v to the "order" field.

func (*DopeUpsertBulk) AddRank

func (u *DopeUpsertBulk) AddRank(v int) *DopeUpsertBulk

AddRank adds v to the "rank" field.

func (*DopeUpsertBulk) AddScore

func (u *DopeUpsertBulk) AddScore(v int) *DopeUpsertBulk

AddScore adds v to the "score" field.

func (*DopeUpsertBulk) ClearRank

func (u *DopeUpsertBulk) ClearRank() *DopeUpsertBulk

ClearRank clears the value of the "rank" field.

func (*DopeUpsertBulk) ClearScore

func (u *DopeUpsertBulk) ClearScore() *DopeUpsertBulk

ClearScore clears the value of the "score" field.

func (*DopeUpsertBulk) DoNothing

func (u *DopeUpsertBulk) DoNothing() *DopeUpsertBulk

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

func (*DopeUpsertBulk) Exec

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

Exec executes the query.

func (*DopeUpsertBulk) ExecX

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

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

func (*DopeUpsertBulk) Ignore

func (u *DopeUpsertBulk) Ignore() *DopeUpsertBulk

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

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

func (*DopeUpsertBulk) SetClaimed

func (u *DopeUpsertBulk) SetClaimed(v bool) *DopeUpsertBulk

SetClaimed sets the "claimed" field.

func (*DopeUpsertBulk) SetOpened

func (u *DopeUpsertBulk) SetOpened(v bool) *DopeUpsertBulk

SetOpened sets the "opened" field.

func (*DopeUpsertBulk) SetOrder

func (u *DopeUpsertBulk) SetOrder(v int) *DopeUpsertBulk

SetOrder sets the "order" field.

func (*DopeUpsertBulk) SetRank

func (u *DopeUpsertBulk) SetRank(v int) *DopeUpsertBulk

SetRank sets the "rank" field.

func (*DopeUpsertBulk) SetScore

func (u *DopeUpsertBulk) SetScore(v int) *DopeUpsertBulk

SetScore sets the "score" field.

func (*DopeUpsertBulk) Update

func (u *DopeUpsertBulk) Update(set func(*DopeUpsert)) *DopeUpsertBulk

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

func (*DopeUpsertBulk) UpdateClaimed

func (u *DopeUpsertBulk) UpdateClaimed() *DopeUpsertBulk

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

func (*DopeUpsertBulk) UpdateNewValues

func (u *DopeUpsertBulk) UpdateNewValues() *DopeUpsertBulk

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

client.Dope.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(dope.FieldID)
		}),
	).
	Exec(ctx)

func (*DopeUpsertBulk) UpdateOpened

func (u *DopeUpsertBulk) UpdateOpened() *DopeUpsertBulk

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

func (*DopeUpsertBulk) UpdateOrder

func (u *DopeUpsertBulk) UpdateOrder() *DopeUpsertBulk

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

func (*DopeUpsertBulk) UpdateRank

func (u *DopeUpsertBulk) UpdateRank() *DopeUpsertBulk

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

func (*DopeUpsertBulk) UpdateScore

func (u *DopeUpsertBulk) UpdateScore() *DopeUpsertBulk

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

type DopeUpsertOne

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

DopeUpsertOne is the builder for "upsert"-ing

one Dope node.

func (*DopeUpsertOne) AddOrder

func (u *DopeUpsertOne) AddOrder(v int) *DopeUpsertOne

AddOrder adds v to the "order" field.

func (*DopeUpsertOne) AddRank

func (u *DopeUpsertOne) AddRank(v int) *DopeUpsertOne

AddRank adds v to the "rank" field.

func (*DopeUpsertOne) AddScore

func (u *DopeUpsertOne) AddScore(v int) *DopeUpsertOne

AddScore adds v to the "score" field.

func (*DopeUpsertOne) ClearRank

func (u *DopeUpsertOne) ClearRank() *DopeUpsertOne

ClearRank clears the value of the "rank" field.

func (*DopeUpsertOne) ClearScore

func (u *DopeUpsertOne) ClearScore() *DopeUpsertOne

ClearScore clears the value of the "score" field.

func (*DopeUpsertOne) DoNothing

func (u *DopeUpsertOne) DoNothing() *DopeUpsertOne

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

func (*DopeUpsertOne) Exec

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

Exec executes the query.

func (*DopeUpsertOne) ExecX

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

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

func (*DopeUpsertOne) ID

func (u *DopeUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*DopeUpsertOne) IDX

func (u *DopeUpsertOne) IDX(ctx context.Context) string

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

func (*DopeUpsertOne) Ignore

func (u *DopeUpsertOne) Ignore() *DopeUpsertOne

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

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

func (*DopeUpsertOne) SetClaimed

func (u *DopeUpsertOne) SetClaimed(v bool) *DopeUpsertOne

SetClaimed sets the "claimed" field.

func (*DopeUpsertOne) SetOpened

func (u *DopeUpsertOne) SetOpened(v bool) *DopeUpsertOne

SetOpened sets the "opened" field.

func (*DopeUpsertOne) SetOrder

func (u *DopeUpsertOne) SetOrder(v int) *DopeUpsertOne

SetOrder sets the "order" field.

func (*DopeUpsertOne) SetRank

func (u *DopeUpsertOne) SetRank(v int) *DopeUpsertOne

SetRank sets the "rank" field.

func (*DopeUpsertOne) SetScore

func (u *DopeUpsertOne) SetScore(v int) *DopeUpsertOne

SetScore sets the "score" field.

func (*DopeUpsertOne) Update

func (u *DopeUpsertOne) Update(set func(*DopeUpsert)) *DopeUpsertOne

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

func (*DopeUpsertOne) UpdateClaimed

func (u *DopeUpsertOne) UpdateClaimed() *DopeUpsertOne

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

func (*DopeUpsertOne) UpdateNewValues

func (u *DopeUpsertOne) UpdateNewValues() *DopeUpsertOne

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.Dope.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(dope.FieldID)
		}),
	).
	Exec(ctx)

func (*DopeUpsertOne) UpdateOpened

func (u *DopeUpsertOne) UpdateOpened() *DopeUpsertOne

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

func (*DopeUpsertOne) UpdateOrder

func (u *DopeUpsertOne) UpdateOrder() *DopeUpsertOne

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

func (*DopeUpsertOne) UpdateRank

func (u *DopeUpsertOne) UpdateRank() *DopeUpsertOne

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

func (*DopeUpsertOne) UpdateScore

func (u *DopeUpsertOne) UpdateScore() *DopeUpsertOne

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

type DopeWhereInput

type DopeWhereInput struct {
	Not *DopeWhereInput   `json:"not,omitempty"`
	Or  []*DopeWhereInput `json:"or,omitempty"`
	And []*DopeWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "claimed" field predicates.
	Claimed    *bool `json:"claimed,omitempty"`
	ClaimedNEQ *bool `json:"claimedNEQ,omitempty"`

	// "opened" field predicates.
	Opened    *bool `json:"opened,omitempty"`
	OpenedNEQ *bool `json:"openedNEQ,omitempty"`

	// "score" field predicates.
	Score       *int  `json:"score,omitempty"`
	ScoreNEQ    *int  `json:"scoreNEQ,omitempty"`
	ScoreIn     []int `json:"scoreIn,omitempty"`
	ScoreNotIn  []int `json:"scoreNotIn,omitempty"`
	ScoreGT     *int  `json:"scoreGT,omitempty"`
	ScoreGTE    *int  `json:"scoreGTE,omitempty"`
	ScoreLT     *int  `json:"scoreLT,omitempty"`
	ScoreLTE    *int  `json:"scoreLTE,omitempty"`
	ScoreIsNil  bool  `json:"scoreIsNil,omitempty"`
	ScoreNotNil bool  `json:"scoreNotNil,omitempty"`

	// "rank" field predicates.
	Rank       *int  `json:"rank,omitempty"`
	RankNEQ    *int  `json:"rankNEQ,omitempty"`
	RankIn     []int `json:"rankIn,omitempty"`
	RankNotIn  []int `json:"rankNotIn,omitempty"`
	RankGT     *int  `json:"rankGT,omitempty"`
	RankGTE    *int  `json:"rankGTE,omitempty"`
	RankLT     *int  `json:"rankLT,omitempty"`
	RankLTE    *int  `json:"rankLTE,omitempty"`
	RankIsNil  bool  `json:"rankIsNil,omitempty"`
	RankNotNil bool  `json:"rankNotNil,omitempty"`

	// "order" field predicates.
	Order      *int  `json:"order,omitempty"`
	OrderNEQ   *int  `json:"orderNEQ,omitempty"`
	OrderIn    []int `json:"orderIn,omitempty"`
	OrderNotIn []int `json:"orderNotIn,omitempty"`
	OrderGT    *int  `json:"orderGT,omitempty"`
	OrderGTE   *int  `json:"orderGTE,omitempty"`
	OrderLT    *int  `json:"orderLT,omitempty"`
	OrderLTE   *int  `json:"orderLTE,omitempty"`

	// "wallet" edge predicates.
	HasWallet     *bool               `json:"hasWallet,omitempty"`
	HasWalletWith []*WalletWhereInput `json:"hasWalletWith,omitempty"`

	// "last_sale" edge predicates.
	HasLastSale     *bool                `json:"hasLastSale,omitempty"`
	HasLastSaleWith []*ListingWhereInput `json:"hasLastSaleWith,omitempty"`

	// "listings" edge predicates.
	HasListings     *bool                `json:"hasListings,omitempty"`
	HasListingsWith []*ListingWhereInput `json:"hasListingsWith,omitempty"`

	// "items" edge predicates.
	HasItems     *bool             `json:"hasItems,omitempty"`
	HasItemsWith []*ItemWhereInput `json:"hasItemsWith,omitempty"`

	// "index" edge predicates.
	HasIndex     *bool               `json:"hasIndex,omitempty"`
	HasIndexWith []*SearchWhereInput `json:"hasIndexWith,omitempty"`
}

DopeWhereInput represents a where input for filtering Dope queries.

func (*DopeWhereInput) Filter

func (i *DopeWhereInput) Filter(q *DopeQuery) (*DopeQuery, error)

Filter applies the DopeWhereInput filter on the DopeQuery builder.

func (*DopeWhereInput) P

func (i *DopeWhereInput) P() (predicate.Dope, error)

P returns a predicate for filtering dopes. An error is returned if the input is empty or invalid.

type Dopes

type Dopes []*Dope

Dopes is a parsable slice of Dope.

type Edge

type Edge struct {
	Type string   `json:"type,omitempty"` // edge type.
	Name string   `json:"name,omitempty"` // edge name.
	IDs  []string `json:"ids,omitempty"`  // node ids (where this edge point to).
}

Edges between two nodes.

type Event

type Event struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Address holds the value of the "address" field.
	Address common.Address `json:"address,omitempty"`
	// Index holds the value of the "index" field.
	Index uint64 `json:"index,omitempty"`
	// Hash holds the value of the "hash" field.
	Hash common.Hash `json:"hash,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Event is the model entity for the Event schema.

func (*Event) Node

func (e *Event) Node(ctx context.Context) (node *Node, err error)

func (*Event) String

func (e *Event) String() string

String implements the fmt.Stringer.

func (*Event) ToEdge

func (e *Event) ToEdge(order *EventOrder) *EventEdge

ToEdge converts Event into EventEdge.

func (*Event) Unwrap

func (e *Event) Unwrap() *Event

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

func (e *Event) Update() *EventUpdateOne

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

type EventClient

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

EventClient is a client for the Event schema.

func NewEventClient

func NewEventClient(c config) *EventClient

NewEventClient returns a client for the Event from the given config.

func (*EventClient) Create

func (c *EventClient) Create() *EventCreate

Create returns a create builder for Event.

func (*EventClient) CreateBulk

func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk

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

func (*EventClient) Delete

func (c *EventClient) Delete() *EventDelete

Delete returns a delete builder for Event.

func (*EventClient) DeleteOne

func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*EventClient) DeleteOneID

func (c *EventClient) DeleteOneID(id string) *EventDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*EventClient) Get

func (c *EventClient) Get(ctx context.Context, id string) (*Event, error)

Get returns a Event entity by its id.

func (*EventClient) GetX

func (c *EventClient) GetX(ctx context.Context, id string) *Event

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

func (*EventClient) Hooks

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

Hooks returns the client hooks.

func (*EventClient) Query

func (c *EventClient) Query() *EventQuery

Query returns a query builder for Event.

func (*EventClient) Update

func (c *EventClient) Update() *EventUpdate

Update returns an update builder for Event.

func (*EventClient) UpdateOne

func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EventClient) UpdateOneID

func (c *EventClient) UpdateOneID(id string) *EventUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EventClient) Use

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

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

type EventConnection

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

EventConnection is the connection containing edges to Event.

type EventCreate

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

EventCreate is the builder for creating a Event entity.

func (*EventCreate) Exec

func (ec *EventCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EventCreate) ExecX

func (ec *EventCreate) ExecX(ctx context.Context)

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

func (*EventCreate) Mutation

func (ec *EventCreate) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventCreate) OnConflict

func (ec *EventCreate) OnConflict(opts ...sql.ConflictOption) *EventUpsertOne

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

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

func (*EventCreate) OnConflictColumns

func (ec *EventCreate) OnConflictColumns(columns ...string) *EventUpsertOne

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

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

func (*EventCreate) Save

func (ec *EventCreate) Save(ctx context.Context) (*Event, error)

Save creates the Event in the database.

func (*EventCreate) SaveX

func (ec *EventCreate) SaveX(ctx context.Context) *Event

SaveX calls Save and panics if Save returns an error.

func (*EventCreate) SetAddress

func (ec *EventCreate) SetAddress(c common.Address) *EventCreate

SetAddress sets the "address" field.

func (*EventCreate) SetCreatedAt

func (ec *EventCreate) SetCreatedAt(t time.Time) *EventCreate

SetCreatedAt sets the "created_at" field.

func (*EventCreate) SetHash

func (ec *EventCreate) SetHash(c common.Hash) *EventCreate

SetHash sets the "hash" field.

func (*EventCreate) SetID

func (ec *EventCreate) SetID(s string) *EventCreate

SetID sets the "id" field.

func (*EventCreate) SetIndex

func (ec *EventCreate) SetIndex(u uint64) *EventCreate

SetIndex sets the "index" field.

func (*EventCreate) SetNillableCreatedAt

func (ec *EventCreate) SetNillableCreatedAt(t *time.Time) *EventCreate

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

func (*EventCreate) SetNillableUpdatedAt

func (ec *EventCreate) SetNillableUpdatedAt(t *time.Time) *EventCreate

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

func (*EventCreate) SetUpdatedAt

func (ec *EventCreate) SetUpdatedAt(t time.Time) *EventCreate

SetUpdatedAt sets the "updated_at" field.

type EventCreateBulk

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

EventCreateBulk is the builder for creating many Event entities in bulk.

func (*EventCreateBulk) Exec

func (ecb *EventCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EventCreateBulk) ExecX

func (ecb *EventCreateBulk) ExecX(ctx context.Context)

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

func (*EventCreateBulk) OnConflict

func (ecb *EventCreateBulk) OnConflict(opts ...sql.ConflictOption) *EventUpsertBulk

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

client.Event.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.EventUpsert) {
		SetAddress(v+v).
	}).
	Exec(ctx)

func (*EventCreateBulk) OnConflictColumns

func (ecb *EventCreateBulk) OnConflictColumns(columns ...string) *EventUpsertBulk

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

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

func (*EventCreateBulk) Save

func (ecb *EventCreateBulk) Save(ctx context.Context) ([]*Event, error)

Save creates the Event entities in the database.

func (*EventCreateBulk) SaveX

func (ecb *EventCreateBulk) SaveX(ctx context.Context) []*Event

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

type EventDelete

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

EventDelete is the builder for deleting a Event entity.

func (*EventDelete) Exec

func (ed *EventDelete) Exec(ctx context.Context) (int, error)

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

func (*EventDelete) ExecX

func (ed *EventDelete) ExecX(ctx context.Context) int

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

func (*EventDelete) Where

func (ed *EventDelete) Where(ps ...predicate.Event) *EventDelete

Where appends a list predicates to the EventDelete builder.

type EventDeleteOne

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

EventDeleteOne is the builder for deleting a single Event entity.

func (*EventDeleteOne) Exec

func (edo *EventDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EventDeleteOne) ExecX

func (edo *EventDeleteOne) ExecX(ctx context.Context)

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

type EventEdge

type EventEdge struct {
	Node   *Event `json:"node"`
	Cursor Cursor `json:"cursor"`
}

EventEdge is the edge representation of Event.

type EventGroupBy

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

EventGroupBy is the group-by builder for Event entities.

func (*EventGroupBy) Aggregate

func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy

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

func (*EventGroupBy) Bool

func (egb *EventGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) BoolX

func (egb *EventGroupBy) BoolX(ctx context.Context) bool

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

func (*EventGroupBy) Bools

func (egb *EventGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) BoolsX

func (egb *EventGroupBy) BoolsX(ctx context.Context) []bool

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

func (*EventGroupBy) Float64

func (egb *EventGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) Float64X

func (egb *EventGroupBy) Float64X(ctx context.Context) float64

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

func (*EventGroupBy) Float64s

func (egb *EventGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) Float64sX

func (egb *EventGroupBy) Float64sX(ctx context.Context) []float64

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

func (*EventGroupBy) Int

func (egb *EventGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) IntX

func (egb *EventGroupBy) IntX(ctx context.Context) int

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

func (*EventGroupBy) Ints

func (egb *EventGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) IntsX

func (egb *EventGroupBy) IntsX(ctx context.Context) []int

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

func (*EventGroupBy) Scan

func (egb *EventGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*EventGroupBy) ScanX

func (egb *EventGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*EventGroupBy) String

func (egb *EventGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) StringX

func (egb *EventGroupBy) StringX(ctx context.Context) string

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

func (*EventGroupBy) Strings

func (egb *EventGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) StringsX

func (egb *EventGroupBy) StringsX(ctx context.Context) []string

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

type EventMutation

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

EventMutation represents an operation that mutates the Event nodes in the graph.

func (*EventMutation) AddField

func (m *EventMutation) 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 (*EventMutation) AddIndex

func (m *EventMutation) AddIndex(u int64)

AddIndex adds u to the "index" field.

func (*EventMutation) AddedEdges

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

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

func (*EventMutation) AddedField

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

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

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

func (*EventMutation) AddedIDs

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

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

func (*EventMutation) AddedIndex

func (m *EventMutation) AddedIndex() (r int64, exists bool)

AddedIndex returns the value that was added to the "index" field in this mutation.

func (*EventMutation) Address

func (m *EventMutation) Address() (r common.Address, exists bool)

Address returns the value of the "address" field in the mutation.

func (*EventMutation) ClearEdge

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

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

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

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

func (*EventMutation) ClearedFields

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

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

func (EventMutation) Client

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

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

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

func (*EventMutation) EdgeCleared

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

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

func (*EventMutation) Field

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

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

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

func (*EventMutation) Fields

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

func (m *EventMutation) Hash() (r common.Hash, exists bool)

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

func (*EventMutation) ID

func (m *EventMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*EventMutation) IDs

func (m *EventMutation) IDs(ctx context.Context) ([]string, error)

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

func (*EventMutation) Index

func (m *EventMutation) Index() (r uint64, exists bool)

Index returns the value of the "index" field in the mutation.

func (*EventMutation) OldAddress

func (m *EventMutation) OldAddress(ctx context.Context) (v common.Address, err error)

OldAddress returns the old "address" field's value of the Event entity. If the Event 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 (*EventMutation) OldCreatedAt

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

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

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

func (m *EventMutation) OldHash(ctx context.Context) (v common.Hash, err error)

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

func (m *EventMutation) OldIndex(ctx context.Context) (v uint64, err error)

OldIndex returns the old "index" field's value of the Event entity. If the Event 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 (*EventMutation) OldUpdatedAt

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

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

func (m *EventMutation) Op() Op

Op returns the operation name.

func (*EventMutation) RemovedEdges

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

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

func (*EventMutation) RemovedIDs

func (m *EventMutation) 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 (*EventMutation) ResetAddress

func (m *EventMutation) ResetAddress()

ResetAddress resets all changes to the "address" field.

func (*EventMutation) ResetCreatedAt

func (m *EventMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*EventMutation) ResetEdge

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

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

func (m *EventMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

func (*EventMutation) ResetIndex

func (m *EventMutation) ResetIndex()

ResetIndex resets all changes to the "index" field.

func (*EventMutation) ResetUpdatedAt

func (m *EventMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*EventMutation) SetAddress

func (m *EventMutation) SetAddress(c common.Address)

SetAddress sets the "address" field.

func (*EventMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*EventMutation) SetField

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

func (m *EventMutation) SetHash(c common.Hash)

SetHash sets the "hash" field.

func (*EventMutation) SetID

func (m *EventMutation) SetID(id string)

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

func (*EventMutation) SetIndex

func (m *EventMutation) SetIndex(u uint64)

SetIndex sets the "index" field.

func (*EventMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (EventMutation) Tx

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

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

func (*EventMutation) Type

func (m *EventMutation) Type() string

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

func (*EventMutation) UpdatedAt

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

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

func (*EventMutation) Where

func (m *EventMutation) Where(ps ...predicate.Event)

Where appends a list predicates to the EventMutation builder.

type EventOrder

type EventOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *EventOrderField `json:"field"`
}

EventOrder defines the ordering of Event.

type EventOrderField

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

EventOrderField defines the ordering field of Event.

type EventPaginateOption

type EventPaginateOption func(*eventPager) error

EventPaginateOption enables pagination customization.

func WithEventFilter

func WithEventFilter(filter func(*EventQuery) (*EventQuery, error)) EventPaginateOption

WithEventFilter configures pagination filter.

func WithEventOrder

func WithEventOrder(order *EventOrder) EventPaginateOption

WithEventOrder configures pagination ordering.

type EventQuery

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

EventQuery is the builder for querying Event entities.

func (*EventQuery) All

func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)

All executes the query and returns a list of Events.

func (*EventQuery) AllX

func (eq *EventQuery) AllX(ctx context.Context) []*Event

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

func (*EventQuery) Clone

func (eq *EventQuery) Clone() *EventQuery

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

func (*EventQuery) CollectFields

func (e *EventQuery) CollectFields(ctx context.Context, satisfies ...string) *EventQuery

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

func (*EventQuery) Count

func (eq *EventQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EventQuery) CountX

func (eq *EventQuery) CountX(ctx context.Context) int

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

func (*EventQuery) Exist

func (eq *EventQuery) Exist(ctx context.Context) (bool, error)

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

func (*EventQuery) ExistX

func (eq *EventQuery) ExistX(ctx context.Context) bool

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

func (*EventQuery) First

func (eq *EventQuery) First(ctx context.Context) (*Event, error)

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

func (*EventQuery) FirstID

func (eq *EventQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*EventQuery) FirstIDX

func (eq *EventQuery) FirstIDX(ctx context.Context) string

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

func (*EventQuery) FirstX

func (eq *EventQuery) FirstX(ctx context.Context) *Event

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

func (*EventQuery) GroupBy

func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy

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

Example:

var v []struct {
	Address common.Address `json:"address,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Event.Query().
	GroupBy(event.FieldAddress).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EventQuery) IDs

func (eq *EventQuery) IDs(ctx context.Context) ([]string, error)

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

func (*EventQuery) IDsX

func (eq *EventQuery) IDsX(ctx context.Context) []string

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

func (*EventQuery) Limit

func (eq *EventQuery) Limit(limit int) *EventQuery

Limit adds a limit step to the query.

func (*EventQuery) Offset

func (eq *EventQuery) Offset(offset int) *EventQuery

Offset adds an offset step to the query.

func (*EventQuery) Only

func (eq *EventQuery) Only(ctx context.Context) (*Event, error)

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

func (*EventQuery) OnlyID

func (eq *EventQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*EventQuery) OnlyIDX

func (eq *EventQuery) OnlyIDX(ctx context.Context) string

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

func (*EventQuery) OnlyX

func (eq *EventQuery) OnlyX(ctx context.Context) *Event

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

func (*EventQuery) Order

func (eq *EventQuery) Order(o ...OrderFunc) *EventQuery

Order adds an order step to the query.

func (*EventQuery) Paginate

func (e *EventQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...EventPaginateOption,
) (*EventConnection, error)

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

func (*EventQuery) Select

func (eq *EventQuery) Select(fields ...string) *EventSelect

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

Example:

var v []struct {
	Address common.Address `json:"address,omitempty"`
}

client.Event.Query().
	Select(event.FieldAddress).
	Scan(ctx, &v)

func (*EventQuery) Unique

func (eq *EventQuery) Unique(unique bool) *EventQuery

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

func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery

Where adds a new predicate for the EventQuery builder.

type EventSelect

type EventSelect struct {
	*EventQuery
	// contains filtered or unexported fields
}

EventSelect is the builder for selecting fields of Event entities.

func (*EventSelect) Bool

func (es *EventSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*EventSelect) BoolX

func (es *EventSelect) BoolX(ctx context.Context) bool

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

func (*EventSelect) Bools

func (es *EventSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*EventSelect) BoolsX

func (es *EventSelect) BoolsX(ctx context.Context) []bool

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

func (*EventSelect) Float64

func (es *EventSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*EventSelect) Float64X

func (es *EventSelect) Float64X(ctx context.Context) float64

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

func (*EventSelect) Float64s

func (es *EventSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*EventSelect) Float64sX

func (es *EventSelect) Float64sX(ctx context.Context) []float64

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

func (*EventSelect) Int

func (es *EventSelect) Int(ctx context.Context) (_ int, err error)

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

func (*EventSelect) IntX

func (es *EventSelect) IntX(ctx context.Context) int

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

func (*EventSelect) Ints

func (es *EventSelect) Ints(ctx context.Context) ([]int, error)

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

func (*EventSelect) IntsX

func (es *EventSelect) IntsX(ctx context.Context) []int

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

func (*EventSelect) Scan

func (es *EventSelect) Scan(ctx context.Context, v interface{}) error

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

func (*EventSelect) ScanX

func (es *EventSelect) ScanX(ctx context.Context, v interface{})

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

func (*EventSelect) String

func (es *EventSelect) String(ctx context.Context) (_ string, err error)

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

func (*EventSelect) StringX

func (es *EventSelect) StringX(ctx context.Context) string

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

func (*EventSelect) Strings

func (es *EventSelect) Strings(ctx context.Context) ([]string, error)

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

func (*EventSelect) StringsX

func (es *EventSelect) StringsX(ctx context.Context) []string

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

type EventUpdate

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

EventUpdate is the builder for updating Event entities.

func (*EventUpdate) Exec

func (eu *EventUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EventUpdate) ExecX

func (eu *EventUpdate) ExecX(ctx context.Context)

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

func (*EventUpdate) Mutation

func (eu *EventUpdate) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventUpdate) Save

func (eu *EventUpdate) Save(ctx context.Context) (int, error)

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

func (*EventUpdate) SaveX

func (eu *EventUpdate) SaveX(ctx context.Context) int

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

func (*EventUpdate) SetUpdatedAt

func (eu *EventUpdate) SetUpdatedAt(t time.Time) *EventUpdate

SetUpdatedAt sets the "updated_at" field.

func (*EventUpdate) Where

func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate

Where appends a list predicates to the EventUpdate builder.

type EventUpdateOne

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

EventUpdateOne is the builder for updating a single Event entity.

func (*EventUpdateOne) Exec

func (euo *EventUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EventUpdateOne) ExecX

func (euo *EventUpdateOne) ExecX(ctx context.Context)

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

func (*EventUpdateOne) Mutation

func (euo *EventUpdateOne) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventUpdateOne) Save

func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)

Save executes the query and returns the updated Event entity.

func (*EventUpdateOne) SaveX

func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event

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

func (*EventUpdateOne) Select

func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne

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

func (*EventUpdateOne) SetUpdatedAt

func (euo *EventUpdateOne) SetUpdatedAt(t time.Time) *EventUpdateOne

SetUpdatedAt sets the "updated_at" field.

type EventUpsert

type EventUpsert struct {
	*sql.UpdateSet
}

EventUpsert is the "OnConflict" setter.

func (*EventUpsert) AddIndex

func (u *EventUpsert) AddIndex(v uint64) *EventUpsert

AddIndex adds v to the "index" field.

func (*EventUpsert) SetAddress

func (u *EventUpsert) SetAddress(v common.Address) *EventUpsert

SetAddress sets the "address" field.

func (*EventUpsert) SetCreatedAt

func (u *EventUpsert) SetCreatedAt(v time.Time) *EventUpsert

SetCreatedAt sets the "created_at" field.

func (*EventUpsert) SetHash

func (u *EventUpsert) SetHash(v common.Hash) *EventUpsert

SetHash sets the "hash" field.

func (*EventUpsert) SetIndex

func (u *EventUpsert) SetIndex(v uint64) *EventUpsert

SetIndex sets the "index" field.

func (*EventUpsert) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EventUpsert) UpdateAddress

func (u *EventUpsert) UpdateAddress() *EventUpsert

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

func (*EventUpsert) UpdateCreatedAt

func (u *EventUpsert) UpdateCreatedAt() *EventUpsert

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

func (*EventUpsert) UpdateHash

func (u *EventUpsert) UpdateHash() *EventUpsert

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

func (*EventUpsert) UpdateIndex

func (u *EventUpsert) UpdateIndex() *EventUpsert

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

func (*EventUpsert) UpdateUpdatedAt

func (u *EventUpsert) UpdateUpdatedAt() *EventUpsert

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

type EventUpsertBulk

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

EventUpsertBulk is the builder for "upsert"-ing a bulk of Event nodes.

func (*EventUpsertBulk) AddIndex

func (u *EventUpsertBulk) AddIndex(v uint64) *EventUpsertBulk

AddIndex adds v to the "index" field.

func (*EventUpsertBulk) DoNothing

func (u *EventUpsertBulk) DoNothing() *EventUpsertBulk

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

func (*EventUpsertBulk) Exec

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

Exec executes the query.

func (*EventUpsertBulk) ExecX

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

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

func (*EventUpsertBulk) Ignore

func (u *EventUpsertBulk) Ignore() *EventUpsertBulk

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

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

func (*EventUpsertBulk) SetAddress

func (u *EventUpsertBulk) SetAddress(v common.Address) *EventUpsertBulk

SetAddress sets the "address" field.

func (*EventUpsertBulk) SetCreatedAt

func (u *EventUpsertBulk) SetCreatedAt(v time.Time) *EventUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*EventUpsertBulk) SetHash

func (u *EventUpsertBulk) SetHash(v common.Hash) *EventUpsertBulk

SetHash sets the "hash" field.

func (*EventUpsertBulk) SetIndex

func (u *EventUpsertBulk) SetIndex(v uint64) *EventUpsertBulk

SetIndex sets the "index" field.

func (*EventUpsertBulk) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EventUpsertBulk) Update

func (u *EventUpsertBulk) Update(set func(*EventUpsert)) *EventUpsertBulk

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

func (*EventUpsertBulk) UpdateAddress

func (u *EventUpsertBulk) UpdateAddress() *EventUpsertBulk

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

func (*EventUpsertBulk) UpdateCreatedAt

func (u *EventUpsertBulk) UpdateCreatedAt() *EventUpsertBulk

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

func (*EventUpsertBulk) UpdateHash

func (u *EventUpsertBulk) UpdateHash() *EventUpsertBulk

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

func (*EventUpsertBulk) UpdateIndex

func (u *EventUpsertBulk) UpdateIndex() *EventUpsertBulk

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

func (*EventUpsertBulk) UpdateNewValues

func (u *EventUpsertBulk) UpdateNewValues() *EventUpsertBulk

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

client.Event.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(event.FieldID)
		}),
	).
	Exec(ctx)

func (*EventUpsertBulk) UpdateUpdatedAt

func (u *EventUpsertBulk) UpdateUpdatedAt() *EventUpsertBulk

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

type EventUpsertOne

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

EventUpsertOne is the builder for "upsert"-ing

one Event node.

func (*EventUpsertOne) AddIndex

func (u *EventUpsertOne) AddIndex(v uint64) *EventUpsertOne

AddIndex adds v to the "index" field.

func (*EventUpsertOne) DoNothing

func (u *EventUpsertOne) DoNothing() *EventUpsertOne

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

func (*EventUpsertOne) Exec

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

Exec executes the query.

func (*EventUpsertOne) ExecX

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

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

func (*EventUpsertOne) ID

func (u *EventUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*EventUpsertOne) IDX

func (u *EventUpsertOne) IDX(ctx context.Context) string

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

func (*EventUpsertOne) Ignore

func (u *EventUpsertOne) Ignore() *EventUpsertOne

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

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

func (*EventUpsertOne) SetAddress

func (u *EventUpsertOne) SetAddress(v common.Address) *EventUpsertOne

SetAddress sets the "address" field.

func (*EventUpsertOne) SetCreatedAt

func (u *EventUpsertOne) SetCreatedAt(v time.Time) *EventUpsertOne

SetCreatedAt sets the "created_at" field.

func (*EventUpsertOne) SetHash

func (u *EventUpsertOne) SetHash(v common.Hash) *EventUpsertOne

SetHash sets the "hash" field.

func (*EventUpsertOne) SetIndex

func (u *EventUpsertOne) SetIndex(v uint64) *EventUpsertOne

SetIndex sets the "index" field.

func (*EventUpsertOne) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EventUpsertOne) Update

func (u *EventUpsertOne) Update(set func(*EventUpsert)) *EventUpsertOne

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

func (*EventUpsertOne) UpdateAddress

func (u *EventUpsertOne) UpdateAddress() *EventUpsertOne

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

func (*EventUpsertOne) UpdateCreatedAt

func (u *EventUpsertOne) UpdateCreatedAt() *EventUpsertOne

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

func (*EventUpsertOne) UpdateHash

func (u *EventUpsertOne) UpdateHash() *EventUpsertOne

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

func (*EventUpsertOne) UpdateIndex

func (u *EventUpsertOne) UpdateIndex() *EventUpsertOne

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

func (*EventUpsertOne) UpdateNewValues

func (u *EventUpsertOne) UpdateNewValues() *EventUpsertOne

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.Event.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(event.FieldID)
		}),
	).
	Exec(ctx)

func (*EventUpsertOne) UpdateUpdatedAt

func (u *EventUpsertOne) UpdateUpdatedAt() *EventUpsertOne

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

type EventWhereInput

type EventWhereInput struct {
	Not *EventWhereInput   `json:"not,omitempty"`
	Or  []*EventWhereInput `json:"or,omitempty"`
	And []*EventWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "index" field predicates.
	Index      *uint64  `json:"index,omitempty"`
	IndexNEQ   *uint64  `json:"indexNEQ,omitempty"`
	IndexIn    []uint64 `json:"indexIn,omitempty"`
	IndexNotIn []uint64 `json:"indexNotIn,omitempty"`
	IndexGT    *uint64  `json:"indexGT,omitempty"`
	IndexGTE   *uint64  `json:"indexGTE,omitempty"`
	IndexLT    *uint64  `json:"indexLT,omitempty"`
	IndexLTE   *uint64  `json:"indexLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`
}

EventWhereInput represents a where input for filtering Event queries.

func (*EventWhereInput) Filter

func (i *EventWhereInput) Filter(q *EventQuery) (*EventQuery, error)

Filter applies the EventWhereInput filter on the EventQuery builder.

func (*EventWhereInput) P

P returns a predicate for filtering events. An error is returned if the input is empty or invalid.

type Events

type Events []*Event

Events is a parsable slice of Event.

type Field

type Field struct {
	Type  string `json:"type,omitempty"`  // field type.
	Name  string `json:"name,omitempty"`  // field name (as in struct).
	Value string `json:"value,omitempty"` // stringified value.
}

Field of a node.

type GameHustler

type GameHustler struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// LastPosition holds the value of the "last_position" field.
	LastPosition schema.Position `json:"last_position,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GameHustlerQuery when eager-loading is set.
	Edges GameHustlerEdges `json:"edges"`
	// contains filtered or unexported fields
}

GameHustler is the model entity for the GameHustler schema.

func (*GameHustler) Items

func (gh *GameHustler) Items(ctx context.Context) ([]*GameHustlerItem, error)

func (*GameHustler) Node

func (gh *GameHustler) Node(ctx context.Context) (node *Node, err error)

func (*GameHustler) QueryItems

func (gh *GameHustler) QueryItems() *GameHustlerItemQuery

QueryItems queries the "items" edge of the GameHustler entity.

func (*GameHustler) QueryQuests

func (gh *GameHustler) QueryQuests() *GameHustlerQuestQuery

QueryQuests queries the "quests" edge of the GameHustler entity.

func (*GameHustler) QueryRelations

func (gh *GameHustler) QueryRelations() *GameHustlerRelationQuery

QueryRelations queries the "relations" edge of the GameHustler entity.

func (*GameHustler) Quests

func (gh *GameHustler) Quests(ctx context.Context) ([]*GameHustlerQuest, error)

func (*GameHustler) Relations

func (gh *GameHustler) Relations(ctx context.Context) ([]*GameHustlerRelation, error)

func (*GameHustler) String

func (gh *GameHustler) String() string

String implements the fmt.Stringer.

func (*GameHustler) ToEdge

func (gh *GameHustler) ToEdge(order *GameHustlerOrder) *GameHustlerEdge

ToEdge converts GameHustler into GameHustlerEdge.

func (*GameHustler) Unwrap

func (gh *GameHustler) Unwrap() *GameHustler

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

func (gh *GameHustler) Update() *GameHustlerUpdateOne

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

type GameHustlerClient

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

GameHustlerClient is a client for the GameHustler schema.

func NewGameHustlerClient

func NewGameHustlerClient(c config) *GameHustlerClient

NewGameHustlerClient returns a client for the GameHustler from the given config.

func (*GameHustlerClient) Create

func (c *GameHustlerClient) Create() *GameHustlerCreate

Create returns a create builder for GameHustler.

func (*GameHustlerClient) CreateBulk

func (c *GameHustlerClient) CreateBulk(builders ...*GameHustlerCreate) *GameHustlerCreateBulk

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

func (*GameHustlerClient) Delete

func (c *GameHustlerClient) Delete() *GameHustlerDelete

Delete returns a delete builder for GameHustler.

func (*GameHustlerClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*GameHustlerClient) DeleteOneID

func (c *GameHustlerClient) DeleteOneID(id string) *GameHustlerDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*GameHustlerClient) Get

Get returns a GameHustler entity by its id.

func (*GameHustlerClient) GetX

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

func (*GameHustlerClient) Hooks

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

Hooks returns the client hooks.

func (*GameHustlerClient) Query

func (c *GameHustlerClient) Query() *GameHustlerQuery

Query returns a query builder for GameHustler.

func (*GameHustlerClient) QueryItems

QueryItems queries the items edge of a GameHustler.

func (*GameHustlerClient) QueryQuests

QueryQuests queries the quests edge of a GameHustler.

func (*GameHustlerClient) QueryRelations

func (c *GameHustlerClient) QueryRelations(gh *GameHustler) *GameHustlerRelationQuery

QueryRelations queries the relations edge of a GameHustler.

func (*GameHustlerClient) Update

func (c *GameHustlerClient) Update() *GameHustlerUpdate

Update returns an update builder for GameHustler.

func (*GameHustlerClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GameHustlerClient) UpdateOneID

func (c *GameHustlerClient) UpdateOneID(id string) *GameHustlerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GameHustlerClient) Use

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

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

type GameHustlerConnection

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

GameHustlerConnection is the connection containing edges to GameHustler.

type GameHustlerCreate

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

GameHustlerCreate is the builder for creating a GameHustler entity.

func (*GameHustlerCreate) AddItemIDs

func (ghc *GameHustlerCreate) AddItemIDs(ids ...string) *GameHustlerCreate

AddItemIDs adds the "items" edge to the GameHustlerItem entity by IDs.

func (*GameHustlerCreate) AddItems

func (ghc *GameHustlerCreate) AddItems(g ...*GameHustlerItem) *GameHustlerCreate

AddItems adds the "items" edges to the GameHustlerItem entity.

func (*GameHustlerCreate) AddQuestIDs

func (ghc *GameHustlerCreate) AddQuestIDs(ids ...string) *GameHustlerCreate

AddQuestIDs adds the "quests" edge to the GameHustlerQuest entity by IDs.

func (*GameHustlerCreate) AddQuests

func (ghc *GameHustlerCreate) AddQuests(g ...*GameHustlerQuest) *GameHustlerCreate

AddQuests adds the "quests" edges to the GameHustlerQuest entity.

func (*GameHustlerCreate) AddRelationIDs

func (ghc *GameHustlerCreate) AddRelationIDs(ids ...string) *GameHustlerCreate

AddRelationIDs adds the "relations" edge to the GameHustlerRelation entity by IDs.

func (*GameHustlerCreate) AddRelations

func (ghc *GameHustlerCreate) AddRelations(g ...*GameHustlerRelation) *GameHustlerCreate

AddRelations adds the "relations" edges to the GameHustlerRelation entity.

func (*GameHustlerCreate) Exec

func (ghc *GameHustlerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GameHustlerCreate) ExecX

func (ghc *GameHustlerCreate) ExecX(ctx context.Context)

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

func (*GameHustlerCreate) Mutation

func (ghc *GameHustlerCreate) Mutation() *GameHustlerMutation

Mutation returns the GameHustlerMutation object of the builder.

func (*GameHustlerCreate) OnConflict

func (ghc *GameHustlerCreate) OnConflict(opts ...sql.ConflictOption) *GameHustlerUpsertOne

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

client.GameHustler.Create().
	SetLastPosition(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.GameHustlerUpsert) {
		SetLastPosition(v+v).
	}).
	Exec(ctx)

func (*GameHustlerCreate) OnConflictColumns

func (ghc *GameHustlerCreate) OnConflictColumns(columns ...string) *GameHustlerUpsertOne

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

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

func (*GameHustlerCreate) Save

func (ghc *GameHustlerCreate) Save(ctx context.Context) (*GameHustler, error)

Save creates the GameHustler in the database.

func (*GameHustlerCreate) SaveX

func (ghc *GameHustlerCreate) SaveX(ctx context.Context) *GameHustler

SaveX calls Save and panics if Save returns an error.

func (*GameHustlerCreate) SetCreatedAt

func (ghc *GameHustlerCreate) SetCreatedAt(t time.Time) *GameHustlerCreate

SetCreatedAt sets the "created_at" field.

func (*GameHustlerCreate) SetID

SetID sets the "id" field.

func (*GameHustlerCreate) SetLastPosition

func (ghc *GameHustlerCreate) SetLastPosition(s schema.Position) *GameHustlerCreate

SetLastPosition sets the "last_position" field.

func (*GameHustlerCreate) SetNillableCreatedAt

func (ghc *GameHustlerCreate) SetNillableCreatedAt(t *time.Time) *GameHustlerCreate

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

type GameHustlerCreateBulk

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

GameHustlerCreateBulk is the builder for creating many GameHustler entities in bulk.

func (*GameHustlerCreateBulk) Exec

func (ghcb *GameHustlerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GameHustlerCreateBulk) ExecX

func (ghcb *GameHustlerCreateBulk) ExecX(ctx context.Context)

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

func (*GameHustlerCreateBulk) OnConflict

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

client.GameHustler.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.GameHustlerUpsert) {
		SetLastPosition(v+v).
	}).
	Exec(ctx)

func (*GameHustlerCreateBulk) OnConflictColumns

func (ghcb *GameHustlerCreateBulk) OnConflictColumns(columns ...string) *GameHustlerUpsertBulk

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

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

func (*GameHustlerCreateBulk) Save

func (ghcb *GameHustlerCreateBulk) Save(ctx context.Context) ([]*GameHustler, error)

Save creates the GameHustler entities in the database.

func (*GameHustlerCreateBulk) SaveX

func (ghcb *GameHustlerCreateBulk) SaveX(ctx context.Context) []*GameHustler

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

type GameHustlerDelete

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

GameHustlerDelete is the builder for deleting a GameHustler entity.

func (*GameHustlerDelete) Exec

func (ghd *GameHustlerDelete) Exec(ctx context.Context) (int, error)

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

func (*GameHustlerDelete) ExecX

func (ghd *GameHustlerDelete) ExecX(ctx context.Context) int

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

func (*GameHustlerDelete) Where

Where appends a list predicates to the GameHustlerDelete builder.

type GameHustlerDeleteOne

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

GameHustlerDeleteOne is the builder for deleting a single GameHustler entity.

func (*GameHustlerDeleteOne) Exec

func (ghdo *GameHustlerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GameHustlerDeleteOne) ExecX

func (ghdo *GameHustlerDeleteOne) ExecX(ctx context.Context)

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

type GameHustlerEdge

type GameHustlerEdge struct {
	Node   *GameHustler `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

GameHustlerEdge is the edge representation of GameHustler.

type GameHustlerEdges

type GameHustlerEdges struct {
	// Relations holds the value of the relations edge.
	Relations []*GameHustlerRelation `json:"relations,omitempty"`
	// Items holds the value of the items edge.
	Items []*GameHustlerItem `json:"items,omitempty"`
	// Quests holds the value of the quests edge.
	Quests []*GameHustlerQuest `json:"quests,omitempty"`
	// contains filtered or unexported fields
}

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

func (GameHustlerEdges) ItemsOrErr

func (e GameHustlerEdges) ItemsOrErr() ([]*GameHustlerItem, error)

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

func (GameHustlerEdges) QuestsOrErr

func (e GameHustlerEdges) QuestsOrErr() ([]*GameHustlerQuest, error)

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

func (GameHustlerEdges) RelationsOrErr

func (e GameHustlerEdges) RelationsOrErr() ([]*GameHustlerRelation, error)

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

type GameHustlerGroupBy

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

GameHustlerGroupBy is the group-by builder for GameHustler entities.

func (*GameHustlerGroupBy) Aggregate

func (ghgb *GameHustlerGroupBy) Aggregate(fns ...AggregateFunc) *GameHustlerGroupBy

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

func (*GameHustlerGroupBy) Bool

func (ghgb *GameHustlerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerGroupBy) BoolX

func (ghgb *GameHustlerGroupBy) BoolX(ctx context.Context) bool

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

func (*GameHustlerGroupBy) Bools

func (ghgb *GameHustlerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerGroupBy) BoolsX

func (ghgb *GameHustlerGroupBy) BoolsX(ctx context.Context) []bool

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

func (*GameHustlerGroupBy) Float64

func (ghgb *GameHustlerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerGroupBy) Float64X

func (ghgb *GameHustlerGroupBy) Float64X(ctx context.Context) float64

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

func (*GameHustlerGroupBy) Float64s

func (ghgb *GameHustlerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerGroupBy) Float64sX

func (ghgb *GameHustlerGroupBy) Float64sX(ctx context.Context) []float64

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

func (*GameHustlerGroupBy) Int

func (ghgb *GameHustlerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerGroupBy) IntX

func (ghgb *GameHustlerGroupBy) IntX(ctx context.Context) int

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

func (*GameHustlerGroupBy) Ints

func (ghgb *GameHustlerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerGroupBy) IntsX

func (ghgb *GameHustlerGroupBy) IntsX(ctx context.Context) []int

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

func (*GameHustlerGroupBy) Scan

func (ghgb *GameHustlerGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*GameHustlerGroupBy) ScanX

func (ghgb *GameHustlerGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*GameHustlerGroupBy) String

func (ghgb *GameHustlerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerGroupBy) StringX

func (ghgb *GameHustlerGroupBy) StringX(ctx context.Context) string

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

func (*GameHustlerGroupBy) Strings

func (ghgb *GameHustlerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerGroupBy) StringsX

func (ghgb *GameHustlerGroupBy) StringsX(ctx context.Context) []string

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

type GameHustlerItem

type GameHustlerItem struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Item holds the value of the "item" field.
	Item string `json:"item,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GameHustlerItemQuery when eager-loading is set.
	Edges GameHustlerItemEdges `json:"edges"`
	// contains filtered or unexported fields
}

GameHustlerItem is the model entity for the GameHustlerItem schema.

func (*GameHustlerItem) Hustler

func (ghi *GameHustlerItem) Hustler(ctx context.Context) (*GameHustler, error)

func (*GameHustlerItem) Node

func (ghi *GameHustlerItem) Node(ctx context.Context) (node *Node, err error)

func (*GameHustlerItem) QueryHustler

func (ghi *GameHustlerItem) QueryHustler() *GameHustlerQuery

QueryHustler queries the "hustler" edge of the GameHustlerItem entity.

func (*GameHustlerItem) String

func (ghi *GameHustlerItem) String() string

String implements the fmt.Stringer.

func (*GameHustlerItem) ToEdge

ToEdge converts GameHustlerItem into GameHustlerItemEdge.

func (*GameHustlerItem) Unwrap

func (ghi *GameHustlerItem) Unwrap() *GameHustlerItem

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

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

type GameHustlerItemClient

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

GameHustlerItemClient is a client for the GameHustlerItem schema.

func NewGameHustlerItemClient

func NewGameHustlerItemClient(c config) *GameHustlerItemClient

NewGameHustlerItemClient returns a client for the GameHustlerItem from the given config.

func (*GameHustlerItemClient) Create

Create returns a create builder for GameHustlerItem.

func (*GameHustlerItemClient) CreateBulk

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

func (*GameHustlerItemClient) Delete

Delete returns a delete builder for GameHustlerItem.

func (*GameHustlerItemClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*GameHustlerItemClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*GameHustlerItemClient) Get

Get returns a GameHustlerItem entity by its id.

func (*GameHustlerItemClient) GetX

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

func (*GameHustlerItemClient) Hooks

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

Hooks returns the client hooks.

func (*GameHustlerItemClient) Query

Query returns a query builder for GameHustlerItem.

func (*GameHustlerItemClient) QueryHustler

QueryHustler queries the hustler edge of a GameHustlerItem.

func (*GameHustlerItemClient) Update

Update returns an update builder for GameHustlerItem.

func (*GameHustlerItemClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GameHustlerItemClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*GameHustlerItemClient) Use

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

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

type GameHustlerItemConnection

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

GameHustlerItemConnection is the connection containing edges to GameHustlerItem.

type GameHustlerItemCreate

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

GameHustlerItemCreate is the builder for creating a GameHustlerItem entity.

func (*GameHustlerItemCreate) Exec

func (ghic *GameHustlerItemCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GameHustlerItemCreate) ExecX

func (ghic *GameHustlerItemCreate) ExecX(ctx context.Context)

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

func (*GameHustlerItemCreate) Mutation

Mutation returns the GameHustlerItemMutation object of the builder.

func (*GameHustlerItemCreate) OnConflict

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

client.GameHustlerItem.Create().
	SetItem(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.GameHustlerItemUpsert) {
		SetItem(v+v).
	}).
	Exec(ctx)

func (*GameHustlerItemCreate) OnConflictColumns

func (ghic *GameHustlerItemCreate) OnConflictColumns(columns ...string) *GameHustlerItemUpsertOne

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

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

func (*GameHustlerItemCreate) Save

Save creates the GameHustlerItem in the database.

func (*GameHustlerItemCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*GameHustlerItemCreate) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerItemCreate) SetHustlerID

func (ghic *GameHustlerItemCreate) SetHustlerID(id string) *GameHustlerItemCreate

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerItemCreate) SetID

SetID sets the "id" field.

func (*GameHustlerItemCreate) SetItem

SetItem sets the "item" field.

func (*GameHustlerItemCreate) SetNillableHustlerID

func (ghic *GameHustlerItemCreate) SetNillableHustlerID(id *string) *GameHustlerItemCreate

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

func (*GameHustlerItemCreate) SetNillableID

func (ghic *GameHustlerItemCreate) SetNillableID(s *string) *GameHustlerItemCreate

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

type GameHustlerItemCreateBulk

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

GameHustlerItemCreateBulk is the builder for creating many GameHustlerItem entities in bulk.

func (*GameHustlerItemCreateBulk) Exec

Exec executes the query.

func (*GameHustlerItemCreateBulk) ExecX

func (ghicb *GameHustlerItemCreateBulk) ExecX(ctx context.Context)

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

func (*GameHustlerItemCreateBulk) OnConflict

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

client.GameHustlerItem.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.GameHustlerItemUpsert) {
		SetItem(v+v).
	}).
	Exec(ctx)

func (*GameHustlerItemCreateBulk) OnConflictColumns

func (ghicb *GameHustlerItemCreateBulk) OnConflictColumns(columns ...string) *GameHustlerItemUpsertBulk

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

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

func (*GameHustlerItemCreateBulk) Save

Save creates the GameHustlerItem entities in the database.

func (*GameHustlerItemCreateBulk) SaveX

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

type GameHustlerItemDelete

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

GameHustlerItemDelete is the builder for deleting a GameHustlerItem entity.

func (*GameHustlerItemDelete) Exec

func (ghid *GameHustlerItemDelete) Exec(ctx context.Context) (int, error)

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

func (*GameHustlerItemDelete) ExecX

func (ghid *GameHustlerItemDelete) ExecX(ctx context.Context) int

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

func (*GameHustlerItemDelete) Where

Where appends a list predicates to the GameHustlerItemDelete builder.

type GameHustlerItemDeleteOne

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

GameHustlerItemDeleteOne is the builder for deleting a single GameHustlerItem entity.

func (*GameHustlerItemDeleteOne) Exec

func (ghido *GameHustlerItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GameHustlerItemDeleteOne) ExecX

func (ghido *GameHustlerItemDeleteOne) ExecX(ctx context.Context)

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

type GameHustlerItemEdge

type GameHustlerItemEdge struct {
	Node   *GameHustlerItem `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

GameHustlerItemEdge is the edge representation of GameHustlerItem.

type GameHustlerItemEdges

type GameHustlerItemEdges struct {
	// Hustler holds the value of the hustler edge.
	Hustler *GameHustler `json:"hustler,omitempty"`
	// contains filtered or unexported fields
}

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

func (GameHustlerItemEdges) HustlerOrErr

func (e GameHustlerItemEdges) HustlerOrErr() (*GameHustler, error)

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

type GameHustlerItemGroupBy

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

GameHustlerItemGroupBy is the group-by builder for GameHustlerItem entities.

func (*GameHustlerItemGroupBy) Aggregate

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

func (*GameHustlerItemGroupBy) Bool

func (ghigb *GameHustlerItemGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerItemGroupBy) BoolX

func (ghigb *GameHustlerItemGroupBy) BoolX(ctx context.Context) bool

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

func (*GameHustlerItemGroupBy) Bools

func (ghigb *GameHustlerItemGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerItemGroupBy) BoolsX

func (ghigb *GameHustlerItemGroupBy) BoolsX(ctx context.Context) []bool

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

func (*GameHustlerItemGroupBy) Float64

func (ghigb *GameHustlerItemGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerItemGroupBy) Float64X

func (ghigb *GameHustlerItemGroupBy) Float64X(ctx context.Context) float64

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

func (*GameHustlerItemGroupBy) Float64s

func (ghigb *GameHustlerItemGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerItemGroupBy) Float64sX

func (ghigb *GameHustlerItemGroupBy) Float64sX(ctx context.Context) []float64

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

func (*GameHustlerItemGroupBy) Int

func (ghigb *GameHustlerItemGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerItemGroupBy) IntX

func (ghigb *GameHustlerItemGroupBy) IntX(ctx context.Context) int

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

func (*GameHustlerItemGroupBy) Ints

func (ghigb *GameHustlerItemGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerItemGroupBy) IntsX

func (ghigb *GameHustlerItemGroupBy) IntsX(ctx context.Context) []int

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

func (*GameHustlerItemGroupBy) Scan

func (ghigb *GameHustlerItemGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*GameHustlerItemGroupBy) ScanX

func (ghigb *GameHustlerItemGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*GameHustlerItemGroupBy) String

func (ghigb *GameHustlerItemGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerItemGroupBy) StringX

func (ghigb *GameHustlerItemGroupBy) StringX(ctx context.Context) string

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

func (*GameHustlerItemGroupBy) Strings

func (ghigb *GameHustlerItemGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerItemGroupBy) StringsX

func (ghigb *GameHustlerItemGroupBy) StringsX(ctx context.Context) []string

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

type GameHustlerItemMutation

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

GameHustlerItemMutation represents an operation that mutates the GameHustlerItem nodes in the graph.

func (*GameHustlerItemMutation) AddField

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

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

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

func (*GameHustlerItemMutation) AddedField

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

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

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

func (*GameHustlerItemMutation) AddedIDs

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

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

func (*GameHustlerItemMutation) ClearEdge

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

func (m *GameHustlerItemMutation) 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 (*GameHustlerItemMutation) ClearHustler

func (m *GameHustlerItemMutation) ClearHustler()

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerItemMutation) ClearedEdges

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

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

func (*GameHustlerItemMutation) ClearedFields

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

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

func (GameHustlerItemMutation) Client

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

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

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

func (*GameHustlerItemMutation) Field

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

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

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

func (*GameHustlerItemMutation) Fields

func (m *GameHustlerItemMutation) 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 (*GameHustlerItemMutation) HustlerCleared

func (m *GameHustlerItemMutation) HustlerCleared() bool

HustlerCleared reports if the "hustler" edge to the GameHustler entity was cleared.

func (*GameHustlerItemMutation) HustlerID

func (m *GameHustlerItemMutation) HustlerID() (id string, exists bool)

HustlerID returns the "hustler" edge ID in the mutation.

func (*GameHustlerItemMutation) HustlerIDs

func (m *GameHustlerItemMutation) HustlerIDs() (ids []string)

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

func (*GameHustlerItemMutation) ID

func (m *GameHustlerItemMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*GameHustlerItemMutation) 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 (*GameHustlerItemMutation) Item

func (m *GameHustlerItemMutation) Item() (r string, exists bool)

Item returns the value of the "item" field in the mutation.

func (*GameHustlerItemMutation) OldField

func (m *GameHustlerItemMutation) 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 (*GameHustlerItemMutation) OldItem

func (m *GameHustlerItemMutation) OldItem(ctx context.Context) (v string, err error)

OldItem returns the old "item" field's value of the GameHustlerItem entity. If the GameHustlerItem 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 (*GameHustlerItemMutation) Op

func (m *GameHustlerItemMutation) Op() Op

Op returns the operation name.

func (*GameHustlerItemMutation) RemovedEdges

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

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

func (*GameHustlerItemMutation) RemovedIDs

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

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

func (m *GameHustlerItemMutation) 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 (*GameHustlerItemMutation) ResetHustler

func (m *GameHustlerItemMutation) ResetHustler()

ResetHustler resets all changes to the "hustler" edge.

func (*GameHustlerItemMutation) ResetItem

func (m *GameHustlerItemMutation) ResetItem()

ResetItem resets all changes to the "item" field.

func (*GameHustlerItemMutation) SetField

func (m *GameHustlerItemMutation) 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 (*GameHustlerItemMutation) SetHustlerID

func (m *GameHustlerItemMutation) SetHustlerID(id string)

SetHustlerID sets the "hustler" edge to the GameHustler entity by id.

func (*GameHustlerItemMutation) SetID

func (m *GameHustlerItemMutation) SetID(id string)

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

func (*GameHustlerItemMutation) SetItem

func (m *GameHustlerItemMutation) SetItem(s string)

SetItem sets the "item" field.

func (GameHustlerItemMutation) Tx

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

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

func (*GameHustlerItemMutation) Type

func (m *GameHustlerItemMutation) Type() string

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

func (*GameHustlerItemMutation) Where

Where appends a list predicates to the GameHustlerItemMutation builder.

type GameHustlerItemOrder

type GameHustlerItemOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *GameHustlerItemOrderField `json:"field"`
}

GameHustlerItemOrder defines the ordering of GameHustlerItem.

type GameHustlerItemOrderField

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

GameHustlerItemOrderField defines the ordering field of GameHustlerItem.

type GameHustlerItemPaginateOption

type GameHustlerItemPaginateOption func(*gameHustlerItemPager) error

GameHustlerItemPaginateOption enables pagination customization.

func WithGameHustlerItemFilter

func WithGameHustlerItemFilter(filter func(*GameHustlerItemQuery) (*GameHustlerItemQuery, error)) GameHustlerItemPaginateOption

WithGameHustlerItemFilter configures pagination filter.

func WithGameHustlerItemOrder

func WithGameHustlerItemOrder(order *GameHustlerItemOrder) GameHustlerItemPaginateOption

WithGameHustlerItemOrder configures pagination ordering.

type GameHustlerItemQuery

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

GameHustlerItemQuery is the builder for querying GameHustlerItem entities.

func (*GameHustlerItemQuery) All

All executes the query and returns a list of GameHustlerItems.

func (*GameHustlerItemQuery) AllX

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

func (*GameHustlerItemQuery) Clone

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

func (*GameHustlerItemQuery) CollectFields

func (ghi *GameHustlerItemQuery) CollectFields(ctx context.Context, satisfies ...string) *GameHustlerItemQuery

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

func (*GameHustlerItemQuery) Count

func (ghiq *GameHustlerItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GameHustlerItemQuery) CountX

func (ghiq *GameHustlerItemQuery) CountX(ctx context.Context) int

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

func (*GameHustlerItemQuery) Exist

func (ghiq *GameHustlerItemQuery) Exist(ctx context.Context) (bool, error)

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

func (*GameHustlerItemQuery) ExistX

func (ghiq *GameHustlerItemQuery) ExistX(ctx context.Context) bool

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

func (*GameHustlerItemQuery) First

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

func (*GameHustlerItemQuery) FirstID

func (ghiq *GameHustlerItemQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*GameHustlerItemQuery) FirstIDX

func (ghiq *GameHustlerItemQuery) FirstIDX(ctx context.Context) string

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

func (*GameHustlerItemQuery) FirstX

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

func (*GameHustlerItemQuery) GroupBy

func (ghiq *GameHustlerItemQuery) GroupBy(field string, fields ...string) *GameHustlerItemGroupBy

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

client.GameHustlerItem.Query().
	GroupBy(gamehustleritem.FieldItem).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GameHustlerItemQuery) IDs

func (ghiq *GameHustlerItemQuery) IDs(ctx context.Context) ([]string, error)

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

func (*GameHustlerItemQuery) IDsX

func (ghiq *GameHustlerItemQuery) IDsX(ctx context.Context) []string

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

func (*GameHustlerItemQuery) Limit

func (ghiq *GameHustlerItemQuery) Limit(limit int) *GameHustlerItemQuery

Limit adds a limit step to the query.

func (*GameHustlerItemQuery) Offset

func (ghiq *GameHustlerItemQuery) Offset(offset int) *GameHustlerItemQuery

Offset adds an offset step to the query.

func (*GameHustlerItemQuery) Only

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

func (*GameHustlerItemQuery) OnlyID

func (ghiq *GameHustlerItemQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*GameHustlerItemQuery) OnlyIDX

func (ghiq *GameHustlerItemQuery) OnlyIDX(ctx context.Context) string

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

func (*GameHustlerItemQuery) OnlyX

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

func (*GameHustlerItemQuery) Order

Order adds an order step to the query.

func (*GameHustlerItemQuery) Paginate

func (ghi *GameHustlerItemQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GameHustlerItemPaginateOption,
) (*GameHustlerItemConnection, error)

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

func (*GameHustlerItemQuery) QueryHustler

func (ghiq *GameHustlerItemQuery) QueryHustler() *GameHustlerQuery

QueryHustler chains the current query on the "hustler" edge.

func (*GameHustlerItemQuery) Select

func (ghiq *GameHustlerItemQuery) Select(fields ...string) *GameHustlerItemSelect

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

client.GameHustlerItem.Query().
	Select(gamehustleritem.FieldItem).
	Scan(ctx, &v)

func (*GameHustlerItemQuery) Unique

func (ghiq *GameHustlerItemQuery) Unique(unique bool) *GameHustlerItemQuery

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

Where adds a new predicate for the GameHustlerItemQuery builder.

func (*GameHustlerItemQuery) WithHustler

func (ghiq *GameHustlerItemQuery) WithHustler(opts ...func(*GameHustlerQuery)) *GameHustlerItemQuery

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

type GameHustlerItemSelect

type GameHustlerItemSelect struct {
	*GameHustlerItemQuery
	// contains filtered or unexported fields
}

GameHustlerItemSelect is the builder for selecting fields of GameHustlerItem entities.

func (*GameHustlerItemSelect) Bool

func (ghis *GameHustlerItemSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*GameHustlerItemSelect) BoolX

func (ghis *GameHustlerItemSelect) BoolX(ctx context.Context) bool

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

func (*GameHustlerItemSelect) Bools

func (ghis *GameHustlerItemSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*GameHustlerItemSelect) BoolsX

func (ghis *GameHustlerItemSelect) BoolsX(ctx context.Context) []bool

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

func (*GameHustlerItemSelect) Float64

func (ghis *GameHustlerItemSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*GameHustlerItemSelect) Float64X

func (ghis *GameHustlerItemSelect) Float64X(ctx context.Context) float64

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

func (*GameHustlerItemSelect) Float64s

func (ghis *GameHustlerItemSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*GameHustlerItemSelect) Float64sX

func (ghis *GameHustlerItemSelect) Float64sX(ctx context.Context) []float64

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

func (*GameHustlerItemSelect) Int

func (ghis *GameHustlerItemSelect) Int(ctx context.Context) (_ int, err error)

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

func (*GameHustlerItemSelect) IntX

func (ghis *GameHustlerItemSelect) IntX(ctx context.Context) int

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

func (*GameHustlerItemSelect) Ints

func (ghis *GameHustlerItemSelect) Ints(ctx context.Context) ([]int, error)

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

func (*GameHustlerItemSelect) IntsX

func (ghis *GameHustlerItemSelect) IntsX(ctx context.Context) []int

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

func (*GameHustlerItemSelect) Scan

func (ghis *GameHustlerItemSelect) Scan(ctx context.Context, v interface{}) error

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

func (*GameHustlerItemSelect) ScanX

func (ghis *GameHustlerItemSelect) ScanX(ctx context.Context, v interface{})

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

func (*GameHustlerItemSelect) String

func (ghis *GameHustlerItemSelect) String(ctx context.Context) (_ string, err error)

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

func (*GameHustlerItemSelect) StringX

func (ghis *GameHustlerItemSelect) StringX(ctx context.Context) string

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

func (*GameHustlerItemSelect) Strings

func (ghis *GameHustlerItemSelect) Strings(ctx context.Context) ([]string, error)

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

func (*GameHustlerItemSelect) StringsX

func (ghis *GameHustlerItemSelect) StringsX(ctx context.Context) []string

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

type GameHustlerItemUpdate

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

GameHustlerItemUpdate is the builder for updating GameHustlerItem entities.

func (*GameHustlerItemUpdate) ClearHustler

func (ghiu *GameHustlerItemUpdate) ClearHustler() *GameHustlerItemUpdate

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerItemUpdate) Exec

func (ghiu *GameHustlerItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GameHustlerItemUpdate) ExecX

func (ghiu *GameHustlerItemUpdate) ExecX(ctx context.Context)

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

func (*GameHustlerItemUpdate) Mutation

Mutation returns the GameHustlerItemMutation object of the builder.

func (*GameHustlerItemUpdate) Save

func (ghiu *GameHustlerItemUpdate) Save(ctx context.Context) (int, error)

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

func (*GameHustlerItemUpdate) SaveX

func (ghiu *GameHustlerItemUpdate) SaveX(ctx context.Context) int

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

func (*GameHustlerItemUpdate) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerItemUpdate) SetHustlerID

func (ghiu *GameHustlerItemUpdate) SetHustlerID(id string) *GameHustlerItemUpdate

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerItemUpdate) SetItem

SetItem sets the "item" field.

func (*GameHustlerItemUpdate) SetNillableHustlerID

func (ghiu *GameHustlerItemUpdate) SetNillableHustlerID(id *string) *GameHustlerItemUpdate

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

func (*GameHustlerItemUpdate) Where

Where appends a list predicates to the GameHustlerItemUpdate builder.

type GameHustlerItemUpdateOne

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

GameHustlerItemUpdateOne is the builder for updating a single GameHustlerItem entity.

func (*GameHustlerItemUpdateOne) ClearHustler

func (ghiuo *GameHustlerItemUpdateOne) ClearHustler() *GameHustlerItemUpdateOne

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerItemUpdateOne) Exec

func (ghiuo *GameHustlerItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GameHustlerItemUpdateOne) ExecX

func (ghiuo *GameHustlerItemUpdateOne) ExecX(ctx context.Context)

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

func (*GameHustlerItemUpdateOne) Mutation

Mutation returns the GameHustlerItemMutation object of the builder.

func (*GameHustlerItemUpdateOne) Save

Save executes the query and returns the updated GameHustlerItem entity.

func (*GameHustlerItemUpdateOne) SaveX

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

func (*GameHustlerItemUpdateOne) Select

func (ghiuo *GameHustlerItemUpdateOne) Select(field string, fields ...string) *GameHustlerItemUpdateOne

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

func (*GameHustlerItemUpdateOne) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerItemUpdateOne) SetHustlerID

func (ghiuo *GameHustlerItemUpdateOne) SetHustlerID(id string) *GameHustlerItemUpdateOne

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerItemUpdateOne) SetItem

SetItem sets the "item" field.

func (*GameHustlerItemUpdateOne) SetNillableHustlerID

func (ghiuo *GameHustlerItemUpdateOne) SetNillableHustlerID(id *string) *GameHustlerItemUpdateOne

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

type GameHustlerItemUpsert

type GameHustlerItemUpsert struct {
	*sql.UpdateSet
}

GameHustlerItemUpsert is the "OnConflict" setter.

func (*GameHustlerItemUpsert) SetItem

SetItem sets the "item" field.

func (*GameHustlerItemUpsert) UpdateItem

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

type GameHustlerItemUpsertBulk

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

GameHustlerItemUpsertBulk is the builder for "upsert"-ing a bulk of GameHustlerItem nodes.

func (*GameHustlerItemUpsertBulk) DoNothing

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

func (*GameHustlerItemUpsertBulk) Exec

Exec executes the query.

func (*GameHustlerItemUpsertBulk) ExecX

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

func (*GameHustlerItemUpsertBulk) Ignore

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

client.GameHustlerItem.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GameHustlerItemUpsertBulk) SetItem

SetItem sets the "item" field.

func (*GameHustlerItemUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GameHustlerItemCreateBulk.OnConflict documentation for more info.

func (*GameHustlerItemUpsertBulk) UpdateItem

UpdateItem sets the "item" field to the value that was provided on create.

func (*GameHustlerItemUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GameHustlerItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(gamehustleritem.FieldID)
		}),
	).
	Exec(ctx)

type GameHustlerItemUpsertOne

type GameHustlerItemUpsertOne struct {
	// contains filtered or unexported fields
}

GameHustlerItemUpsertOne is the builder for "upsert"-ing

one GameHustlerItem node.

func (*GameHustlerItemUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GameHustlerItemUpsertOne) Exec

Exec executes the query.

func (*GameHustlerItemUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerItemUpsertOne) ID

func (u *GameHustlerItemUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GameHustlerItemUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*GameHustlerItemUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GameHustlerItem.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GameHustlerItemUpsertOne) SetItem

SetItem sets the "item" field.

func (*GameHustlerItemUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the GameHustlerItemCreate.OnConflict documentation for more info.

func (*GameHustlerItemUpsertOne) UpdateItem

UpdateItem sets the "item" field to the value that was provided on create.

func (*GameHustlerItemUpsertOne) UpdateNewValues

func (u *GameHustlerItemUpsertOne) UpdateNewValues() *GameHustlerItemUpsertOne

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.GameHustlerItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(gamehustleritem.FieldID)
		}),
	).
	Exec(ctx)

type GameHustlerItemWhereInput

type GameHustlerItemWhereInput struct {
	Not *GameHustlerItemWhereInput   `json:"not,omitempty"`
	Or  []*GameHustlerItemWhereInput `json:"or,omitempty"`
	And []*GameHustlerItemWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "item" field predicates.
	Item             *string  `json:"item,omitempty"`
	ItemNEQ          *string  `json:"itemNEQ,omitempty"`
	ItemIn           []string `json:"itemIn,omitempty"`
	ItemNotIn        []string `json:"itemNotIn,omitempty"`
	ItemGT           *string  `json:"itemGT,omitempty"`
	ItemGTE          *string  `json:"itemGTE,omitempty"`
	ItemLT           *string  `json:"itemLT,omitempty"`
	ItemLTE          *string  `json:"itemLTE,omitempty"`
	ItemContains     *string  `json:"itemContains,omitempty"`
	ItemHasPrefix    *string  `json:"itemHasPrefix,omitempty"`
	ItemHasSuffix    *string  `json:"itemHasSuffix,omitempty"`
	ItemEqualFold    *string  `json:"itemEqualFold,omitempty"`
	ItemContainsFold *string  `json:"itemContainsFold,omitempty"`

	// "hustler" edge predicates.
	HasHustler     *bool                    `json:"hasHustler,omitempty"`
	HasHustlerWith []*GameHustlerWhereInput `json:"hasHustlerWith,omitempty"`
}

GameHustlerItemWhereInput represents a where input for filtering GameHustlerItem queries.

func (*GameHustlerItemWhereInput) Filter

Filter applies the GameHustlerItemWhereInput filter on the GameHustlerItemQuery builder.

func (*GameHustlerItemWhereInput) P

P returns a predicate for filtering gamehustleritems. An error is returned if the input is empty or invalid.

type GameHustlerItems

type GameHustlerItems []*GameHustlerItem

GameHustlerItems is a parsable slice of GameHustlerItem.

type GameHustlerMutation

type GameHustlerMutation struct {
	// contains filtered or unexported fields
}

GameHustlerMutation represents an operation that mutates the GameHustler nodes in the graph.

func (*GameHustlerMutation) AddField

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) AddItemIDs

func (m *GameHustlerMutation) AddItemIDs(ids ...string)

AddItemIDs adds the "items" edge to the GameHustlerItem entity by ids.

func (*GameHustlerMutation) AddQuestIDs

func (m *GameHustlerMutation) AddQuestIDs(ids ...string)

AddQuestIDs adds the "quests" edge to the GameHustlerQuest entity by ids.

func (*GameHustlerMutation) AddRelationIDs

func (m *GameHustlerMutation) AddRelationIDs(ids ...string)

AddRelationIDs adds the "relations" edge to the GameHustlerRelation entity by ids.

func (*GameHustlerMutation) AddedEdges

func (m *GameHustlerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GameHustlerMutation) AddedField

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) AddedFields

func (m *GameHustlerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GameHustlerMutation) AddedIDs

func (m *GameHustlerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GameHustlerMutation) ClearEdge

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) ClearField

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) ClearItems

func (m *GameHustlerMutation) ClearItems()

ClearItems clears the "items" edge to the GameHustlerItem entity.

func (*GameHustlerMutation) ClearQuests

func (m *GameHustlerMutation) ClearQuests()

ClearQuests clears the "quests" edge to the GameHustlerQuest entity.

func (*GameHustlerMutation) ClearRelations

func (m *GameHustlerMutation) ClearRelations()

ClearRelations clears the "relations" edge to the GameHustlerRelation entity.

func (*GameHustlerMutation) ClearedEdges

func (m *GameHustlerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GameHustlerMutation) ClearedFields

func (m *GameHustlerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GameHustlerMutation) Client

func (m GameHustlerMutation) 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 (*GameHustlerMutation) CreatedAt

func (m *GameHustlerMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*GameHustlerMutation) EdgeCleared

func (m *GameHustlerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GameHustlerMutation) Field

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) FieldCleared

func (m *GameHustlerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GameHustlerMutation) Fields

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) ID

func (m *GameHustlerMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*GameHustlerMutation) IDs

func (m *GameHustlerMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*GameHustlerMutation) ItemsCleared

func (m *GameHustlerMutation) ItemsCleared() bool

ItemsCleared reports if the "items" edge to the GameHustlerItem entity was cleared.

func (*GameHustlerMutation) ItemsIDs

func (m *GameHustlerMutation) ItemsIDs() (ids []string)

ItemsIDs returns the "items" edge IDs in the mutation.

func (*GameHustlerMutation) LastPosition

func (m *GameHustlerMutation) LastPosition() (r schema.Position, exists bool)

LastPosition returns the value of the "last_position" field in the mutation.

func (*GameHustlerMutation) OldCreatedAt

func (m *GameHustlerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the GameHustler entity. If the GameHustler 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 (*GameHustlerMutation) OldField

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) OldLastPosition

func (m *GameHustlerMutation) OldLastPosition(ctx context.Context) (v schema.Position, err error)

OldLastPosition returns the old "last_position" field's value of the GameHustler entity. If the GameHustler 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 (*GameHustlerMutation) Op

func (m *GameHustlerMutation) Op() Op

Op returns the operation name.

func (*GameHustlerMutation) QuestsCleared

func (m *GameHustlerMutation) QuestsCleared() bool

QuestsCleared reports if the "quests" edge to the GameHustlerQuest entity was cleared.

func (*GameHustlerMutation) QuestsIDs

func (m *GameHustlerMutation) QuestsIDs() (ids []string)

QuestsIDs returns the "quests" edge IDs in the mutation.

func (*GameHustlerMutation) RelationsCleared

func (m *GameHustlerMutation) RelationsCleared() bool

RelationsCleared reports if the "relations" edge to the GameHustlerRelation entity was cleared.

func (*GameHustlerMutation) RelationsIDs

func (m *GameHustlerMutation) RelationsIDs() (ids []string)

RelationsIDs returns the "relations" edge IDs in the mutation.

func (*GameHustlerMutation) RemoveItemIDs

func (m *GameHustlerMutation) RemoveItemIDs(ids ...string)

RemoveItemIDs removes the "items" edge to the GameHustlerItem entity by IDs.

func (*GameHustlerMutation) RemoveQuestIDs

func (m *GameHustlerMutation) RemoveQuestIDs(ids ...string)

RemoveQuestIDs removes the "quests" edge to the GameHustlerQuest entity by IDs.

func (*GameHustlerMutation) RemoveRelationIDs

func (m *GameHustlerMutation) RemoveRelationIDs(ids ...string)

RemoveRelationIDs removes the "relations" edge to the GameHustlerRelation entity by IDs.

func (*GameHustlerMutation) RemovedEdges

func (m *GameHustlerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GameHustlerMutation) RemovedIDs

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) RemovedItemsIDs

func (m *GameHustlerMutation) RemovedItemsIDs() (ids []string)

RemovedItems returns the removed IDs of the "items" edge to the GameHustlerItem entity.

func (*GameHustlerMutation) RemovedQuestsIDs

func (m *GameHustlerMutation) RemovedQuestsIDs() (ids []string)

RemovedQuests returns the removed IDs of the "quests" edge to the GameHustlerQuest entity.

func (*GameHustlerMutation) RemovedRelationsIDs

func (m *GameHustlerMutation) RemovedRelationsIDs() (ids []string)

RemovedRelations returns the removed IDs of the "relations" edge to the GameHustlerRelation entity.

func (*GameHustlerMutation) ResetCreatedAt

func (m *GameHustlerMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*GameHustlerMutation) ResetEdge

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) ResetField

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) ResetItems

func (m *GameHustlerMutation) ResetItems()

ResetItems resets all changes to the "items" edge.

func (*GameHustlerMutation) ResetLastPosition

func (m *GameHustlerMutation) ResetLastPosition()

ResetLastPosition resets all changes to the "last_position" field.

func (*GameHustlerMutation) ResetQuests

func (m *GameHustlerMutation) ResetQuests()

ResetQuests resets all changes to the "quests" edge.

func (*GameHustlerMutation) ResetRelations

func (m *GameHustlerMutation) ResetRelations()

ResetRelations resets all changes to the "relations" edge.

func (*GameHustlerMutation) SetCreatedAt

func (m *GameHustlerMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*GameHustlerMutation) SetField

func (m *GameHustlerMutation) 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 (*GameHustlerMutation) SetID

func (m *GameHustlerMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of GameHustler entities.

func (*GameHustlerMutation) SetLastPosition

func (m *GameHustlerMutation) SetLastPosition(s schema.Position)

SetLastPosition sets the "last_position" field.

func (GameHustlerMutation) Tx

func (m GameHustlerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GameHustlerMutation) Type

func (m *GameHustlerMutation) Type() string

Type returns the node type of this mutation (GameHustler).

func (*GameHustlerMutation) Where

func (m *GameHustlerMutation) Where(ps ...predicate.GameHustler)

Where appends a list predicates to the GameHustlerMutation builder.

type GameHustlerOrder

type GameHustlerOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *GameHustlerOrderField `json:"field"`
}

GameHustlerOrder defines the ordering of GameHustler.

type GameHustlerOrderField

type GameHustlerOrderField struct {
	// contains filtered or unexported fields
}

GameHustlerOrderField defines the ordering field of GameHustler.

func (GameHustlerOrderField) MarshalGQL

func (f GameHustlerOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (GameHustlerOrderField) String

func (f GameHustlerOrderField) String() string

String implement fmt.Stringer interface.

func (*GameHustlerOrderField) UnmarshalGQL

func (f *GameHustlerOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type GameHustlerPaginateOption

type GameHustlerPaginateOption func(*gameHustlerPager) error

GameHustlerPaginateOption enables pagination customization.

func WithGameHustlerFilter

func WithGameHustlerFilter(filter func(*GameHustlerQuery) (*GameHustlerQuery, error)) GameHustlerPaginateOption

WithGameHustlerFilter configures pagination filter.

func WithGameHustlerOrder

func WithGameHustlerOrder(order *GameHustlerOrder) GameHustlerPaginateOption

WithGameHustlerOrder configures pagination ordering.

type GameHustlerQuery

type GameHustlerQuery struct {
	// contains filtered or unexported fields
}

GameHustlerQuery is the builder for querying GameHustler entities.

func (*GameHustlerQuery) All

func (ghq *GameHustlerQuery) All(ctx context.Context) ([]*GameHustler, error)

All executes the query and returns a list of GameHustlers.

func (*GameHustlerQuery) AllX

func (ghq *GameHustlerQuery) AllX(ctx context.Context) []*GameHustler

AllX is like All, but panics if an error occurs.

func (*GameHustlerQuery) Clone

func (ghq *GameHustlerQuery) Clone() *GameHustlerQuery

Clone returns a duplicate of the GameHustlerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GameHustlerQuery) CollectFields

func (gh *GameHustlerQuery) CollectFields(ctx context.Context, satisfies ...string) *GameHustlerQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*GameHustlerQuery) Count

func (ghq *GameHustlerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GameHustlerQuery) CountX

func (ghq *GameHustlerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GameHustlerQuery) Exist

func (ghq *GameHustlerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GameHustlerQuery) ExistX

func (ghq *GameHustlerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GameHustlerQuery) First

func (ghq *GameHustlerQuery) First(ctx context.Context) (*GameHustler, error)

First returns the first GameHustler entity from the query. Returns a *NotFoundError when no GameHustler was found.

func (*GameHustlerQuery) FirstID

func (ghq *GameHustlerQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first GameHustler ID from the query. Returns a *NotFoundError when no GameHustler ID was found.

func (*GameHustlerQuery) FirstIDX

func (ghq *GameHustlerQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*GameHustlerQuery) FirstX

func (ghq *GameHustlerQuery) FirstX(ctx context.Context) *GameHustler

FirstX is like First, but panics if an error occurs.

func (*GameHustlerQuery) GroupBy

func (ghq *GameHustlerQuery) GroupBy(field string, fields ...string) *GameHustlerGroupBy

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 {
	LastPosition schema.Position `json:"last_position,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GameHustler.Query().
	GroupBy(gamehustler.FieldLastPosition).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GameHustlerQuery) IDs

func (ghq *GameHustlerQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of GameHustler IDs.

func (*GameHustlerQuery) IDsX

func (ghq *GameHustlerQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*GameHustlerQuery) Limit

func (ghq *GameHustlerQuery) Limit(limit int) *GameHustlerQuery

Limit adds a limit step to the query.

func (*GameHustlerQuery) Offset

func (ghq *GameHustlerQuery) Offset(offset int) *GameHustlerQuery

Offset adds an offset step to the query.

func (*GameHustlerQuery) Only

func (ghq *GameHustlerQuery) Only(ctx context.Context) (*GameHustler, error)

Only returns a single GameHustler entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GameHustler entity is found. Returns a *NotFoundError when no GameHustler entities are found.

func (*GameHustlerQuery) OnlyID

func (ghq *GameHustlerQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only GameHustler ID in the query. Returns a *NotSingularError when more than one GameHustler ID is found. Returns a *NotFoundError when no entities are found.

func (*GameHustlerQuery) OnlyIDX

func (ghq *GameHustlerQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GameHustlerQuery) OnlyX

func (ghq *GameHustlerQuery) OnlyX(ctx context.Context) *GameHustler

OnlyX is like Only, but panics if an error occurs.

func (*GameHustlerQuery) Order

func (ghq *GameHustlerQuery) Order(o ...OrderFunc) *GameHustlerQuery

Order adds an order step to the query.

func (*GameHustlerQuery) Paginate

func (gh *GameHustlerQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GameHustlerPaginateOption,
) (*GameHustlerConnection, error)

Paginate executes the query and returns a relay based cursor connection to GameHustler.

func (*GameHustlerQuery) QueryItems

func (ghq *GameHustlerQuery) QueryItems() *GameHustlerItemQuery

QueryItems chains the current query on the "items" edge.

func (*GameHustlerQuery) QueryQuests

func (ghq *GameHustlerQuery) QueryQuests() *GameHustlerQuestQuery

QueryQuests chains the current query on the "quests" edge.

func (*GameHustlerQuery) QueryRelations

func (ghq *GameHustlerQuery) QueryRelations() *GameHustlerRelationQuery

QueryRelations chains the current query on the "relations" edge.

func (*GameHustlerQuery) Select

func (ghq *GameHustlerQuery) Select(fields ...string) *GameHustlerSelect

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 {
	LastPosition schema.Position `json:"last_position,omitempty"`
}

client.GameHustler.Query().
	Select(gamehustler.FieldLastPosition).
	Scan(ctx, &v)

func (*GameHustlerQuery) Unique

func (ghq *GameHustlerQuery) Unique(unique bool) *GameHustlerQuery

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 (*GameHustlerQuery) Where

Where adds a new predicate for the GameHustlerQuery builder.

func (*GameHustlerQuery) WithItems

func (ghq *GameHustlerQuery) WithItems(opts ...func(*GameHustlerItemQuery)) *GameHustlerQuery

WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.

func (*GameHustlerQuery) WithQuests

func (ghq *GameHustlerQuery) WithQuests(opts ...func(*GameHustlerQuestQuery)) *GameHustlerQuery

WithQuests tells the query-builder to eager-load the nodes that are connected to the "quests" edge. The optional arguments are used to configure the query builder of the edge.

func (*GameHustlerQuery) WithRelations

func (ghq *GameHustlerQuery) WithRelations(opts ...func(*GameHustlerRelationQuery)) *GameHustlerQuery

WithRelations tells the query-builder to eager-load the nodes that are connected to the "relations" edge. The optional arguments are used to configure the query builder of the edge.

type GameHustlerQuest

type GameHustlerQuest struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Quest holds the value of the "quest" field.
	Quest string `json:"quest,omitempty"`
	// Completed holds the value of the "completed" field.
	Completed bool `json:"completed,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GameHustlerQuestQuery when eager-loading is set.
	Edges GameHustlerQuestEdges `json:"edges"`
	// contains filtered or unexported fields
}

GameHustlerQuest is the model entity for the GameHustlerQuest schema.

func (*GameHustlerQuest) Hustler

func (ghq *GameHustlerQuest) Hustler(ctx context.Context) (*GameHustler, error)

func (*GameHustlerQuest) Node

func (ghq *GameHustlerQuest) Node(ctx context.Context) (node *Node, err error)

func (*GameHustlerQuest) QueryHustler

func (ghq *GameHustlerQuest) QueryHustler() *GameHustlerQuery

QueryHustler queries the "hustler" edge of the GameHustlerQuest entity.

func (*GameHustlerQuest) String

func (ghq *GameHustlerQuest) String() string

String implements the fmt.Stringer.

func (*GameHustlerQuest) ToEdge

ToEdge converts GameHustlerQuest into GameHustlerQuestEdge.

func (*GameHustlerQuest) Unwrap

func (ghq *GameHustlerQuest) Unwrap() *GameHustlerQuest

Unwrap unwraps the GameHustlerQuest 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 (*GameHustlerQuest) Update

Update returns a builder for updating this GameHustlerQuest. Note that you need to call GameHustlerQuest.Unwrap() before calling this method if this GameHustlerQuest was returned from a transaction, and the transaction was committed or rolled back.

type GameHustlerQuestClient

type GameHustlerQuestClient struct {
	// contains filtered or unexported fields
}

GameHustlerQuestClient is a client for the GameHustlerQuest schema.

func NewGameHustlerQuestClient

func NewGameHustlerQuestClient(c config) *GameHustlerQuestClient

NewGameHustlerQuestClient returns a client for the GameHustlerQuest from the given config.

func (*GameHustlerQuestClient) Create

Create returns a create builder for GameHustlerQuest.

func (*GameHustlerQuestClient) CreateBulk

CreateBulk returns a builder for creating a bulk of GameHustlerQuest entities.

func (*GameHustlerQuestClient) Delete

Delete returns a delete builder for GameHustlerQuest.

func (*GameHustlerQuestClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*GameHustlerQuestClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*GameHustlerQuestClient) Get

Get returns a GameHustlerQuest entity by its id.

func (*GameHustlerQuestClient) GetX

GetX is like Get, but panics if an error occurs.

func (*GameHustlerQuestClient) Hooks

func (c *GameHustlerQuestClient) Hooks() []Hook

Hooks returns the client hooks.

func (*GameHustlerQuestClient) Query

Query returns a query builder for GameHustlerQuest.

func (*GameHustlerQuestClient) QueryHustler

QueryHustler queries the hustler edge of a GameHustlerQuest.

func (*GameHustlerQuestClient) Update

Update returns an update builder for GameHustlerQuest.

func (*GameHustlerQuestClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GameHustlerQuestClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*GameHustlerQuestClient) Use

func (c *GameHustlerQuestClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gamehustlerquest.Hooks(f(g(h())))`.

type GameHustlerQuestConnection

type GameHustlerQuestConnection struct {
	Edges      []*GameHustlerQuestEdge `json:"edges"`
	PageInfo   PageInfo                `json:"pageInfo"`
	TotalCount int                     `json:"totalCount"`
}

GameHustlerQuestConnection is the connection containing edges to GameHustlerQuest.

type GameHustlerQuestCreate

type GameHustlerQuestCreate struct {
	// contains filtered or unexported fields
}

GameHustlerQuestCreate is the builder for creating a GameHustlerQuest entity.

func (*GameHustlerQuestCreate) Exec

func (ghqc *GameHustlerQuestCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GameHustlerQuestCreate) ExecX

func (ghqc *GameHustlerQuestCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerQuestCreate) Mutation

Mutation returns the GameHustlerQuestMutation object of the builder.

func (*GameHustlerQuestCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GameHustlerQuest.Create().
	SetQuest(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.GameHustlerQuestUpsert) {
		SetQuest(v+v).
	}).
	Exec(ctx)

func (*GameHustlerQuestCreate) OnConflictColumns

func (ghqc *GameHustlerQuestCreate) OnConflictColumns(columns ...string) *GameHustlerQuestUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GameHustlerQuest.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GameHustlerQuestCreate) Save

Save creates the GameHustlerQuest in the database.

func (*GameHustlerQuestCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*GameHustlerQuestCreate) SetCompleted

func (ghqc *GameHustlerQuestCreate) SetCompleted(b bool) *GameHustlerQuestCreate

SetCompleted sets the "completed" field.

func (*GameHustlerQuestCreate) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerQuestCreate) SetHustlerID

func (ghqc *GameHustlerQuestCreate) SetHustlerID(id string) *GameHustlerQuestCreate

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerQuestCreate) SetID

SetID sets the "id" field.

func (*GameHustlerQuestCreate) SetNillableCompleted

func (ghqc *GameHustlerQuestCreate) SetNillableCompleted(b *bool) *GameHustlerQuestCreate

SetNillableCompleted sets the "completed" field if the given value is not nil.

func (*GameHustlerQuestCreate) SetNillableHustlerID

func (ghqc *GameHustlerQuestCreate) SetNillableHustlerID(id *string) *GameHustlerQuestCreate

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

func (*GameHustlerQuestCreate) SetNillableID

func (ghqc *GameHustlerQuestCreate) SetNillableID(s *string) *GameHustlerQuestCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*GameHustlerQuestCreate) SetQuest

SetQuest sets the "quest" field.

type GameHustlerQuestCreateBulk

type GameHustlerQuestCreateBulk struct {
	// contains filtered or unexported fields
}

GameHustlerQuestCreateBulk is the builder for creating many GameHustlerQuest entities in bulk.

func (*GameHustlerQuestCreateBulk) Exec

Exec executes the query.

func (*GameHustlerQuestCreateBulk) ExecX

func (ghqcb *GameHustlerQuestCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerQuestCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GameHustlerQuest.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.GameHustlerQuestUpsert) {
		SetQuest(v+v).
	}).
	Exec(ctx)

func (*GameHustlerQuestCreateBulk) OnConflictColumns

func (ghqcb *GameHustlerQuestCreateBulk) OnConflictColumns(columns ...string) *GameHustlerQuestUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GameHustlerQuest.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GameHustlerQuestCreateBulk) Save

Save creates the GameHustlerQuest entities in the database.

func (*GameHustlerQuestCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type GameHustlerQuestDelete

type GameHustlerQuestDelete struct {
	// contains filtered or unexported fields
}

GameHustlerQuestDelete is the builder for deleting a GameHustlerQuest entity.

func (*GameHustlerQuestDelete) Exec

func (ghqd *GameHustlerQuestDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*GameHustlerQuestDelete) ExecX

func (ghqd *GameHustlerQuestDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerQuestDelete) Where

Where appends a list predicates to the GameHustlerQuestDelete builder.

type GameHustlerQuestDeleteOne

type GameHustlerQuestDeleteOne struct {
	// contains filtered or unexported fields
}

GameHustlerQuestDeleteOne is the builder for deleting a single GameHustlerQuest entity.

func (*GameHustlerQuestDeleteOne) Exec

Exec executes the deletion query.

func (*GameHustlerQuestDeleteOne) ExecX

func (ghqdo *GameHustlerQuestDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type GameHustlerQuestEdge

type GameHustlerQuestEdge struct {
	Node   *GameHustlerQuest `json:"node"`
	Cursor Cursor            `json:"cursor"`
}

GameHustlerQuestEdge is the edge representation of GameHustlerQuest.

type GameHustlerQuestEdges

type GameHustlerQuestEdges struct {
	// Hustler holds the value of the hustler edge.
	Hustler *GameHustler `json:"hustler,omitempty"`
	// contains filtered or unexported fields
}

GameHustlerQuestEdges holds the relations/edges for other nodes in the graph.

func (GameHustlerQuestEdges) HustlerOrErr

func (e GameHustlerQuestEdges) HustlerOrErr() (*GameHustler, error)

HustlerOrErr returns the Hustler value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type GameHustlerQuestGroupBy

type GameHustlerQuestGroupBy struct {
	// contains filtered or unexported fields
}

GameHustlerQuestGroupBy is the group-by builder for GameHustlerQuest entities.

func (*GameHustlerQuestGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*GameHustlerQuestGroupBy) Bool

func (ghqgb *GameHustlerQuestGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerQuestGroupBy) BoolX

func (ghqgb *GameHustlerQuestGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GameHustlerQuestGroupBy) Bools

func (ghqgb *GameHustlerQuestGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerQuestGroupBy) BoolsX

func (ghqgb *GameHustlerQuestGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GameHustlerQuestGroupBy) Float64

func (ghqgb *GameHustlerQuestGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerQuestGroupBy) Float64X

func (ghqgb *GameHustlerQuestGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GameHustlerQuestGroupBy) Float64s

func (ghqgb *GameHustlerQuestGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerQuestGroupBy) Float64sX

func (ghqgb *GameHustlerQuestGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GameHustlerQuestGroupBy) Int

func (ghqgb *GameHustlerQuestGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerQuestGroupBy) IntX

func (ghqgb *GameHustlerQuestGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GameHustlerQuestGroupBy) Ints

func (ghqgb *GameHustlerQuestGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerQuestGroupBy) IntsX

func (ghqgb *GameHustlerQuestGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GameHustlerQuestGroupBy) Scan

func (ghqgb *GameHustlerQuestGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*GameHustlerQuestGroupBy) ScanX

func (ghqgb *GameHustlerQuestGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GameHustlerQuestGroupBy) String

func (ghqgb *GameHustlerQuestGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerQuestGroupBy) StringX

func (ghqgb *GameHustlerQuestGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GameHustlerQuestGroupBy) Strings

func (ghqgb *GameHustlerQuestGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerQuestGroupBy) StringsX

func (ghqgb *GameHustlerQuestGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GameHustlerQuestMutation

type GameHustlerQuestMutation struct {
	// contains filtered or unexported fields
}

GameHustlerQuestMutation represents an operation that mutates the GameHustlerQuest nodes in the graph.

func (*GameHustlerQuestMutation) AddField

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) AddedEdges

func (m *GameHustlerQuestMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GameHustlerQuestMutation) AddedField

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) AddedFields

func (m *GameHustlerQuestMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GameHustlerQuestMutation) AddedIDs

func (m *GameHustlerQuestMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GameHustlerQuestMutation) ClearEdge

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) ClearField

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) ClearHustler

func (m *GameHustlerQuestMutation) ClearHustler()

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerQuestMutation) ClearedEdges

func (m *GameHustlerQuestMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GameHustlerQuestMutation) ClearedFields

func (m *GameHustlerQuestMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GameHustlerQuestMutation) Client

func (m GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) Completed

func (m *GameHustlerQuestMutation) Completed() (r bool, exists bool)

Completed returns the value of the "completed" field in the mutation.

func (*GameHustlerQuestMutation) EdgeCleared

func (m *GameHustlerQuestMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GameHustlerQuestMutation) Field

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) FieldCleared

func (m *GameHustlerQuestMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GameHustlerQuestMutation) Fields

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) HustlerCleared

func (m *GameHustlerQuestMutation) HustlerCleared() bool

HustlerCleared reports if the "hustler" edge to the GameHustler entity was cleared.

func (*GameHustlerQuestMutation) HustlerID

func (m *GameHustlerQuestMutation) HustlerID() (id string, exists bool)

HustlerID returns the "hustler" edge ID in the mutation.

func (*GameHustlerQuestMutation) HustlerIDs

func (m *GameHustlerQuestMutation) HustlerIDs() (ids []string)

HustlerIDs returns the "hustler" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HustlerID instead. It exists only for internal usage by the builders.

func (*GameHustlerQuestMutation) ID

func (m *GameHustlerQuestMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) OldCompleted

func (m *GameHustlerQuestMutation) OldCompleted(ctx context.Context) (v bool, err error)

OldCompleted returns the old "completed" field's value of the GameHustlerQuest entity. If the GameHustlerQuest 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 (*GameHustlerQuestMutation) OldField

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) OldQuest

func (m *GameHustlerQuestMutation) OldQuest(ctx context.Context) (v string, err error)

OldQuest returns the old "quest" field's value of the GameHustlerQuest entity. If the GameHustlerQuest 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 (*GameHustlerQuestMutation) Op

func (m *GameHustlerQuestMutation) Op() Op

Op returns the operation name.

func (*GameHustlerQuestMutation) Quest

func (m *GameHustlerQuestMutation) Quest() (r string, exists bool)

Quest returns the value of the "quest" field in the mutation.

func (*GameHustlerQuestMutation) RemovedEdges

func (m *GameHustlerQuestMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GameHustlerQuestMutation) RemovedIDs

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) ResetCompleted

func (m *GameHustlerQuestMutation) ResetCompleted()

ResetCompleted resets all changes to the "completed" field.

func (*GameHustlerQuestMutation) ResetEdge

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) ResetField

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) ResetHustler

func (m *GameHustlerQuestMutation) ResetHustler()

ResetHustler resets all changes to the "hustler" edge.

func (*GameHustlerQuestMutation) ResetQuest

func (m *GameHustlerQuestMutation) ResetQuest()

ResetQuest resets all changes to the "quest" field.

func (*GameHustlerQuestMutation) SetCompleted

func (m *GameHustlerQuestMutation) SetCompleted(b bool)

SetCompleted sets the "completed" field.

func (*GameHustlerQuestMutation) SetField

func (m *GameHustlerQuestMutation) 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 (*GameHustlerQuestMutation) SetHustlerID

func (m *GameHustlerQuestMutation) SetHustlerID(id string)

SetHustlerID sets the "hustler" edge to the GameHustler entity by id.

func (*GameHustlerQuestMutation) SetID

func (m *GameHustlerQuestMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of GameHustlerQuest entities.

func (*GameHustlerQuestMutation) SetQuest

func (m *GameHustlerQuestMutation) SetQuest(s string)

SetQuest sets the "quest" field.

func (GameHustlerQuestMutation) Tx

func (m GameHustlerQuestMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GameHustlerQuestMutation) Type

func (m *GameHustlerQuestMutation) Type() string

Type returns the node type of this mutation (GameHustlerQuest).

func (*GameHustlerQuestMutation) Where

Where appends a list predicates to the GameHustlerQuestMutation builder.

type GameHustlerQuestOrder

type GameHustlerQuestOrder struct {
	Direction OrderDirection              `json:"direction"`
	Field     *GameHustlerQuestOrderField `json:"field"`
}

GameHustlerQuestOrder defines the ordering of GameHustlerQuest.

type GameHustlerQuestOrderField

type GameHustlerQuestOrderField struct {
	// contains filtered or unexported fields
}

GameHustlerQuestOrderField defines the ordering field of GameHustlerQuest.

type GameHustlerQuestPaginateOption

type GameHustlerQuestPaginateOption func(*gameHustlerQuestPager) error

GameHustlerQuestPaginateOption enables pagination customization.

func WithGameHustlerQuestFilter

func WithGameHustlerQuestFilter(filter func(*GameHustlerQuestQuery) (*GameHustlerQuestQuery, error)) GameHustlerQuestPaginateOption

WithGameHustlerQuestFilter configures pagination filter.

func WithGameHustlerQuestOrder

func WithGameHustlerQuestOrder(order *GameHustlerQuestOrder) GameHustlerQuestPaginateOption

WithGameHustlerQuestOrder configures pagination ordering.

type GameHustlerQuestQuery

type GameHustlerQuestQuery struct {
	// contains filtered or unexported fields
}

GameHustlerQuestQuery is the builder for querying GameHustlerQuest entities.

func (*GameHustlerQuestQuery) All

All executes the query and returns a list of GameHustlerQuests.

func (*GameHustlerQuestQuery) AllX

AllX is like All, but panics if an error occurs.

func (*GameHustlerQuestQuery) Clone

Clone returns a duplicate of the GameHustlerQuestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GameHustlerQuestQuery) CollectFields

func (ghq *GameHustlerQuestQuery) CollectFields(ctx context.Context, satisfies ...string) *GameHustlerQuestQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*GameHustlerQuestQuery) Count

func (ghqq *GameHustlerQuestQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GameHustlerQuestQuery) CountX

func (ghqq *GameHustlerQuestQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GameHustlerQuestQuery) Exist

func (ghqq *GameHustlerQuestQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GameHustlerQuestQuery) ExistX

func (ghqq *GameHustlerQuestQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GameHustlerQuestQuery) First

First returns the first GameHustlerQuest entity from the query. Returns a *NotFoundError when no GameHustlerQuest was found.

func (*GameHustlerQuestQuery) FirstID

func (ghqq *GameHustlerQuestQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first GameHustlerQuest ID from the query. Returns a *NotFoundError when no GameHustlerQuest ID was found.

func (*GameHustlerQuestQuery) FirstIDX

func (ghqq *GameHustlerQuestQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*GameHustlerQuestQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*GameHustlerQuestQuery) GroupBy

func (ghqq *GameHustlerQuestQuery) GroupBy(field string, fields ...string) *GameHustlerQuestGroupBy

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 {
	Quest string `json:"quest,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GameHustlerQuest.Query().
	GroupBy(gamehustlerquest.FieldQuest).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GameHustlerQuestQuery) IDs

func (ghqq *GameHustlerQuestQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of GameHustlerQuest IDs.

func (*GameHustlerQuestQuery) IDsX

func (ghqq *GameHustlerQuestQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*GameHustlerQuestQuery) Limit

func (ghqq *GameHustlerQuestQuery) Limit(limit int) *GameHustlerQuestQuery

Limit adds a limit step to the query.

func (*GameHustlerQuestQuery) Offset

func (ghqq *GameHustlerQuestQuery) Offset(offset int) *GameHustlerQuestQuery

Offset adds an offset step to the query.

func (*GameHustlerQuestQuery) Only

Only returns a single GameHustlerQuest entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GameHustlerQuest entity is found. Returns a *NotFoundError when no GameHustlerQuest entities are found.

func (*GameHustlerQuestQuery) OnlyID

func (ghqq *GameHustlerQuestQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only GameHustlerQuest ID in the query. Returns a *NotSingularError when more than one GameHustlerQuest ID is found. Returns a *NotFoundError when no entities are found.

func (*GameHustlerQuestQuery) OnlyIDX

func (ghqq *GameHustlerQuestQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GameHustlerQuestQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*GameHustlerQuestQuery) Order

Order adds an order step to the query.

func (*GameHustlerQuestQuery) Paginate

func (ghq *GameHustlerQuestQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GameHustlerQuestPaginateOption,
) (*GameHustlerQuestConnection, error)

Paginate executes the query and returns a relay based cursor connection to GameHustlerQuest.

func (*GameHustlerQuestQuery) QueryHustler

func (ghqq *GameHustlerQuestQuery) QueryHustler() *GameHustlerQuery

QueryHustler chains the current query on the "hustler" edge.

func (*GameHustlerQuestQuery) Select

func (ghqq *GameHustlerQuestQuery) Select(fields ...string) *GameHustlerQuestSelect

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 {
	Quest string `json:"quest,omitempty"`
}

client.GameHustlerQuest.Query().
	Select(gamehustlerquest.FieldQuest).
	Scan(ctx, &v)

func (*GameHustlerQuestQuery) Unique

func (ghqq *GameHustlerQuestQuery) Unique(unique bool) *GameHustlerQuestQuery

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 (*GameHustlerQuestQuery) Where

Where adds a new predicate for the GameHustlerQuestQuery builder.

func (*GameHustlerQuestQuery) WithHustler

func (ghqq *GameHustlerQuestQuery) WithHustler(opts ...func(*GameHustlerQuery)) *GameHustlerQuestQuery

WithHustler tells the query-builder to eager-load the nodes that are connected to the "hustler" edge. The optional arguments are used to configure the query builder of the edge.

type GameHustlerQuestSelect

type GameHustlerQuestSelect struct {
	*GameHustlerQuestQuery
	// contains filtered or unexported fields
}

GameHustlerQuestSelect is the builder for selecting fields of GameHustlerQuest entities.

func (*GameHustlerQuestSelect) Bool

func (ghqs *GameHustlerQuestSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GameHustlerQuestSelect) BoolX

func (ghqs *GameHustlerQuestSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GameHustlerQuestSelect) Bools

func (ghqs *GameHustlerQuestSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GameHustlerQuestSelect) BoolsX

func (ghqs *GameHustlerQuestSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GameHustlerQuestSelect) Float64

func (ghqs *GameHustlerQuestSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GameHustlerQuestSelect) Float64X

func (ghqs *GameHustlerQuestSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GameHustlerQuestSelect) Float64s

func (ghqs *GameHustlerQuestSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GameHustlerQuestSelect) Float64sX

func (ghqs *GameHustlerQuestSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GameHustlerQuestSelect) Int

func (ghqs *GameHustlerQuestSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GameHustlerQuestSelect) IntX

func (ghqs *GameHustlerQuestSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GameHustlerQuestSelect) Ints

func (ghqs *GameHustlerQuestSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GameHustlerQuestSelect) IntsX

func (ghqs *GameHustlerQuestSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GameHustlerQuestSelect) Scan

func (ghqs *GameHustlerQuestSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*GameHustlerQuestSelect) ScanX

func (ghqs *GameHustlerQuestSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GameHustlerQuestSelect) String

func (ghqs *GameHustlerQuestSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GameHustlerQuestSelect) StringX

func (ghqs *GameHustlerQuestSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GameHustlerQuestSelect) Strings

func (ghqs *GameHustlerQuestSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GameHustlerQuestSelect) StringsX

func (ghqs *GameHustlerQuestSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GameHustlerQuestUpdate

type GameHustlerQuestUpdate struct {
	// contains filtered or unexported fields
}

GameHustlerQuestUpdate is the builder for updating GameHustlerQuest entities.

func (*GameHustlerQuestUpdate) ClearHustler

func (ghqu *GameHustlerQuestUpdate) ClearHustler() *GameHustlerQuestUpdate

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerQuestUpdate) Exec

func (ghqu *GameHustlerQuestUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GameHustlerQuestUpdate) ExecX

func (ghqu *GameHustlerQuestUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerQuestUpdate) Mutation

Mutation returns the GameHustlerQuestMutation object of the builder.

func (*GameHustlerQuestUpdate) Save

func (ghqu *GameHustlerQuestUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GameHustlerQuestUpdate) SaveX

func (ghqu *GameHustlerQuestUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GameHustlerQuestUpdate) SetCompleted

func (ghqu *GameHustlerQuestUpdate) SetCompleted(b bool) *GameHustlerQuestUpdate

SetCompleted sets the "completed" field.

func (*GameHustlerQuestUpdate) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerQuestUpdate) SetHustlerID

func (ghqu *GameHustlerQuestUpdate) SetHustlerID(id string) *GameHustlerQuestUpdate

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerQuestUpdate) SetNillableCompleted

func (ghqu *GameHustlerQuestUpdate) SetNillableCompleted(b *bool) *GameHustlerQuestUpdate

SetNillableCompleted sets the "completed" field if the given value is not nil.

func (*GameHustlerQuestUpdate) SetNillableHustlerID

func (ghqu *GameHustlerQuestUpdate) SetNillableHustlerID(id *string) *GameHustlerQuestUpdate

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

func (*GameHustlerQuestUpdate) SetQuest

SetQuest sets the "quest" field.

func (*GameHustlerQuestUpdate) Where

Where appends a list predicates to the GameHustlerQuestUpdate builder.

type GameHustlerQuestUpdateOne

type GameHustlerQuestUpdateOne struct {
	// contains filtered or unexported fields
}

GameHustlerQuestUpdateOne is the builder for updating a single GameHustlerQuest entity.

func (*GameHustlerQuestUpdateOne) ClearHustler

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerQuestUpdateOne) Exec

Exec executes the query on the entity.

func (*GameHustlerQuestUpdateOne) ExecX

func (ghquo *GameHustlerQuestUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerQuestUpdateOne) Mutation

Mutation returns the GameHustlerQuestMutation object of the builder.

func (*GameHustlerQuestUpdateOne) Save

Save executes the query and returns the updated GameHustlerQuest entity.

func (*GameHustlerQuestUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*GameHustlerQuestUpdateOne) Select

func (ghquo *GameHustlerQuestUpdateOne) Select(field string, fields ...string) *GameHustlerQuestUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GameHustlerQuestUpdateOne) SetCompleted

SetCompleted sets the "completed" field.

func (*GameHustlerQuestUpdateOne) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerQuestUpdateOne) SetHustlerID

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerQuestUpdateOne) SetNillableCompleted

func (ghquo *GameHustlerQuestUpdateOne) SetNillableCompleted(b *bool) *GameHustlerQuestUpdateOne

SetNillableCompleted sets the "completed" field if the given value is not nil.

func (*GameHustlerQuestUpdateOne) SetNillableHustlerID

func (ghquo *GameHustlerQuestUpdateOne) SetNillableHustlerID(id *string) *GameHustlerQuestUpdateOne

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

func (*GameHustlerQuestUpdateOne) SetQuest

SetQuest sets the "quest" field.

type GameHustlerQuestUpsert

type GameHustlerQuestUpsert struct {
	*sql.UpdateSet
}

GameHustlerQuestUpsert is the "OnConflict" setter.

func (*GameHustlerQuestUpsert) SetCompleted

SetCompleted sets the "completed" field.

func (*GameHustlerQuestUpsert) SetQuest

SetQuest sets the "quest" field.

func (*GameHustlerQuestUpsert) UpdateCompleted

func (u *GameHustlerQuestUpsert) UpdateCompleted() *GameHustlerQuestUpsert

UpdateCompleted sets the "completed" field to the value that was provided on create.

func (*GameHustlerQuestUpsert) UpdateQuest

UpdateQuest sets the "quest" field to the value that was provided on create.

type GameHustlerQuestUpsertBulk

type GameHustlerQuestUpsertBulk struct {
	// contains filtered or unexported fields
}

GameHustlerQuestUpsertBulk is the builder for "upsert"-ing a bulk of GameHustlerQuest nodes.

func (*GameHustlerQuestUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GameHustlerQuestUpsertBulk) Exec

Exec executes the query.

func (*GameHustlerQuestUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerQuestUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GameHustlerQuest.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GameHustlerQuestUpsertBulk) SetCompleted

SetCompleted sets the "completed" field.

func (*GameHustlerQuestUpsertBulk) SetQuest

SetQuest sets the "quest" field.

func (*GameHustlerQuestUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GameHustlerQuestCreateBulk.OnConflict documentation for more info.

func (*GameHustlerQuestUpsertBulk) UpdateCompleted

UpdateCompleted sets the "completed" field to the value that was provided on create.

func (*GameHustlerQuestUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GameHustlerQuest.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(gamehustlerquest.FieldID)
		}),
	).
	Exec(ctx)

func (*GameHustlerQuestUpsertBulk) UpdateQuest

UpdateQuest sets the "quest" field to the value that was provided on create.

type GameHustlerQuestUpsertOne

type GameHustlerQuestUpsertOne struct {
	// contains filtered or unexported fields
}

GameHustlerQuestUpsertOne is the builder for "upsert"-ing

one GameHustlerQuest node.

func (*GameHustlerQuestUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GameHustlerQuestUpsertOne) Exec

Exec executes the query.

func (*GameHustlerQuestUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerQuestUpsertOne) ID

func (u *GameHustlerQuestUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GameHustlerQuestUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*GameHustlerQuestUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GameHustlerQuest.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GameHustlerQuestUpsertOne) SetCompleted

SetCompleted sets the "completed" field.

func (*GameHustlerQuestUpsertOne) SetQuest

SetQuest sets the "quest" field.

func (*GameHustlerQuestUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the GameHustlerQuestCreate.OnConflict documentation for more info.

func (*GameHustlerQuestUpsertOne) UpdateCompleted

UpdateCompleted sets the "completed" field to the value that was provided on create.

func (*GameHustlerQuestUpsertOne) 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.GameHustlerQuest.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(gamehustlerquest.FieldID)
		}),
	).
	Exec(ctx)

func (*GameHustlerQuestUpsertOne) UpdateQuest

UpdateQuest sets the "quest" field to the value that was provided on create.

type GameHustlerQuestWhereInput

type GameHustlerQuestWhereInput struct {
	Not *GameHustlerQuestWhereInput   `json:"not,omitempty"`
	Or  []*GameHustlerQuestWhereInput `json:"or,omitempty"`
	And []*GameHustlerQuestWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "quest" field predicates.
	Quest             *string  `json:"quest,omitempty"`
	QuestNEQ          *string  `json:"questNEQ,omitempty"`
	QuestIn           []string `json:"questIn,omitempty"`
	QuestNotIn        []string `json:"questNotIn,omitempty"`
	QuestGT           *string  `json:"questGT,omitempty"`
	QuestGTE          *string  `json:"questGTE,omitempty"`
	QuestLT           *string  `json:"questLT,omitempty"`
	QuestLTE          *string  `json:"questLTE,omitempty"`
	QuestContains     *string  `json:"questContains,omitempty"`
	QuestHasPrefix    *string  `json:"questHasPrefix,omitempty"`
	QuestHasSuffix    *string  `json:"questHasSuffix,omitempty"`
	QuestEqualFold    *string  `json:"questEqualFold,omitempty"`
	QuestContainsFold *string  `json:"questContainsFold,omitempty"`

	// "completed" field predicates.
	Completed    *bool `json:"completed,omitempty"`
	CompletedNEQ *bool `json:"completedNEQ,omitempty"`

	// "hustler" edge predicates.
	HasHustler     *bool                    `json:"hasHustler,omitempty"`
	HasHustlerWith []*GameHustlerWhereInput `json:"hasHustlerWith,omitempty"`
}

GameHustlerQuestWhereInput represents a where input for filtering GameHustlerQuest queries.

func (*GameHustlerQuestWhereInput) Filter

Filter applies the GameHustlerQuestWhereInput filter on the GameHustlerQuestQuery builder.

func (*GameHustlerQuestWhereInput) P

P returns a predicate for filtering gamehustlerquests. An error is returned if the input is empty or invalid.

type GameHustlerQuests

type GameHustlerQuests []*GameHustlerQuest

GameHustlerQuests is a parsable slice of GameHustlerQuest.

type GameHustlerRelation

type GameHustlerRelation struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Citizen holds the value of the "citizen" field.
	Citizen string `json:"citizen,omitempty"`
	// Conversation holds the value of the "conversation" field.
	Conversation string `json:"conversation,omitempty"`
	// Text holds the value of the "text" field.
	Text uint `json:"text,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GameHustlerRelationQuery when eager-loading is set.
	Edges GameHustlerRelationEdges `json:"edges"`
	// contains filtered or unexported fields
}

GameHustlerRelation is the model entity for the GameHustlerRelation schema.

func (*GameHustlerRelation) Hustler

func (ghr *GameHustlerRelation) Hustler(ctx context.Context) (*GameHustler, error)

func (*GameHustlerRelation) Node

func (ghr *GameHustlerRelation) Node(ctx context.Context) (node *Node, err error)

func (*GameHustlerRelation) QueryHustler

func (ghr *GameHustlerRelation) QueryHustler() *GameHustlerQuery

QueryHustler queries the "hustler" edge of the GameHustlerRelation entity.

func (*GameHustlerRelation) String

func (ghr *GameHustlerRelation) String() string

String implements the fmt.Stringer.

func (*GameHustlerRelation) ToEdge

ToEdge converts GameHustlerRelation into GameHustlerRelationEdge.

func (*GameHustlerRelation) Unwrap

Unwrap unwraps the GameHustlerRelation 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 (*GameHustlerRelation) Update

Update returns a builder for updating this GameHustlerRelation. Note that you need to call GameHustlerRelation.Unwrap() before calling this method if this GameHustlerRelation was returned from a transaction, and the transaction was committed or rolled back.

type GameHustlerRelationClient

type GameHustlerRelationClient struct {
	// contains filtered or unexported fields
}

GameHustlerRelationClient is a client for the GameHustlerRelation schema.

func NewGameHustlerRelationClient

func NewGameHustlerRelationClient(c config) *GameHustlerRelationClient

NewGameHustlerRelationClient returns a client for the GameHustlerRelation from the given config.

func (*GameHustlerRelationClient) Create

Create returns a create builder for GameHustlerRelation.

func (*GameHustlerRelationClient) CreateBulk

CreateBulk returns a builder for creating a bulk of GameHustlerRelation entities.

func (*GameHustlerRelationClient) Delete

Delete returns a delete builder for GameHustlerRelation.

func (*GameHustlerRelationClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*GameHustlerRelationClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*GameHustlerRelationClient) Get

Get returns a GameHustlerRelation entity by its id.

func (*GameHustlerRelationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*GameHustlerRelationClient) Hooks

func (c *GameHustlerRelationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*GameHustlerRelationClient) Query

Query returns a query builder for GameHustlerRelation.

func (*GameHustlerRelationClient) QueryHustler

QueryHustler queries the hustler edge of a GameHustlerRelation.

func (*GameHustlerRelationClient) Update

Update returns an update builder for GameHustlerRelation.

func (*GameHustlerRelationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GameHustlerRelationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*GameHustlerRelationClient) Use

func (c *GameHustlerRelationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gamehustlerrelation.Hooks(f(g(h())))`.

type GameHustlerRelationConnection

type GameHustlerRelationConnection struct {
	Edges      []*GameHustlerRelationEdge `json:"edges"`
	PageInfo   PageInfo                   `json:"pageInfo"`
	TotalCount int                        `json:"totalCount"`
}

GameHustlerRelationConnection is the connection containing edges to GameHustlerRelation.

type GameHustlerRelationCreate

type GameHustlerRelationCreate struct {
	// contains filtered or unexported fields
}

GameHustlerRelationCreate is the builder for creating a GameHustlerRelation entity.

func (*GameHustlerRelationCreate) Exec

Exec executes the query.

func (*GameHustlerRelationCreate) ExecX

func (ghrc *GameHustlerRelationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerRelationCreate) Mutation

Mutation returns the GameHustlerRelationMutation object of the builder.

func (*GameHustlerRelationCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GameHustlerRelation.Create().
	SetCitizen(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.GameHustlerRelationUpsert) {
		SetCitizen(v+v).
	}).
	Exec(ctx)

func (*GameHustlerRelationCreate) OnConflictColumns

func (ghrc *GameHustlerRelationCreate) OnConflictColumns(columns ...string) *GameHustlerRelationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GameHustlerRelation.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GameHustlerRelationCreate) Save

Save creates the GameHustlerRelation in the database.

func (*GameHustlerRelationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*GameHustlerRelationCreate) SetCitizen

SetCitizen sets the "citizen" field.

func (*GameHustlerRelationCreate) SetConversation

SetConversation sets the "conversation" field.

func (*GameHustlerRelationCreate) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerRelationCreate) SetHustlerID

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerRelationCreate) SetID

SetID sets the "id" field.

func (*GameHustlerRelationCreate) SetNillableHustlerID

func (ghrc *GameHustlerRelationCreate) SetNillableHustlerID(id *string) *GameHustlerRelationCreate

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

func (*GameHustlerRelationCreate) SetText

SetText sets the "text" field.

type GameHustlerRelationCreateBulk

type GameHustlerRelationCreateBulk struct {
	// contains filtered or unexported fields
}

GameHustlerRelationCreateBulk is the builder for creating many GameHustlerRelation entities in bulk.

func (*GameHustlerRelationCreateBulk) Exec

Exec executes the query.

func (*GameHustlerRelationCreateBulk) ExecX

func (ghrcb *GameHustlerRelationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerRelationCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GameHustlerRelation.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.GameHustlerRelationUpsert) {
		SetCitizen(v+v).
	}).
	Exec(ctx)

func (*GameHustlerRelationCreateBulk) OnConflictColumns

func (ghrcb *GameHustlerRelationCreateBulk) OnConflictColumns(columns ...string) *GameHustlerRelationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GameHustlerRelation.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GameHustlerRelationCreateBulk) Save

Save creates the GameHustlerRelation entities in the database.

func (*GameHustlerRelationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type GameHustlerRelationDelete

type GameHustlerRelationDelete struct {
	// contains filtered or unexported fields
}

GameHustlerRelationDelete is the builder for deleting a GameHustlerRelation entity.

func (*GameHustlerRelationDelete) Exec

func (ghrd *GameHustlerRelationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*GameHustlerRelationDelete) ExecX

func (ghrd *GameHustlerRelationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerRelationDelete) Where

Where appends a list predicates to the GameHustlerRelationDelete builder.

type GameHustlerRelationDeleteOne

type GameHustlerRelationDeleteOne struct {
	// contains filtered or unexported fields
}

GameHustlerRelationDeleteOne is the builder for deleting a single GameHustlerRelation entity.

func (*GameHustlerRelationDeleteOne) Exec

Exec executes the deletion query.

func (*GameHustlerRelationDeleteOne) ExecX

func (ghrdo *GameHustlerRelationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type GameHustlerRelationEdge

type GameHustlerRelationEdge struct {
	Node   *GameHustlerRelation `json:"node"`
	Cursor Cursor               `json:"cursor"`
}

GameHustlerRelationEdge is the edge representation of GameHustlerRelation.

type GameHustlerRelationEdges

type GameHustlerRelationEdges struct {
	// Hustler holds the value of the hustler edge.
	Hustler *GameHustler `json:"hustler,omitempty"`
	// contains filtered or unexported fields
}

GameHustlerRelationEdges holds the relations/edges for other nodes in the graph.

func (GameHustlerRelationEdges) HustlerOrErr

func (e GameHustlerRelationEdges) HustlerOrErr() (*GameHustler, error)

HustlerOrErr returns the Hustler value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type GameHustlerRelationGroupBy

type GameHustlerRelationGroupBy struct {
	// contains filtered or unexported fields
}

GameHustlerRelationGroupBy is the group-by builder for GameHustlerRelation entities.

func (*GameHustlerRelationGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*GameHustlerRelationGroupBy) Bool

func (ghrgb *GameHustlerRelationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerRelationGroupBy) BoolX

func (ghrgb *GameHustlerRelationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GameHustlerRelationGroupBy) Bools

func (ghrgb *GameHustlerRelationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerRelationGroupBy) BoolsX

func (ghrgb *GameHustlerRelationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GameHustlerRelationGroupBy) Float64

func (ghrgb *GameHustlerRelationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerRelationGroupBy) Float64X

func (ghrgb *GameHustlerRelationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GameHustlerRelationGroupBy) Float64s

func (ghrgb *GameHustlerRelationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerRelationGroupBy) Float64sX

func (ghrgb *GameHustlerRelationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GameHustlerRelationGroupBy) Int

func (ghrgb *GameHustlerRelationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerRelationGroupBy) IntX

func (ghrgb *GameHustlerRelationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GameHustlerRelationGroupBy) Ints

func (ghrgb *GameHustlerRelationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerRelationGroupBy) IntsX

func (ghrgb *GameHustlerRelationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GameHustlerRelationGroupBy) Scan

func (ghrgb *GameHustlerRelationGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*GameHustlerRelationGroupBy) ScanX

func (ghrgb *GameHustlerRelationGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GameHustlerRelationGroupBy) String

func (ghrgb *GameHustlerRelationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GameHustlerRelationGroupBy) StringX

func (ghrgb *GameHustlerRelationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GameHustlerRelationGroupBy) Strings

func (ghrgb *GameHustlerRelationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*GameHustlerRelationGroupBy) StringsX

func (ghrgb *GameHustlerRelationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GameHustlerRelationMutation

type GameHustlerRelationMutation struct {
	// contains filtered or unexported fields
}

GameHustlerRelationMutation represents an operation that mutates the GameHustlerRelation nodes in the graph.

func (*GameHustlerRelationMutation) AddField

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) AddText

func (m *GameHustlerRelationMutation) AddText(u int)

AddText adds u to the "text" field.

func (*GameHustlerRelationMutation) AddedEdges

func (m *GameHustlerRelationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GameHustlerRelationMutation) AddedField

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) AddedFields

func (m *GameHustlerRelationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GameHustlerRelationMutation) AddedIDs

func (m *GameHustlerRelationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GameHustlerRelationMutation) AddedText

func (m *GameHustlerRelationMutation) AddedText() (r int, exists bool)

AddedText returns the value that was added to the "text" field in this mutation.

func (*GameHustlerRelationMutation) Citizen

func (m *GameHustlerRelationMutation) Citizen() (r string, exists bool)

Citizen returns the value of the "citizen" field in the mutation.

func (*GameHustlerRelationMutation) ClearEdge

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) ClearField

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) ClearHustler

func (m *GameHustlerRelationMutation) ClearHustler()

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerRelationMutation) ClearedEdges

func (m *GameHustlerRelationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GameHustlerRelationMutation) ClearedFields

func (m *GameHustlerRelationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GameHustlerRelationMutation) Client

func (m GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) Conversation

func (m *GameHustlerRelationMutation) Conversation() (r string, exists bool)

Conversation returns the value of the "conversation" field in the mutation.

func (*GameHustlerRelationMutation) EdgeCleared

func (m *GameHustlerRelationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GameHustlerRelationMutation) Field

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) FieldCleared

func (m *GameHustlerRelationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GameHustlerRelationMutation) Fields

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) HustlerCleared

func (m *GameHustlerRelationMutation) HustlerCleared() bool

HustlerCleared reports if the "hustler" edge to the GameHustler entity was cleared.

func (*GameHustlerRelationMutation) HustlerID

func (m *GameHustlerRelationMutation) HustlerID() (id string, exists bool)

HustlerID returns the "hustler" edge ID in the mutation.

func (*GameHustlerRelationMutation) HustlerIDs

func (m *GameHustlerRelationMutation) HustlerIDs() (ids []string)

HustlerIDs returns the "hustler" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HustlerID instead. It exists only for internal usage by the builders.

func (*GameHustlerRelationMutation) ID

func (m *GameHustlerRelationMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) OldCitizen

func (m *GameHustlerRelationMutation) OldCitizen(ctx context.Context) (v string, err error)

OldCitizen returns the old "citizen" field's value of the GameHustlerRelation entity. If the GameHustlerRelation 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 (*GameHustlerRelationMutation) OldConversation

func (m *GameHustlerRelationMutation) OldConversation(ctx context.Context) (v string, err error)

OldConversation returns the old "conversation" field's value of the GameHustlerRelation entity. If the GameHustlerRelation 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 (*GameHustlerRelationMutation) OldField

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) OldText

func (m *GameHustlerRelationMutation) OldText(ctx context.Context) (v uint, err error)

OldText returns the old "text" field's value of the GameHustlerRelation entity. If the GameHustlerRelation 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 (*GameHustlerRelationMutation) Op

Op returns the operation name.

func (*GameHustlerRelationMutation) RemovedEdges

func (m *GameHustlerRelationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GameHustlerRelationMutation) RemovedIDs

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) ResetCitizen

func (m *GameHustlerRelationMutation) ResetCitizen()

ResetCitizen resets all changes to the "citizen" field.

func (*GameHustlerRelationMutation) ResetConversation

func (m *GameHustlerRelationMutation) ResetConversation()

ResetConversation resets all changes to the "conversation" field.

func (*GameHustlerRelationMutation) ResetEdge

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) ResetField

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) ResetHustler

func (m *GameHustlerRelationMutation) ResetHustler()

ResetHustler resets all changes to the "hustler" edge.

func (*GameHustlerRelationMutation) ResetText

func (m *GameHustlerRelationMutation) ResetText()

ResetText resets all changes to the "text" field.

func (*GameHustlerRelationMutation) SetCitizen

func (m *GameHustlerRelationMutation) SetCitizen(s string)

SetCitizen sets the "citizen" field.

func (*GameHustlerRelationMutation) SetConversation

func (m *GameHustlerRelationMutation) SetConversation(s string)

SetConversation sets the "conversation" field.

func (*GameHustlerRelationMutation) SetField

func (m *GameHustlerRelationMutation) 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 (*GameHustlerRelationMutation) SetHustlerID

func (m *GameHustlerRelationMutation) SetHustlerID(id string)

SetHustlerID sets the "hustler" edge to the GameHustler entity by id.

func (*GameHustlerRelationMutation) SetID

func (m *GameHustlerRelationMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of GameHustlerRelation entities.

func (*GameHustlerRelationMutation) SetText

func (m *GameHustlerRelationMutation) SetText(u uint)

SetText sets the "text" field.

func (*GameHustlerRelationMutation) Text

func (m *GameHustlerRelationMutation) Text() (r uint, exists bool)

Text returns the value of the "text" field in the mutation.

func (GameHustlerRelationMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GameHustlerRelationMutation) Type

Type returns the node type of this mutation (GameHustlerRelation).

func (*GameHustlerRelationMutation) Where

Where appends a list predicates to the GameHustlerRelationMutation builder.

type GameHustlerRelationOrder

type GameHustlerRelationOrder struct {
	Direction OrderDirection                 `json:"direction"`
	Field     *GameHustlerRelationOrderField `json:"field"`
}

GameHustlerRelationOrder defines the ordering of GameHustlerRelation.

type GameHustlerRelationOrderField

type GameHustlerRelationOrderField struct {
	// contains filtered or unexported fields
}

GameHustlerRelationOrderField defines the ordering field of GameHustlerRelation.

type GameHustlerRelationPaginateOption

type GameHustlerRelationPaginateOption func(*gameHustlerRelationPager) error

GameHustlerRelationPaginateOption enables pagination customization.

func WithGameHustlerRelationFilter

func WithGameHustlerRelationFilter(filter func(*GameHustlerRelationQuery) (*GameHustlerRelationQuery, error)) GameHustlerRelationPaginateOption

WithGameHustlerRelationFilter configures pagination filter.

func WithGameHustlerRelationOrder

func WithGameHustlerRelationOrder(order *GameHustlerRelationOrder) GameHustlerRelationPaginateOption

WithGameHustlerRelationOrder configures pagination ordering.

type GameHustlerRelationQuery

type GameHustlerRelationQuery struct {
	// contains filtered or unexported fields
}

GameHustlerRelationQuery is the builder for querying GameHustlerRelation entities.

func (*GameHustlerRelationQuery) All

All executes the query and returns a list of GameHustlerRelations.

func (*GameHustlerRelationQuery) AllX

AllX is like All, but panics if an error occurs.

func (*GameHustlerRelationQuery) Clone

Clone returns a duplicate of the GameHustlerRelationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GameHustlerRelationQuery) CollectFields

func (ghr *GameHustlerRelationQuery) CollectFields(ctx context.Context, satisfies ...string) *GameHustlerRelationQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*GameHustlerRelationQuery) Count

func (ghrq *GameHustlerRelationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GameHustlerRelationQuery) CountX

func (ghrq *GameHustlerRelationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GameHustlerRelationQuery) Exist

func (ghrq *GameHustlerRelationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GameHustlerRelationQuery) ExistX

func (ghrq *GameHustlerRelationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GameHustlerRelationQuery) First

First returns the first GameHustlerRelation entity from the query. Returns a *NotFoundError when no GameHustlerRelation was found.

func (*GameHustlerRelationQuery) FirstID

func (ghrq *GameHustlerRelationQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first GameHustlerRelation ID from the query. Returns a *NotFoundError when no GameHustlerRelation ID was found.

func (*GameHustlerRelationQuery) FirstIDX

func (ghrq *GameHustlerRelationQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*GameHustlerRelationQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*GameHustlerRelationQuery) GroupBy

func (ghrq *GameHustlerRelationQuery) GroupBy(field string, fields ...string) *GameHustlerRelationGroupBy

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 {
	Citizen string `json:"citizen,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GameHustlerRelation.Query().
	GroupBy(gamehustlerrelation.FieldCitizen).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GameHustlerRelationQuery) IDs

func (ghrq *GameHustlerRelationQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of GameHustlerRelation IDs.

func (*GameHustlerRelationQuery) IDsX

func (ghrq *GameHustlerRelationQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*GameHustlerRelationQuery) Limit

Limit adds a limit step to the query.

func (*GameHustlerRelationQuery) Offset

Offset adds an offset step to the query.

func (*GameHustlerRelationQuery) Only

Only returns a single GameHustlerRelation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GameHustlerRelation entity is found. Returns a *NotFoundError when no GameHustlerRelation entities are found.

func (*GameHustlerRelationQuery) OnlyID

func (ghrq *GameHustlerRelationQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only GameHustlerRelation ID in the query. Returns a *NotSingularError when more than one GameHustlerRelation ID is found. Returns a *NotFoundError when no entities are found.

func (*GameHustlerRelationQuery) OnlyIDX

func (ghrq *GameHustlerRelationQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GameHustlerRelationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*GameHustlerRelationQuery) Order

Order adds an order step to the query.

func (*GameHustlerRelationQuery) Paginate

func (ghr *GameHustlerRelationQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GameHustlerRelationPaginateOption,
) (*GameHustlerRelationConnection, error)

Paginate executes the query and returns a relay based cursor connection to GameHustlerRelation.

func (*GameHustlerRelationQuery) QueryHustler

func (ghrq *GameHustlerRelationQuery) QueryHustler() *GameHustlerQuery

QueryHustler chains the current query on the "hustler" edge.

func (*GameHustlerRelationQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Citizen string `json:"citizen,omitempty"`
}

client.GameHustlerRelation.Query().
	Select(gamehustlerrelation.FieldCitizen).
	Scan(ctx, &v)

func (*GameHustlerRelationQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*GameHustlerRelationQuery) Where

Where adds a new predicate for the GameHustlerRelationQuery builder.

func (*GameHustlerRelationQuery) WithHustler

func (ghrq *GameHustlerRelationQuery) WithHustler(opts ...func(*GameHustlerQuery)) *GameHustlerRelationQuery

WithHustler tells the query-builder to eager-load the nodes that are connected to the "hustler" edge. The optional arguments are used to configure the query builder of the edge.

type GameHustlerRelationSelect

type GameHustlerRelationSelect struct {
	*GameHustlerRelationQuery
	// contains filtered or unexported fields
}

GameHustlerRelationSelect is the builder for selecting fields of GameHustlerRelation entities.

func (*GameHustlerRelationSelect) Bool

func (ghrs *GameHustlerRelationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GameHustlerRelationSelect) BoolX

func (ghrs *GameHustlerRelationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GameHustlerRelationSelect) Bools

func (ghrs *GameHustlerRelationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GameHustlerRelationSelect) BoolsX

func (ghrs *GameHustlerRelationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GameHustlerRelationSelect) Float64

func (ghrs *GameHustlerRelationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GameHustlerRelationSelect) Float64X

func (ghrs *GameHustlerRelationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GameHustlerRelationSelect) Float64s

func (ghrs *GameHustlerRelationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GameHustlerRelationSelect) Float64sX

func (ghrs *GameHustlerRelationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GameHustlerRelationSelect) Int

func (ghrs *GameHustlerRelationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GameHustlerRelationSelect) IntX

func (ghrs *GameHustlerRelationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GameHustlerRelationSelect) Ints

func (ghrs *GameHustlerRelationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GameHustlerRelationSelect) IntsX

func (ghrs *GameHustlerRelationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GameHustlerRelationSelect) Scan

func (ghrs *GameHustlerRelationSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*GameHustlerRelationSelect) ScanX

func (ghrs *GameHustlerRelationSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GameHustlerRelationSelect) String

func (ghrs *GameHustlerRelationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GameHustlerRelationSelect) StringX

func (ghrs *GameHustlerRelationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GameHustlerRelationSelect) Strings

func (ghrs *GameHustlerRelationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GameHustlerRelationSelect) StringsX

func (ghrs *GameHustlerRelationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GameHustlerRelationUpdate

type GameHustlerRelationUpdate struct {
	// contains filtered or unexported fields
}

GameHustlerRelationUpdate is the builder for updating GameHustlerRelation entities.

func (*GameHustlerRelationUpdate) AddText

AddText adds u to the "text" field.

func (*GameHustlerRelationUpdate) ClearHustler

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerRelationUpdate) Exec

Exec executes the query.

func (*GameHustlerRelationUpdate) ExecX

func (ghru *GameHustlerRelationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerRelationUpdate) Mutation

Mutation returns the GameHustlerRelationMutation object of the builder.

func (*GameHustlerRelationUpdate) Save

func (ghru *GameHustlerRelationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GameHustlerRelationUpdate) SaveX

func (ghru *GameHustlerRelationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GameHustlerRelationUpdate) SetCitizen

SetCitizen sets the "citizen" field.

func (*GameHustlerRelationUpdate) SetConversation

SetConversation sets the "conversation" field.

func (*GameHustlerRelationUpdate) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerRelationUpdate) SetHustlerID

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerRelationUpdate) SetNillableHustlerID

func (ghru *GameHustlerRelationUpdate) SetNillableHustlerID(id *string) *GameHustlerRelationUpdate

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

func (*GameHustlerRelationUpdate) SetText

SetText sets the "text" field.

func (*GameHustlerRelationUpdate) Where

Where appends a list predicates to the GameHustlerRelationUpdate builder.

type GameHustlerRelationUpdateOne

type GameHustlerRelationUpdateOne struct {
	// contains filtered or unexported fields
}

GameHustlerRelationUpdateOne is the builder for updating a single GameHustlerRelation entity.

func (*GameHustlerRelationUpdateOne) AddText

AddText adds u to the "text" field.

func (*GameHustlerRelationUpdateOne) ClearHustler

ClearHustler clears the "hustler" edge to the GameHustler entity.

func (*GameHustlerRelationUpdateOne) Exec

Exec executes the query on the entity.

func (*GameHustlerRelationUpdateOne) ExecX

func (ghruo *GameHustlerRelationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerRelationUpdateOne) Mutation

Mutation returns the GameHustlerRelationMutation object of the builder.

func (*GameHustlerRelationUpdateOne) Save

Save executes the query and returns the updated GameHustlerRelation entity.

func (*GameHustlerRelationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*GameHustlerRelationUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GameHustlerRelationUpdateOne) SetCitizen

SetCitizen sets the "citizen" field.

func (*GameHustlerRelationUpdateOne) SetConversation

SetConversation sets the "conversation" field.

func (*GameHustlerRelationUpdateOne) SetHustler

SetHustler sets the "hustler" edge to the GameHustler entity.

func (*GameHustlerRelationUpdateOne) SetHustlerID

SetHustlerID sets the "hustler" edge to the GameHustler entity by ID.

func (*GameHustlerRelationUpdateOne) SetNillableHustlerID

func (ghruo *GameHustlerRelationUpdateOne) SetNillableHustlerID(id *string) *GameHustlerRelationUpdateOne

SetNillableHustlerID sets the "hustler" edge to the GameHustler entity by ID if the given value is not nil.

func (*GameHustlerRelationUpdateOne) SetText

SetText sets the "text" field.

type GameHustlerRelationUpsert

type GameHustlerRelationUpsert struct {
	*sql.UpdateSet
}

GameHustlerRelationUpsert is the "OnConflict" setter.

func (*GameHustlerRelationUpsert) AddText

AddText adds v to the "text" field.

func (*GameHustlerRelationUpsert) SetCitizen

SetCitizen sets the "citizen" field.

func (*GameHustlerRelationUpsert) SetConversation

SetConversation sets the "conversation" field.

func (*GameHustlerRelationUpsert) SetText

SetText sets the "text" field.

func (*GameHustlerRelationUpsert) UpdateCitizen

UpdateCitizen sets the "citizen" field to the value that was provided on create.

func (*GameHustlerRelationUpsert) UpdateConversation

func (u *GameHustlerRelationUpsert) UpdateConversation() *GameHustlerRelationUpsert

UpdateConversation sets the "conversation" field to the value that was provided on create.

func (*GameHustlerRelationUpsert) UpdateText

UpdateText sets the "text" field to the value that was provided on create.

type GameHustlerRelationUpsertBulk

type GameHustlerRelationUpsertBulk struct {
	// contains filtered or unexported fields
}

GameHustlerRelationUpsertBulk is the builder for "upsert"-ing a bulk of GameHustlerRelation nodes.

func (*GameHustlerRelationUpsertBulk) AddText

AddText adds v to the "text" field.

func (*GameHustlerRelationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GameHustlerRelationUpsertBulk) Exec

Exec executes the query.

func (*GameHustlerRelationUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerRelationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GameHustlerRelation.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GameHustlerRelationUpsertBulk) SetCitizen

SetCitizen sets the "citizen" field.

func (*GameHustlerRelationUpsertBulk) SetConversation

SetConversation sets the "conversation" field.

func (*GameHustlerRelationUpsertBulk) SetText

SetText sets the "text" field.

func (*GameHustlerRelationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GameHustlerRelationCreateBulk.OnConflict documentation for more info.

func (*GameHustlerRelationUpsertBulk) UpdateCitizen

UpdateCitizen sets the "citizen" field to the value that was provided on create.

func (*GameHustlerRelationUpsertBulk) UpdateConversation

UpdateConversation sets the "conversation" field to the value that was provided on create.

func (*GameHustlerRelationUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GameHustlerRelation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(gamehustlerrelation.FieldID)
		}),
	).
	Exec(ctx)

func (*GameHustlerRelationUpsertBulk) UpdateText

UpdateText sets the "text" field to the value that was provided on create.

type GameHustlerRelationUpsertOne

type GameHustlerRelationUpsertOne struct {
	// contains filtered or unexported fields
}

GameHustlerRelationUpsertOne is the builder for "upsert"-ing

one GameHustlerRelation node.

func (*GameHustlerRelationUpsertOne) AddText

AddText adds v to the "text" field.

func (*GameHustlerRelationUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GameHustlerRelationUpsertOne) Exec

Exec executes the query.

func (*GameHustlerRelationUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerRelationUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GameHustlerRelationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*GameHustlerRelationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GameHustlerRelation.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GameHustlerRelationUpsertOne) SetCitizen

SetCitizen sets the "citizen" field.

func (*GameHustlerRelationUpsertOne) SetConversation

SetConversation sets the "conversation" field.

func (*GameHustlerRelationUpsertOne) SetText

SetText sets the "text" field.

func (*GameHustlerRelationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the GameHustlerRelationCreate.OnConflict documentation for more info.

func (*GameHustlerRelationUpsertOne) UpdateCitizen

UpdateCitizen sets the "citizen" field to the value that was provided on create.

func (*GameHustlerRelationUpsertOne) UpdateConversation

UpdateConversation sets the "conversation" field to the value that was provided on create.

func (*GameHustlerRelationUpsertOne) 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.GameHustlerRelation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(gamehustlerrelation.FieldID)
		}),
	).
	Exec(ctx)

func (*GameHustlerRelationUpsertOne) UpdateText

UpdateText sets the "text" field to the value that was provided on create.

type GameHustlerRelationWhereInput

type GameHustlerRelationWhereInput struct {
	Not *GameHustlerRelationWhereInput   `json:"not,omitempty"`
	Or  []*GameHustlerRelationWhereInput `json:"or,omitempty"`
	And []*GameHustlerRelationWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "citizen" field predicates.
	Citizen             *string  `json:"citizen,omitempty"`
	CitizenNEQ          *string  `json:"citizenNEQ,omitempty"`
	CitizenIn           []string `json:"citizenIn,omitempty"`
	CitizenNotIn        []string `json:"citizenNotIn,omitempty"`
	CitizenGT           *string  `json:"citizenGT,omitempty"`
	CitizenGTE          *string  `json:"citizenGTE,omitempty"`
	CitizenLT           *string  `json:"citizenLT,omitempty"`
	CitizenLTE          *string  `json:"citizenLTE,omitempty"`
	CitizenContains     *string  `json:"citizenContains,omitempty"`
	CitizenHasPrefix    *string  `json:"citizenHasPrefix,omitempty"`
	CitizenHasSuffix    *string  `json:"citizenHasSuffix,omitempty"`
	CitizenEqualFold    *string  `json:"citizenEqualFold,omitempty"`
	CitizenContainsFold *string  `json:"citizenContainsFold,omitempty"`

	// "conversation" field predicates.
	Conversation             *string  `json:"conversation,omitempty"`
	ConversationNEQ          *string  `json:"conversationNEQ,omitempty"`
	ConversationIn           []string `json:"conversationIn,omitempty"`
	ConversationNotIn        []string `json:"conversationNotIn,omitempty"`
	ConversationGT           *string  `json:"conversationGT,omitempty"`
	ConversationGTE          *string  `json:"conversationGTE,omitempty"`
	ConversationLT           *string  `json:"conversationLT,omitempty"`
	ConversationLTE          *string  `json:"conversationLTE,omitempty"`
	ConversationContains     *string  `json:"conversationContains,omitempty"`
	ConversationHasPrefix    *string  `json:"conversationHasPrefix,omitempty"`
	ConversationHasSuffix    *string  `json:"conversationHasSuffix,omitempty"`
	ConversationEqualFold    *string  `json:"conversationEqualFold,omitempty"`
	ConversationContainsFold *string  `json:"conversationContainsFold,omitempty"`

	// "text" field predicates.
	Text      *uint  `json:"text,omitempty"`
	TextNEQ   *uint  `json:"textNEQ,omitempty"`
	TextIn    []uint `json:"textIn,omitempty"`
	TextNotIn []uint `json:"textNotIn,omitempty"`
	TextGT    *uint  `json:"textGT,omitempty"`
	TextGTE   *uint  `json:"textGTE,omitempty"`
	TextLT    *uint  `json:"textLT,omitempty"`
	TextLTE   *uint  `json:"textLTE,omitempty"`

	// "hustler" edge predicates.
	HasHustler     *bool                    `json:"hasHustler,omitempty"`
	HasHustlerWith []*GameHustlerWhereInput `json:"hasHustlerWith,omitempty"`
}

GameHustlerRelationWhereInput represents a where input for filtering GameHustlerRelation queries.

func (*GameHustlerRelationWhereInput) Filter

Filter applies the GameHustlerRelationWhereInput filter on the GameHustlerRelationQuery builder.

func (*GameHustlerRelationWhereInput) P

P returns a predicate for filtering gamehustlerrelations. An error is returned if the input is empty or invalid.

type GameHustlerRelations

type GameHustlerRelations []*GameHustlerRelation

GameHustlerRelations is a parsable slice of GameHustlerRelation.

type GameHustlerSelect

type GameHustlerSelect struct {
	*GameHustlerQuery
	// contains filtered or unexported fields
}

GameHustlerSelect is the builder for selecting fields of GameHustler entities.

func (*GameHustlerSelect) Bool

func (ghs *GameHustlerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GameHustlerSelect) BoolX

func (ghs *GameHustlerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GameHustlerSelect) Bools

func (ghs *GameHustlerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GameHustlerSelect) BoolsX

func (ghs *GameHustlerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GameHustlerSelect) Float64

func (ghs *GameHustlerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GameHustlerSelect) Float64X

func (ghs *GameHustlerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GameHustlerSelect) Float64s

func (ghs *GameHustlerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GameHustlerSelect) Float64sX

func (ghs *GameHustlerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GameHustlerSelect) Int

func (ghs *GameHustlerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GameHustlerSelect) IntX

func (ghs *GameHustlerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GameHustlerSelect) Ints

func (ghs *GameHustlerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GameHustlerSelect) IntsX

func (ghs *GameHustlerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GameHustlerSelect) Scan

func (ghs *GameHustlerSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*GameHustlerSelect) ScanX

func (ghs *GameHustlerSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GameHustlerSelect) String

func (ghs *GameHustlerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GameHustlerSelect) StringX

func (ghs *GameHustlerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GameHustlerSelect) Strings

func (ghs *GameHustlerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GameHustlerSelect) StringsX

func (ghs *GameHustlerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GameHustlerUpdate

type GameHustlerUpdate struct {
	// contains filtered or unexported fields
}

GameHustlerUpdate is the builder for updating GameHustler entities.

func (*GameHustlerUpdate) AddItemIDs

func (ghu *GameHustlerUpdate) AddItemIDs(ids ...string) *GameHustlerUpdate

AddItemIDs adds the "items" edge to the GameHustlerItem entity by IDs.

func (*GameHustlerUpdate) AddItems

func (ghu *GameHustlerUpdate) AddItems(g ...*GameHustlerItem) *GameHustlerUpdate

AddItems adds the "items" edges to the GameHustlerItem entity.

func (*GameHustlerUpdate) AddQuestIDs

func (ghu *GameHustlerUpdate) AddQuestIDs(ids ...string) *GameHustlerUpdate

AddQuestIDs adds the "quests" edge to the GameHustlerQuest entity by IDs.

func (*GameHustlerUpdate) AddQuests

func (ghu *GameHustlerUpdate) AddQuests(g ...*GameHustlerQuest) *GameHustlerUpdate

AddQuests adds the "quests" edges to the GameHustlerQuest entity.

func (*GameHustlerUpdate) AddRelationIDs

func (ghu *GameHustlerUpdate) AddRelationIDs(ids ...string) *GameHustlerUpdate

AddRelationIDs adds the "relations" edge to the GameHustlerRelation entity by IDs.

func (*GameHustlerUpdate) AddRelations

func (ghu *GameHustlerUpdate) AddRelations(g ...*GameHustlerRelation) *GameHustlerUpdate

AddRelations adds the "relations" edges to the GameHustlerRelation entity.

func (*GameHustlerUpdate) ClearItems

func (ghu *GameHustlerUpdate) ClearItems() *GameHustlerUpdate

ClearItems clears all "items" edges to the GameHustlerItem entity.

func (*GameHustlerUpdate) ClearQuests

func (ghu *GameHustlerUpdate) ClearQuests() *GameHustlerUpdate

ClearQuests clears all "quests" edges to the GameHustlerQuest entity.

func (*GameHustlerUpdate) ClearRelations

func (ghu *GameHustlerUpdate) ClearRelations() *GameHustlerUpdate

ClearRelations clears all "relations" edges to the GameHustlerRelation entity.

func (*GameHustlerUpdate) Exec

func (ghu *GameHustlerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GameHustlerUpdate) ExecX

func (ghu *GameHustlerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerUpdate) Mutation

func (ghu *GameHustlerUpdate) Mutation() *GameHustlerMutation

Mutation returns the GameHustlerMutation object of the builder.

func (*GameHustlerUpdate) RemoveItemIDs

func (ghu *GameHustlerUpdate) RemoveItemIDs(ids ...string) *GameHustlerUpdate

RemoveItemIDs removes the "items" edge to GameHustlerItem entities by IDs.

func (*GameHustlerUpdate) RemoveItems

func (ghu *GameHustlerUpdate) RemoveItems(g ...*GameHustlerItem) *GameHustlerUpdate

RemoveItems removes "items" edges to GameHustlerItem entities.

func (*GameHustlerUpdate) RemoveQuestIDs

func (ghu *GameHustlerUpdate) RemoveQuestIDs(ids ...string) *GameHustlerUpdate

RemoveQuestIDs removes the "quests" edge to GameHustlerQuest entities by IDs.

func (*GameHustlerUpdate) RemoveQuests

func (ghu *GameHustlerUpdate) RemoveQuests(g ...*GameHustlerQuest) *GameHustlerUpdate

RemoveQuests removes "quests" edges to GameHustlerQuest entities.

func (*GameHustlerUpdate) RemoveRelationIDs

func (ghu *GameHustlerUpdate) RemoveRelationIDs(ids ...string) *GameHustlerUpdate

RemoveRelationIDs removes the "relations" edge to GameHustlerRelation entities by IDs.

func (*GameHustlerUpdate) RemoveRelations

func (ghu *GameHustlerUpdate) RemoveRelations(g ...*GameHustlerRelation) *GameHustlerUpdate

RemoveRelations removes "relations" edges to GameHustlerRelation entities.

func (*GameHustlerUpdate) Save

func (ghu *GameHustlerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GameHustlerUpdate) SaveX

func (ghu *GameHustlerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GameHustlerUpdate) SetLastPosition

func (ghu *GameHustlerUpdate) SetLastPosition(s schema.Position) *GameHustlerUpdate

SetLastPosition sets the "last_position" field.

func (*GameHustlerUpdate) Where

Where appends a list predicates to the GameHustlerUpdate builder.

type GameHustlerUpdateOne

type GameHustlerUpdateOne struct {
	// contains filtered or unexported fields
}

GameHustlerUpdateOne is the builder for updating a single GameHustler entity.

func (*GameHustlerUpdateOne) AddItemIDs

func (ghuo *GameHustlerUpdateOne) AddItemIDs(ids ...string) *GameHustlerUpdateOne

AddItemIDs adds the "items" edge to the GameHustlerItem entity by IDs.

func (*GameHustlerUpdateOne) AddItems

AddItems adds the "items" edges to the GameHustlerItem entity.

func (*GameHustlerUpdateOne) AddQuestIDs

func (ghuo *GameHustlerUpdateOne) AddQuestIDs(ids ...string) *GameHustlerUpdateOne

AddQuestIDs adds the "quests" edge to the GameHustlerQuest entity by IDs.

func (*GameHustlerUpdateOne) AddQuests

AddQuests adds the "quests" edges to the GameHustlerQuest entity.

func (*GameHustlerUpdateOne) AddRelationIDs

func (ghuo *GameHustlerUpdateOne) AddRelationIDs(ids ...string) *GameHustlerUpdateOne

AddRelationIDs adds the "relations" edge to the GameHustlerRelation entity by IDs.

func (*GameHustlerUpdateOne) AddRelations

AddRelations adds the "relations" edges to the GameHustlerRelation entity.

func (*GameHustlerUpdateOne) ClearItems

func (ghuo *GameHustlerUpdateOne) ClearItems() *GameHustlerUpdateOne

ClearItems clears all "items" edges to the GameHustlerItem entity.

func (*GameHustlerUpdateOne) ClearQuests

func (ghuo *GameHustlerUpdateOne) ClearQuests() *GameHustlerUpdateOne

ClearQuests clears all "quests" edges to the GameHustlerQuest entity.

func (*GameHustlerUpdateOne) ClearRelations

func (ghuo *GameHustlerUpdateOne) ClearRelations() *GameHustlerUpdateOne

ClearRelations clears all "relations" edges to the GameHustlerRelation entity.

func (*GameHustlerUpdateOne) Exec

func (ghuo *GameHustlerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GameHustlerUpdateOne) ExecX

func (ghuo *GameHustlerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerUpdateOne) Mutation

func (ghuo *GameHustlerUpdateOne) Mutation() *GameHustlerMutation

Mutation returns the GameHustlerMutation object of the builder.

func (*GameHustlerUpdateOne) RemoveItemIDs

func (ghuo *GameHustlerUpdateOne) RemoveItemIDs(ids ...string) *GameHustlerUpdateOne

RemoveItemIDs removes the "items" edge to GameHustlerItem entities by IDs.

func (*GameHustlerUpdateOne) RemoveItems

func (ghuo *GameHustlerUpdateOne) RemoveItems(g ...*GameHustlerItem) *GameHustlerUpdateOne

RemoveItems removes "items" edges to GameHustlerItem entities.

func (*GameHustlerUpdateOne) RemoveQuestIDs

func (ghuo *GameHustlerUpdateOne) RemoveQuestIDs(ids ...string) *GameHustlerUpdateOne

RemoveQuestIDs removes the "quests" edge to GameHustlerQuest entities by IDs.

func (*GameHustlerUpdateOne) RemoveQuests

func (ghuo *GameHustlerUpdateOne) RemoveQuests(g ...*GameHustlerQuest) *GameHustlerUpdateOne

RemoveQuests removes "quests" edges to GameHustlerQuest entities.

func (*GameHustlerUpdateOne) RemoveRelationIDs

func (ghuo *GameHustlerUpdateOne) RemoveRelationIDs(ids ...string) *GameHustlerUpdateOne

RemoveRelationIDs removes the "relations" edge to GameHustlerRelation entities by IDs.

func (*GameHustlerUpdateOne) RemoveRelations

func (ghuo *GameHustlerUpdateOne) RemoveRelations(g ...*GameHustlerRelation) *GameHustlerUpdateOne

RemoveRelations removes "relations" edges to GameHustlerRelation entities.

func (*GameHustlerUpdateOne) Save

Save executes the query and returns the updated GameHustler entity.

func (*GameHustlerUpdateOne) SaveX

func (ghuo *GameHustlerUpdateOne) SaveX(ctx context.Context) *GameHustler

SaveX is like Save, but panics if an error occurs.

func (*GameHustlerUpdateOne) Select

func (ghuo *GameHustlerUpdateOne) Select(field string, fields ...string) *GameHustlerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GameHustlerUpdateOne) SetLastPosition

func (ghuo *GameHustlerUpdateOne) SetLastPosition(s schema.Position) *GameHustlerUpdateOne

SetLastPosition sets the "last_position" field.

type GameHustlerUpsert

type GameHustlerUpsert struct {
	*sql.UpdateSet
}

GameHustlerUpsert is the "OnConflict" setter.

func (*GameHustlerUpsert) SetCreatedAt

func (u *GameHustlerUpsert) SetCreatedAt(v time.Time) *GameHustlerUpsert

SetCreatedAt sets the "created_at" field.

func (*GameHustlerUpsert) SetLastPosition

func (u *GameHustlerUpsert) SetLastPosition(v schema.Position) *GameHustlerUpsert

SetLastPosition sets the "last_position" field.

func (*GameHustlerUpsert) UpdateCreatedAt

func (u *GameHustlerUpsert) UpdateCreatedAt() *GameHustlerUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*GameHustlerUpsert) UpdateLastPosition

func (u *GameHustlerUpsert) UpdateLastPosition() *GameHustlerUpsert

UpdateLastPosition sets the "last_position" field to the value that was provided on create.

type GameHustlerUpsertBulk

type GameHustlerUpsertBulk struct {
	// contains filtered or unexported fields
}

GameHustlerUpsertBulk is the builder for "upsert"-ing a bulk of GameHustler nodes.

func (*GameHustlerUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GameHustlerUpsertBulk) Exec

Exec executes the query.

func (*GameHustlerUpsertBulk) ExecX

func (u *GameHustlerUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GameHustler.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GameHustlerUpsertBulk) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*GameHustlerUpsertBulk) SetLastPosition

SetLastPosition sets the "last_position" field.

func (*GameHustlerUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GameHustlerCreateBulk.OnConflict documentation for more info.

func (*GameHustlerUpsertBulk) UpdateCreatedAt

func (u *GameHustlerUpsertBulk) UpdateCreatedAt() *GameHustlerUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*GameHustlerUpsertBulk) UpdateLastPosition

func (u *GameHustlerUpsertBulk) UpdateLastPosition() *GameHustlerUpsertBulk

UpdateLastPosition sets the "last_position" field to the value that was provided on create.

func (*GameHustlerUpsertBulk) UpdateNewValues

func (u *GameHustlerUpsertBulk) UpdateNewValues() *GameHustlerUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GameHustler.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(gamehustler.FieldID)
		}),
	).
	Exec(ctx)

type GameHustlerUpsertOne

type GameHustlerUpsertOne struct {
	// contains filtered or unexported fields
}

GameHustlerUpsertOne is the builder for "upsert"-ing

one GameHustler node.

func (*GameHustlerUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GameHustlerUpsertOne) Exec

Exec executes the query.

func (*GameHustlerUpsertOne) ExecX

func (u *GameHustlerUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GameHustlerUpsertOne) ID

func (u *GameHustlerUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GameHustlerUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*GameHustlerUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GameHustler.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GameHustlerUpsertOne) SetCreatedAt

func (u *GameHustlerUpsertOne) SetCreatedAt(v time.Time) *GameHustlerUpsertOne

SetCreatedAt sets the "created_at" field.

func (*GameHustlerUpsertOne) SetLastPosition

SetLastPosition sets the "last_position" field.

func (*GameHustlerUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the GameHustlerCreate.OnConflict documentation for more info.

func (*GameHustlerUpsertOne) UpdateCreatedAt

func (u *GameHustlerUpsertOne) UpdateCreatedAt() *GameHustlerUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*GameHustlerUpsertOne) UpdateLastPosition

func (u *GameHustlerUpsertOne) UpdateLastPosition() *GameHustlerUpsertOne

UpdateLastPosition sets the "last_position" field to the value that was provided on create.

func (*GameHustlerUpsertOne) UpdateNewValues

func (u *GameHustlerUpsertOne) UpdateNewValues() *GameHustlerUpsertOne

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.GameHustler.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(gamehustler.FieldID)
		}),
	).
	Exec(ctx)

type GameHustlerWhereInput

type GameHustlerWhereInput struct {
	Not *GameHustlerWhereInput   `json:"not,omitempty"`
	Or  []*GameHustlerWhereInput `json:"or,omitempty"`
	And []*GameHustlerWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "relations" edge predicates.
	HasRelations     *bool                            `json:"hasRelations,omitempty"`
	HasRelationsWith []*GameHustlerRelationWhereInput `json:"hasRelationsWith,omitempty"`

	// "items" edge predicates.
	HasItems     *bool                        `json:"hasItems,omitempty"`
	HasItemsWith []*GameHustlerItemWhereInput `json:"hasItemsWith,omitempty"`

	// "quests" edge predicates.
	HasQuests     *bool                         `json:"hasQuests,omitempty"`
	HasQuestsWith []*GameHustlerQuestWhereInput `json:"hasQuestsWith,omitempty"`
}

GameHustlerWhereInput represents a where input for filtering GameHustler queries.

func (*GameHustlerWhereInput) Filter

Filter applies the GameHustlerWhereInput filter on the GameHustlerQuery builder.

func (*GameHustlerWhereInput) P

P returns a predicate for filtering gamehustlers. An error is returned if the input is empty or invalid.

type GameHustlers

type GameHustlers []*GameHustler

GameHustlers is a parsable slice of GameHustler.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type Hustler

type Hustler struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type hustler.Type `json:"type,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Color holds the value of the "color" field.
	Color string `json:"color,omitempty"`
	// Background holds the value of the "background" field.
	Background string `json:"background,omitempty"`
	// Age holds the value of the "age" field.
	Age uint64 `json:"age,omitempty"`
	// Sex holds the value of the "sex" field.
	Sex hustler.Sex `json:"sex,omitempty"`
	// Viewbox holds the value of the "viewbox" field.
	Viewbox []int `json:"viewbox,omitempty"`
	// Order holds the value of the "order" field.
	Order []int `json:"order,omitempty"`
	// Svg holds the value of the "svg" field.
	Svg string `json:"svg,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the HustlerQuery when eager-loading is set.
	Edges HustlerEdges `json:"edges"`
	// contains filtered or unexported fields
}

Hustler is the model entity for the Hustler schema.

func (*Hustler) Accessory

func (h *Hustler) Accessory(ctx context.Context) (*Item, error)

func (*Hustler) Beard

func (h *Hustler) Beard(ctx context.Context) (*BodyPart, error)

func (*Hustler) Body

func (h *Hustler) Body(ctx context.Context) (*BodyPart, error)

func (*Hustler) Clothes

func (h *Hustler) Clothes(ctx context.Context) (*Item, error)

func (*Hustler) Drug

func (h *Hustler) Drug(ctx context.Context) (*Item, error)

func (*Hustler) Foot

func (h *Hustler) Foot(ctx context.Context) (*Item, error)

func (*Hustler) Hair

func (h *Hustler) Hair(ctx context.Context) (*BodyPart, error)

func (*Hustler) Hand

func (h *Hustler) Hand(ctx context.Context) (*Item, error)

func (*Hustler) Index

func (h *Hustler) Index(ctx context.Context) (*Search, error)

func (*Hustler) IsSearchResult

func (*Hustler) IsSearchResult()

func (*Hustler) IsToken

func (*Hustler) IsToken()

func (*Hustler) Neck

func (h *Hustler) Neck(ctx context.Context) (*Item, error)

func (*Hustler) Node

func (h *Hustler) Node(ctx context.Context) (node *Node, err error)

func (*Hustler) QueryAccessory

func (h *Hustler) QueryAccessory() *ItemQuery

QueryAccessory queries the "accessory" edge of the Hustler entity.

func (*Hustler) QueryBeard

func (h *Hustler) QueryBeard() *BodyPartQuery

QueryBeard queries the "beard" edge of the Hustler entity.

func (*Hustler) QueryBody

func (h *Hustler) QueryBody() *BodyPartQuery

QueryBody queries the "body" edge of the Hustler entity.

func (*Hustler) QueryClothes

func (h *Hustler) QueryClothes() *ItemQuery

QueryClothes queries the "clothes" edge of the Hustler entity.

func (*Hustler) QueryDrug

func (h *Hustler) QueryDrug() *ItemQuery

QueryDrug queries the "drug" edge of the Hustler entity.

func (*Hustler) QueryFoot

func (h *Hustler) QueryFoot() *ItemQuery

QueryFoot queries the "foot" edge of the Hustler entity.

func (*Hustler) QueryHair

func (h *Hustler) QueryHair() *BodyPartQuery

QueryHair queries the "hair" edge of the Hustler entity.

func (*Hustler) QueryHand

func (h *Hustler) QueryHand() *ItemQuery

QueryHand queries the "hand" edge of the Hustler entity.

func (*Hustler) QueryIndex

func (h *Hustler) QueryIndex() *SearchQuery

QueryIndex queries the "index" edge of the Hustler entity.

func (*Hustler) QueryNeck

func (h *Hustler) QueryNeck() *ItemQuery

QueryNeck queries the "neck" edge of the Hustler entity.

func (*Hustler) QueryRing

func (h *Hustler) QueryRing() *ItemQuery

QueryRing queries the "ring" edge of the Hustler entity.

func (*Hustler) QueryVehicle

func (h *Hustler) QueryVehicle() *ItemQuery

QueryVehicle queries the "vehicle" edge of the Hustler entity.

func (*Hustler) QueryWaist

func (h *Hustler) QueryWaist() *ItemQuery

QueryWaist queries the "waist" edge of the Hustler entity.

func (*Hustler) QueryWallet

func (h *Hustler) QueryWallet() *WalletQuery

QueryWallet queries the "wallet" edge of the Hustler entity.

func (*Hustler) QueryWeapon

func (h *Hustler) QueryWeapon() *ItemQuery

QueryWeapon queries the "weapon" edge of the Hustler entity.

func (*Hustler) Ring

func (h *Hustler) Ring(ctx context.Context) (*Item, error)

func (*Hustler) String

func (h *Hustler) String() string

String implements the fmt.Stringer.

func (*Hustler) ToEdge

func (h *Hustler) ToEdge(order *HustlerOrder) *HustlerEdge

ToEdge converts Hustler into HustlerEdge.

func (*Hustler) Unwrap

func (h *Hustler) Unwrap() *Hustler

Unwrap unwraps the Hustler 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 (*Hustler) Update

func (h *Hustler) Update() *HustlerUpdateOne

Update returns a builder for updating this Hustler. Note that you need to call Hustler.Unwrap() before calling this method if this Hustler was returned from a transaction, and the transaction was committed or rolled back.

func (*Hustler) Vehicle

func (h *Hustler) Vehicle(ctx context.Context) (*Item, error)

func (*Hustler) Waist

func (h *Hustler) Waist(ctx context.Context) (*Item, error)

func (*Hustler) Wallet

func (h *Hustler) Wallet(ctx context.Context) (*Wallet, error)

func (*Hustler) Weapon

func (h *Hustler) Weapon(ctx context.Context) (*Item, error)

type HustlerClient

type HustlerClient struct {
	// contains filtered or unexported fields
}

HustlerClient is a client for the Hustler schema.

func NewHustlerClient

func NewHustlerClient(c config) *HustlerClient

NewHustlerClient returns a client for the Hustler from the given config.

func (*HustlerClient) Create

func (c *HustlerClient) Create() *HustlerCreate

Create returns a create builder for Hustler.

func (*HustlerClient) CreateBulk

func (c *HustlerClient) CreateBulk(builders ...*HustlerCreate) *HustlerCreateBulk

CreateBulk returns a builder for creating a bulk of Hustler entities.

func (*HustlerClient) Delete

func (c *HustlerClient) Delete() *HustlerDelete

Delete returns a delete builder for Hustler.

func (*HustlerClient) DeleteOne

func (c *HustlerClient) DeleteOne(h *Hustler) *HustlerDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*HustlerClient) DeleteOneID

func (c *HustlerClient) DeleteOneID(id string) *HustlerDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*HustlerClient) Get

func (c *HustlerClient) Get(ctx context.Context, id string) (*Hustler, error)

Get returns a Hustler entity by its id.

func (*HustlerClient) GetX

func (c *HustlerClient) GetX(ctx context.Context, id string) *Hustler

GetX is like Get, but panics if an error occurs.

func (*HustlerClient) Hooks

func (c *HustlerClient) Hooks() []Hook

Hooks returns the client hooks.

func (*HustlerClient) Query

func (c *HustlerClient) Query() *HustlerQuery

Query returns a query builder for Hustler.

func (*HustlerClient) QueryAccessory

func (c *HustlerClient) QueryAccessory(h *Hustler) *ItemQuery

QueryAccessory queries the accessory edge of a Hustler.

func (*HustlerClient) QueryBeard

func (c *HustlerClient) QueryBeard(h *Hustler) *BodyPartQuery

QueryBeard queries the beard edge of a Hustler.

func (*HustlerClient) QueryBody

func (c *HustlerClient) QueryBody(h *Hustler) *BodyPartQuery

QueryBody queries the body edge of a Hustler.

func (*HustlerClient) QueryClothes

func (c *HustlerClient) QueryClothes(h *Hustler) *ItemQuery

QueryClothes queries the clothes edge of a Hustler.

func (*HustlerClient) QueryDrug

func (c *HustlerClient) QueryDrug(h *Hustler) *ItemQuery

QueryDrug queries the drug edge of a Hustler.

func (*HustlerClient) QueryFoot

func (c *HustlerClient) QueryFoot(h *Hustler) *ItemQuery

QueryFoot queries the foot edge of a Hustler.

func (*HustlerClient) QueryHair

func (c *HustlerClient) QueryHair(h *Hustler) *BodyPartQuery

QueryHair queries the hair edge of a Hustler.

func (*HustlerClient) QueryHand

func (c *HustlerClient) QueryHand(h *Hustler) *ItemQuery

QueryHand queries the hand edge of a Hustler.

func (*HustlerClient) QueryIndex

func (c *HustlerClient) QueryIndex(h *Hustler) *SearchQuery

QueryIndex queries the index edge of a Hustler.

func (*HustlerClient) QueryNeck

func (c *HustlerClient) QueryNeck(h *Hustler) *ItemQuery

QueryNeck queries the neck edge of a Hustler.

func (*HustlerClient) QueryRing

func (c *HustlerClient) QueryRing(h *Hustler) *ItemQuery

QueryRing queries the ring edge of a Hustler.

func (*HustlerClient) QueryVehicle

func (c *HustlerClient) QueryVehicle(h *Hustler) *ItemQuery

QueryVehicle queries the vehicle edge of a Hustler.

func (*HustlerClient) QueryWaist

func (c *HustlerClient) QueryWaist(h *Hustler) *ItemQuery

QueryWaist queries the waist edge of a Hustler.

func (*HustlerClient) QueryWallet

func (c *HustlerClient) QueryWallet(h *Hustler) *WalletQuery

QueryWallet queries the wallet edge of a Hustler.

func (*HustlerClient) QueryWeapon

func (c *HustlerClient) QueryWeapon(h *Hustler) *ItemQuery

QueryWeapon queries the weapon edge of a Hustler.

func (*HustlerClient) Update

func (c *HustlerClient) Update() *HustlerUpdate

Update returns an update builder for Hustler.

func (*HustlerClient) UpdateOne

func (c *HustlerClient) UpdateOne(h *Hustler) *HustlerUpdateOne

UpdateOne returns an update builder for the given entity.

func (*HustlerClient) UpdateOneID

func (c *HustlerClient) UpdateOneID(id string) *HustlerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*HustlerClient) Use

func (c *HustlerClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hustler.Hooks(f(g(h())))`.

type HustlerConnection

type HustlerConnection struct {
	Edges      []*HustlerEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

HustlerConnection is the connection containing edges to Hustler.

type HustlerCreate

type HustlerCreate struct {
	// contains filtered or unexported fields
}

HustlerCreate is the builder for creating a Hustler entity.

func (*HustlerCreate) Exec

func (hc *HustlerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*HustlerCreate) ExecX

func (hc *HustlerCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HustlerCreate) Mutation

func (hc *HustlerCreate) Mutation() *HustlerMutation

Mutation returns the HustlerMutation object of the builder.

func (*HustlerCreate) OnConflict

func (hc *HustlerCreate) OnConflict(opts ...sql.ConflictOption) *HustlerUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Hustler.Create().
	SetType(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.HustlerUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*HustlerCreate) OnConflictColumns

func (hc *HustlerCreate) OnConflictColumns(columns ...string) *HustlerUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Hustler.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HustlerCreate) Save

func (hc *HustlerCreate) Save(ctx context.Context) (*Hustler, error)

Save creates the Hustler in the database.

func (*HustlerCreate) SaveX

func (hc *HustlerCreate) SaveX(ctx context.Context) *Hustler

SaveX calls Save and panics if Save returns an error.

func (*HustlerCreate) SetAccessory

func (hc *HustlerCreate) SetAccessory(i *Item) *HustlerCreate

SetAccessory sets the "accessory" edge to the Item entity.

func (*HustlerCreate) SetAccessoryID

func (hc *HustlerCreate) SetAccessoryID(id string) *HustlerCreate

SetAccessoryID sets the "accessory" edge to the Item entity by ID.

func (*HustlerCreate) SetAge

func (hc *HustlerCreate) SetAge(u uint64) *HustlerCreate

SetAge sets the "age" field.

func (*HustlerCreate) SetBackground

func (hc *HustlerCreate) SetBackground(s string) *HustlerCreate

SetBackground sets the "background" field.

func (*HustlerCreate) SetBeard

func (hc *HustlerCreate) SetBeard(b *BodyPart) *HustlerCreate

SetBeard sets the "beard" edge to the BodyPart entity.

func (*HustlerCreate) SetBeardID

func (hc *HustlerCreate) SetBeardID(id string) *HustlerCreate

SetBeardID sets the "beard" edge to the BodyPart entity by ID.

func (*HustlerCreate) SetBody

func (hc *HustlerCreate) SetBody(b *BodyPart) *HustlerCreate

SetBody sets the "body" edge to the BodyPart entity.

func (*HustlerCreate) SetBodyID

func (hc *HustlerCreate) SetBodyID(id string) *HustlerCreate

SetBodyID sets the "body" edge to the BodyPart entity by ID.

func (*HustlerCreate) SetClothes

func (hc *HustlerCreate) SetClothes(i *Item) *HustlerCreate

SetClothes sets the "clothes" edge to the Item entity.

func (*HustlerCreate) SetClothesID

func (hc *HustlerCreate) SetClothesID(id string) *HustlerCreate

SetClothesID sets the "clothes" edge to the Item entity by ID.

func (*HustlerCreate) SetColor

func (hc *HustlerCreate) SetColor(s string) *HustlerCreate

SetColor sets the "color" field.

func (*HustlerCreate) SetCreatedAt

func (hc *HustlerCreate) SetCreatedAt(t time.Time) *HustlerCreate

SetCreatedAt sets the "created_at" field.

func (*HustlerCreate) SetDrug

func (hc *HustlerCreate) SetDrug(i *Item) *HustlerCreate

SetDrug sets the "drug" edge to the Item entity.

func (*HustlerCreate) SetDrugID

func (hc *HustlerCreate) SetDrugID(id string) *HustlerCreate

SetDrugID sets the "drug" edge to the Item entity by ID.

func (*HustlerCreate) SetFoot

func (hc *HustlerCreate) SetFoot(i *Item) *HustlerCreate

SetFoot sets the "foot" edge to the Item entity.

func (*HustlerCreate) SetFootID

func (hc *HustlerCreate) SetFootID(id string) *HustlerCreate

SetFootID sets the "foot" edge to the Item entity by ID.

func (*HustlerCreate) SetHair

func (hc *HustlerCreate) SetHair(b *BodyPart) *HustlerCreate

SetHair sets the "hair" edge to the BodyPart entity.

func (*HustlerCreate) SetHairID

func (hc *HustlerCreate) SetHairID(id string) *HustlerCreate

SetHairID sets the "hair" edge to the BodyPart entity by ID.

func (*HustlerCreate) SetHand

func (hc *HustlerCreate) SetHand(i *Item) *HustlerCreate

SetHand sets the "hand" edge to the Item entity.

func (*HustlerCreate) SetHandID

func (hc *HustlerCreate) SetHandID(id string) *HustlerCreate

SetHandID sets the "hand" edge to the Item entity by ID.

func (*HustlerCreate) SetID

func (hc *HustlerCreate) SetID(s string) *HustlerCreate

SetID sets the "id" field.

func (*HustlerCreate) SetIndex

func (hc *HustlerCreate) SetIndex(s *Search) *HustlerCreate

SetIndex sets the "index" edge to the Search entity.

func (*HustlerCreate) SetIndexID

func (hc *HustlerCreate) SetIndexID(id string) *HustlerCreate

SetIndexID sets the "index" edge to the Search entity by ID.

func (*HustlerCreate) SetName

func (hc *HustlerCreate) SetName(s string) *HustlerCreate

SetName sets the "name" field.

func (*HustlerCreate) SetNeck

func (hc *HustlerCreate) SetNeck(i *Item) *HustlerCreate

SetNeck sets the "neck" edge to the Item entity.

func (*HustlerCreate) SetNeckID

func (hc *HustlerCreate) SetNeckID(id string) *HustlerCreate

SetNeckID sets the "neck" edge to the Item entity by ID.

func (*HustlerCreate) SetNillableAccessoryID

func (hc *HustlerCreate) SetNillableAccessoryID(id *string) *HustlerCreate

SetNillableAccessoryID sets the "accessory" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableBackground

func (hc *HustlerCreate) SetNillableBackground(s *string) *HustlerCreate

SetNillableBackground sets the "background" field if the given value is not nil.

func (*HustlerCreate) SetNillableBeardID

func (hc *HustlerCreate) SetNillableBeardID(id *string) *HustlerCreate

SetNillableBeardID sets the "beard" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableBodyID

func (hc *HustlerCreate) SetNillableBodyID(id *string) *HustlerCreate

SetNillableBodyID sets the "body" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableClothesID

func (hc *HustlerCreate) SetNillableClothesID(id *string) *HustlerCreate

SetNillableClothesID sets the "clothes" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableColor

func (hc *HustlerCreate) SetNillableColor(s *string) *HustlerCreate

SetNillableColor sets the "color" field if the given value is not nil.

func (*HustlerCreate) SetNillableCreatedAt

func (hc *HustlerCreate) SetNillableCreatedAt(t *time.Time) *HustlerCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*HustlerCreate) SetNillableDrugID

func (hc *HustlerCreate) SetNillableDrugID(id *string) *HustlerCreate

SetNillableDrugID sets the "drug" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableFootID

func (hc *HustlerCreate) SetNillableFootID(id *string) *HustlerCreate

SetNillableFootID sets the "foot" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableHairID

func (hc *HustlerCreate) SetNillableHairID(id *string) *HustlerCreate

SetNillableHairID sets the "hair" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableHandID

func (hc *HustlerCreate) SetNillableHandID(id *string) *HustlerCreate

SetNillableHandID sets the "hand" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableIndexID

func (hc *HustlerCreate) SetNillableIndexID(id *string) *HustlerCreate

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableName

func (hc *HustlerCreate) SetNillableName(s *string) *HustlerCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*HustlerCreate) SetNillableNeckID

func (hc *HustlerCreate) SetNillableNeckID(id *string) *HustlerCreate

SetNillableNeckID sets the "neck" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableRingID

func (hc *HustlerCreate) SetNillableRingID(id *string) *HustlerCreate

SetNillableRingID sets the "ring" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableSex

func (hc *HustlerCreate) SetNillableSex(h *hustler.Sex) *HustlerCreate

SetNillableSex sets the "sex" field if the given value is not nil.

func (*HustlerCreate) SetNillableSvg

func (hc *HustlerCreate) SetNillableSvg(s *string) *HustlerCreate

SetNillableSvg sets the "svg" field if the given value is not nil.

func (*HustlerCreate) SetNillableTitle

func (hc *HustlerCreate) SetNillableTitle(s *string) *HustlerCreate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*HustlerCreate) SetNillableVehicleID

func (hc *HustlerCreate) SetNillableVehicleID(id *string) *HustlerCreate

SetNillableVehicleID sets the "vehicle" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableWaistID

func (hc *HustlerCreate) SetNillableWaistID(id *string) *HustlerCreate

SetNillableWaistID sets the "waist" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableWalletID

func (hc *HustlerCreate) SetNillableWalletID(id *string) *HustlerCreate

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*HustlerCreate) SetNillableWeaponID

func (hc *HustlerCreate) SetNillableWeaponID(id *string) *HustlerCreate

SetNillableWeaponID sets the "weapon" edge to the Item entity by ID if the given value is not nil.

func (*HustlerCreate) SetOrder

func (hc *HustlerCreate) SetOrder(i []int) *HustlerCreate

SetOrder sets the "order" field.

func (*HustlerCreate) SetRing

func (hc *HustlerCreate) SetRing(i *Item) *HustlerCreate

SetRing sets the "ring" edge to the Item entity.

func (*HustlerCreate) SetRingID

func (hc *HustlerCreate) SetRingID(id string) *HustlerCreate

SetRingID sets the "ring" edge to the Item entity by ID.

func (*HustlerCreate) SetSex

func (hc *HustlerCreate) SetSex(h hustler.Sex) *HustlerCreate

SetSex sets the "sex" field.

func (*HustlerCreate) SetSvg

func (hc *HustlerCreate) SetSvg(s string) *HustlerCreate

SetSvg sets the "svg" field.

func (*HustlerCreate) SetTitle

func (hc *HustlerCreate) SetTitle(s string) *HustlerCreate

SetTitle sets the "title" field.

func (*HustlerCreate) SetType

func (hc *HustlerCreate) SetType(h hustler.Type) *HustlerCreate

SetType sets the "type" field.

func (*HustlerCreate) SetVehicle

func (hc *HustlerCreate) SetVehicle(i *Item) *HustlerCreate

SetVehicle sets the "vehicle" edge to the Item entity.

func (*HustlerCreate) SetVehicleID

func (hc *HustlerCreate) SetVehicleID(id string) *HustlerCreate

SetVehicleID sets the "vehicle" edge to the Item entity by ID.

func (*HustlerCreate) SetViewbox

func (hc *HustlerCreate) SetViewbox(i []int) *HustlerCreate

SetViewbox sets the "viewbox" field.

func (*HustlerCreate) SetWaist

func (hc *HustlerCreate) SetWaist(i *Item) *HustlerCreate

SetWaist sets the "waist" edge to the Item entity.

func (*HustlerCreate) SetWaistID

func (hc *HustlerCreate) SetWaistID(id string) *HustlerCreate

SetWaistID sets the "waist" edge to the Item entity by ID.

func (*HustlerCreate) SetWallet

func (hc *HustlerCreate) SetWallet(w *Wallet) *HustlerCreate

SetWallet sets the "wallet" edge to the Wallet entity.

func (*HustlerCreate) SetWalletID

func (hc *HustlerCreate) SetWalletID(id string) *HustlerCreate

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

func (*HustlerCreate) SetWeapon

func (hc *HustlerCreate) SetWeapon(i *Item) *HustlerCreate

SetWeapon sets the "weapon" edge to the Item entity.

func (*HustlerCreate) SetWeaponID

func (hc *HustlerCreate) SetWeaponID(id string) *HustlerCreate

SetWeaponID sets the "weapon" edge to the Item entity by ID.

type HustlerCreateBulk

type HustlerCreateBulk struct {
	// contains filtered or unexported fields
}

HustlerCreateBulk is the builder for creating many Hustler entities in bulk.

func (*HustlerCreateBulk) Exec

func (hcb *HustlerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*HustlerCreateBulk) ExecX

func (hcb *HustlerCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HustlerCreateBulk) OnConflict

func (hcb *HustlerCreateBulk) OnConflict(opts ...sql.ConflictOption) *HustlerUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Hustler.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.HustlerUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*HustlerCreateBulk) OnConflictColumns

func (hcb *HustlerCreateBulk) OnConflictColumns(columns ...string) *HustlerUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Hustler.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HustlerCreateBulk) Save

func (hcb *HustlerCreateBulk) Save(ctx context.Context) ([]*Hustler, error)

Save creates the Hustler entities in the database.

func (*HustlerCreateBulk) SaveX

func (hcb *HustlerCreateBulk) SaveX(ctx context.Context) []*Hustler

SaveX is like Save, but panics if an error occurs.

type HustlerDelete

type HustlerDelete struct {
	// contains filtered or unexported fields
}

HustlerDelete is the builder for deleting a Hustler entity.

func (*HustlerDelete) Exec

func (hd *HustlerDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*HustlerDelete) ExecX

func (hd *HustlerDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*HustlerDelete) Where

func (hd *HustlerDelete) Where(ps ...predicate.Hustler) *HustlerDelete

Where appends a list predicates to the HustlerDelete builder.

type HustlerDeleteOne

type HustlerDeleteOne struct {
	// contains filtered or unexported fields
}

HustlerDeleteOne is the builder for deleting a single Hustler entity.

func (*HustlerDeleteOne) Exec

func (hdo *HustlerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*HustlerDeleteOne) ExecX

func (hdo *HustlerDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type HustlerEdge

type HustlerEdge struct {
	Node   *Hustler `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

HustlerEdge is the edge representation of Hustler.

type HustlerEdges

type HustlerEdges struct {
	// Wallet holds the value of the wallet edge.
	Wallet *Wallet `json:"wallet,omitempty"`
	// Weapon holds the value of the weapon edge.
	Weapon *Item `json:"weapon,omitempty"`
	// Clothes holds the value of the clothes edge.
	Clothes *Item `json:"clothes,omitempty"`
	// Vehicle holds the value of the vehicle edge.
	Vehicle *Item `json:"vehicle,omitempty"`
	// Waist holds the value of the waist edge.
	Waist *Item `json:"waist,omitempty"`
	// Foot holds the value of the foot edge.
	Foot *Item `json:"foot,omitempty"`
	// Hand holds the value of the hand edge.
	Hand *Item `json:"hand,omitempty"`
	// Drug holds the value of the drug edge.
	Drug *Item `json:"drug,omitempty"`
	// Neck holds the value of the neck edge.
	Neck *Item `json:"neck,omitempty"`
	// Ring holds the value of the ring edge.
	Ring *Item `json:"ring,omitempty"`
	// Accessory holds the value of the accessory edge.
	Accessory *Item `json:"accessory,omitempty"`
	// Body holds the value of the body edge.
	Body *BodyPart `json:"body,omitempty"`
	// Hair holds the value of the hair edge.
	Hair *BodyPart `json:"hair,omitempty"`
	// Beard holds the value of the beard edge.
	Beard *BodyPart `json:"beard,omitempty"`
	// Index holds the value of the index edge.
	Index *Search `json:"index,omitempty"`
	// contains filtered or unexported fields
}

HustlerEdges holds the relations/edges for other nodes in the graph.

func (HustlerEdges) AccessoryOrErr

func (e HustlerEdges) AccessoryOrErr() (*Item, error)

AccessoryOrErr returns the Accessory value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) BeardOrErr

func (e HustlerEdges) BeardOrErr() (*BodyPart, error)

BeardOrErr returns the Beard value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) BodyOrErr

func (e HustlerEdges) BodyOrErr() (*BodyPart, error)

BodyOrErr returns the Body value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) ClothesOrErr

func (e HustlerEdges) ClothesOrErr() (*Item, error)

ClothesOrErr returns the Clothes value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) DrugOrErr

func (e HustlerEdges) DrugOrErr() (*Item, error)

DrugOrErr returns the Drug value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) FootOrErr

func (e HustlerEdges) FootOrErr() (*Item, error)

FootOrErr returns the Foot value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) HairOrErr

func (e HustlerEdges) HairOrErr() (*BodyPart, error)

HairOrErr returns the Hair value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) HandOrErr

func (e HustlerEdges) HandOrErr() (*Item, error)

HandOrErr returns the Hand value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) IndexOrErr

func (e HustlerEdges) IndexOrErr() (*Search, error)

IndexOrErr returns the Index value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) NeckOrErr

func (e HustlerEdges) NeckOrErr() (*Item, error)

NeckOrErr returns the Neck value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) RingOrErr

func (e HustlerEdges) RingOrErr() (*Item, error)

RingOrErr returns the Ring value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) VehicleOrErr

func (e HustlerEdges) VehicleOrErr() (*Item, error)

VehicleOrErr returns the Vehicle value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) WaistOrErr

func (e HustlerEdges) WaistOrErr() (*Item, error)

WaistOrErr returns the Waist value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) WalletOrErr

func (e HustlerEdges) WalletOrErr() (*Wallet, error)

WalletOrErr returns the Wallet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HustlerEdges) WeaponOrErr

func (e HustlerEdges) WeaponOrErr() (*Item, error)

WeaponOrErr returns the Weapon value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type HustlerGroupBy

type HustlerGroupBy struct {
	// contains filtered or unexported fields
}

HustlerGroupBy is the group-by builder for Hustler entities.

func (*HustlerGroupBy) Aggregate

func (hgb *HustlerGroupBy) Aggregate(fns ...AggregateFunc) *HustlerGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*HustlerGroupBy) Bool

func (hgb *HustlerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*HustlerGroupBy) BoolX

func (hgb *HustlerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HustlerGroupBy) Bools

func (hgb *HustlerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*HustlerGroupBy) BoolsX

func (hgb *HustlerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HustlerGroupBy) Float64

func (hgb *HustlerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*HustlerGroupBy) Float64X

func (hgb *HustlerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HustlerGroupBy) Float64s

func (hgb *HustlerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*HustlerGroupBy) Float64sX

func (hgb *HustlerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HustlerGroupBy) Int

func (hgb *HustlerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*HustlerGroupBy) IntX

func (hgb *HustlerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HustlerGroupBy) Ints

func (hgb *HustlerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*HustlerGroupBy) IntsX

func (hgb *HustlerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HustlerGroupBy) Scan

func (hgb *HustlerGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*HustlerGroupBy) ScanX

func (hgb *HustlerGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*HustlerGroupBy) String

func (hgb *HustlerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*HustlerGroupBy) StringX

func (hgb *HustlerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HustlerGroupBy) Strings

func (hgb *HustlerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*HustlerGroupBy) StringsX

func (hgb *HustlerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HustlerMutation

type HustlerMutation struct {
	// contains filtered or unexported fields
}

HustlerMutation represents an operation that mutates the Hustler nodes in the graph.

func (*HustlerMutation) AccessoryCleared

func (m *HustlerMutation) AccessoryCleared() bool

AccessoryCleared reports if the "accessory" edge to the Item entity was cleared.

func (*HustlerMutation) AccessoryID

func (m *HustlerMutation) AccessoryID() (id string, exists bool)

AccessoryID returns the "accessory" edge ID in the mutation.

func (*HustlerMutation) AccessoryIDs

func (m *HustlerMutation) AccessoryIDs() (ids []string)

AccessoryIDs returns the "accessory" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccessoryID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) AddAge

func (m *HustlerMutation) AddAge(u int64)

AddAge adds u to the "age" field.

func (*HustlerMutation) AddField

func (m *HustlerMutation) 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 (*HustlerMutation) AddedAge

func (m *HustlerMutation) AddedAge() (r int64, exists bool)

AddedAge returns the value that was added to the "age" field in this mutation.

func (*HustlerMutation) AddedEdges

func (m *HustlerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*HustlerMutation) AddedField

func (m *HustlerMutation) 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 (*HustlerMutation) AddedFields

func (m *HustlerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*HustlerMutation) AddedIDs

func (m *HustlerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*HustlerMutation) Age

func (m *HustlerMutation) Age() (r uint64, exists bool)

Age returns the value of the "age" field in the mutation.

func (*HustlerMutation) Background

func (m *HustlerMutation) Background() (r string, exists bool)

Background returns the value of the "background" field in the mutation.

func (*HustlerMutation) BackgroundCleared

func (m *HustlerMutation) BackgroundCleared() bool

BackgroundCleared returns if the "background" field was cleared in this mutation.

func (*HustlerMutation) BeardCleared

func (m *HustlerMutation) BeardCleared() bool

BeardCleared reports if the "beard" edge to the BodyPart entity was cleared.

func (*HustlerMutation) BeardID

func (m *HustlerMutation) BeardID() (id string, exists bool)

BeardID returns the "beard" edge ID in the mutation.

func (*HustlerMutation) BeardIDs

func (m *HustlerMutation) BeardIDs() (ids []string)

BeardIDs returns the "beard" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BeardID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) BodyCleared

func (m *HustlerMutation) BodyCleared() bool

BodyCleared reports if the "body" edge to the BodyPart entity was cleared.

func (*HustlerMutation) BodyID

func (m *HustlerMutation) BodyID() (id string, exists bool)

BodyID returns the "body" edge ID in the mutation.

func (*HustlerMutation) BodyIDs

func (m *HustlerMutation) BodyIDs() (ids []string)

BodyIDs returns the "body" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BodyID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) ClearAccessory

func (m *HustlerMutation) ClearAccessory()

ClearAccessory clears the "accessory" edge to the Item entity.

func (*HustlerMutation) ClearBackground

func (m *HustlerMutation) ClearBackground()

ClearBackground clears the value of the "background" field.

func (*HustlerMutation) ClearBeard

func (m *HustlerMutation) ClearBeard()

ClearBeard clears the "beard" edge to the BodyPart entity.

func (*HustlerMutation) ClearBody

func (m *HustlerMutation) ClearBody()

ClearBody clears the "body" edge to the BodyPart entity.

func (*HustlerMutation) ClearClothes

func (m *HustlerMutation) ClearClothes()

ClearClothes clears the "clothes" edge to the Item entity.

func (*HustlerMutation) ClearColor

func (m *HustlerMutation) ClearColor()

ClearColor clears the value of the "color" field.

func (*HustlerMutation) ClearDrug

func (m *HustlerMutation) ClearDrug()

ClearDrug clears the "drug" edge to the Item entity.

func (*HustlerMutation) ClearEdge

func (m *HustlerMutation) 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 (*HustlerMutation) ClearField

func (m *HustlerMutation) 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 (*HustlerMutation) ClearFoot

func (m *HustlerMutation) ClearFoot()

ClearFoot clears the "foot" edge to the Item entity.

func (*HustlerMutation) ClearHair

func (m *HustlerMutation) ClearHair()

ClearHair clears the "hair" edge to the BodyPart entity.

func (*HustlerMutation) ClearHand

func (m *HustlerMutation) ClearHand()

ClearHand clears the "hand" edge to the Item entity.

func (*HustlerMutation) ClearIndex

func (m *HustlerMutation) ClearIndex()

ClearIndex clears the "index" edge to the Search entity.

func (*HustlerMutation) ClearName

func (m *HustlerMutation) ClearName()

ClearName clears the value of the "name" field.

func (*HustlerMutation) ClearNeck

func (m *HustlerMutation) ClearNeck()

ClearNeck clears the "neck" edge to the Item entity.

func (*HustlerMutation) ClearRing

func (m *HustlerMutation) ClearRing()

ClearRing clears the "ring" edge to the Item entity.

func (*HustlerMutation) ClearSvg

func (m *HustlerMutation) ClearSvg()

ClearSvg clears the value of the "svg" field.

func (*HustlerMutation) ClearTitle

func (m *HustlerMutation) ClearTitle()

ClearTitle clears the value of the "title" field.

func (*HustlerMutation) ClearVehicle

func (m *HustlerMutation) ClearVehicle()

ClearVehicle clears the "vehicle" edge to the Item entity.

func (*HustlerMutation) ClearWaist

func (m *HustlerMutation) ClearWaist()

ClearWaist clears the "waist" edge to the Item entity.

func (*HustlerMutation) ClearWallet

func (m *HustlerMutation) ClearWallet()

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*HustlerMutation) ClearWeapon

func (m *HustlerMutation) ClearWeapon()

ClearWeapon clears the "weapon" edge to the Item entity.

func (*HustlerMutation) ClearedEdges

func (m *HustlerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*HustlerMutation) ClearedFields

func (m *HustlerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (HustlerMutation) Client

func (m HustlerMutation) 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 (*HustlerMutation) ClothesCleared

func (m *HustlerMutation) ClothesCleared() bool

ClothesCleared reports if the "clothes" edge to the Item entity was cleared.

func (*HustlerMutation) ClothesID

func (m *HustlerMutation) ClothesID() (id string, exists bool)

ClothesID returns the "clothes" edge ID in the mutation.

func (*HustlerMutation) ClothesIDs

func (m *HustlerMutation) ClothesIDs() (ids []string)

ClothesIDs returns the "clothes" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ClothesID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) Color

func (m *HustlerMutation) Color() (r string, exists bool)

Color returns the value of the "color" field in the mutation.

func (*HustlerMutation) ColorCleared

func (m *HustlerMutation) ColorCleared() bool

ColorCleared returns if the "color" field was cleared in this mutation.

func (*HustlerMutation) CreatedAt

func (m *HustlerMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*HustlerMutation) DrugCleared

func (m *HustlerMutation) DrugCleared() bool

DrugCleared reports if the "drug" edge to the Item entity was cleared.

func (*HustlerMutation) DrugID

func (m *HustlerMutation) DrugID() (id string, exists bool)

DrugID returns the "drug" edge ID in the mutation.

func (*HustlerMutation) DrugIDs

func (m *HustlerMutation) DrugIDs() (ids []string)

DrugIDs returns the "drug" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DrugID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) EdgeCleared

func (m *HustlerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*HustlerMutation) Field

func (m *HustlerMutation) 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 (*HustlerMutation) FieldCleared

func (m *HustlerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*HustlerMutation) Fields

func (m *HustlerMutation) 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 (*HustlerMutation) FootCleared

func (m *HustlerMutation) FootCleared() bool

FootCleared reports if the "foot" edge to the Item entity was cleared.

func (*HustlerMutation) FootID

func (m *HustlerMutation) FootID() (id string, exists bool)

FootID returns the "foot" edge ID in the mutation.

func (*HustlerMutation) FootIDs

func (m *HustlerMutation) FootIDs() (ids []string)

FootIDs returns the "foot" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FootID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) GetType

func (m *HustlerMutation) GetType() (r hustler.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*HustlerMutation) HairCleared

func (m *HustlerMutation) HairCleared() bool

HairCleared reports if the "hair" edge to the BodyPart entity was cleared.

func (*HustlerMutation) HairID

func (m *HustlerMutation) HairID() (id string, exists bool)

HairID returns the "hair" edge ID in the mutation.

func (*HustlerMutation) HairIDs

func (m *HustlerMutation) HairIDs() (ids []string)

HairIDs returns the "hair" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HairID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) HandCleared

func (m *HustlerMutation) HandCleared() bool

HandCleared reports if the "hand" edge to the Item entity was cleared.

func (*HustlerMutation) HandID

func (m *HustlerMutation) HandID() (id string, exists bool)

HandID returns the "hand" edge ID in the mutation.

func (*HustlerMutation) HandIDs

func (m *HustlerMutation) HandIDs() (ids []string)

HandIDs returns the "hand" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HandID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) ID

func (m *HustlerMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*HustlerMutation) IDs

func (m *HustlerMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*HustlerMutation) IndexCleared

func (m *HustlerMutation) IndexCleared() bool

IndexCleared reports if the "index" edge to the Search entity was cleared.

func (*HustlerMutation) IndexID

func (m *HustlerMutation) IndexID() (id string, exists bool)

IndexID returns the "index" edge ID in the mutation.

func (*HustlerMutation) IndexIDs

func (m *HustlerMutation) IndexIDs() (ids []string)

IndexIDs returns the "index" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IndexID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) Name

func (m *HustlerMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*HustlerMutation) NameCleared

func (m *HustlerMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*HustlerMutation) NeckCleared

func (m *HustlerMutation) NeckCleared() bool

NeckCleared reports if the "neck" edge to the Item entity was cleared.

func (*HustlerMutation) NeckID

func (m *HustlerMutation) NeckID() (id string, exists bool)

NeckID returns the "neck" edge ID in the mutation.

func (*HustlerMutation) NeckIDs

func (m *HustlerMutation) NeckIDs() (ids []string)

NeckIDs returns the "neck" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NeckID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) OldAge

func (m *HustlerMutation) OldAge(ctx context.Context) (v uint64, err error)

OldAge returns the old "age" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldBackground

func (m *HustlerMutation) OldBackground(ctx context.Context) (v string, err error)

OldBackground returns the old "background" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldColor

func (m *HustlerMutation) OldColor(ctx context.Context) (v string, err error)

OldColor returns the old "color" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldCreatedAt

func (m *HustlerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldField

func (m *HustlerMutation) 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 (*HustlerMutation) OldName

func (m *HustlerMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldOrder

func (m *HustlerMutation) OldOrder(ctx context.Context) (v []int, err error)

OldOrder returns the old "order" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldSex

func (m *HustlerMutation) OldSex(ctx context.Context) (v hustler.Sex, err error)

OldSex returns the old "sex" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldSvg

func (m *HustlerMutation) OldSvg(ctx context.Context) (v string, err error)

OldSvg returns the old "svg" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldTitle

func (m *HustlerMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldType

func (m *HustlerMutation) OldType(ctx context.Context) (v hustler.Type, err error)

OldType returns the old "type" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) OldViewbox

func (m *HustlerMutation) OldViewbox(ctx context.Context) (v []int, err error)

OldViewbox returns the old "viewbox" field's value of the Hustler entity. If the Hustler 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 (*HustlerMutation) Op

func (m *HustlerMutation) Op() Op

Op returns the operation name.

func (*HustlerMutation) Order

func (m *HustlerMutation) Order() (r []int, exists bool)

Order returns the value of the "order" field in the mutation.

func (*HustlerMutation) RemovedEdges

func (m *HustlerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*HustlerMutation) RemovedIDs

func (m *HustlerMutation) 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 (*HustlerMutation) ResetAccessory

func (m *HustlerMutation) ResetAccessory()

ResetAccessory resets all changes to the "accessory" edge.

func (*HustlerMutation) ResetAge

func (m *HustlerMutation) ResetAge()

ResetAge resets all changes to the "age" field.

func (*HustlerMutation) ResetBackground

func (m *HustlerMutation) ResetBackground()

ResetBackground resets all changes to the "background" field.

func (*HustlerMutation) ResetBeard

func (m *HustlerMutation) ResetBeard()

ResetBeard resets all changes to the "beard" edge.

func (*HustlerMutation) ResetBody

func (m *HustlerMutation) ResetBody()

ResetBody resets all changes to the "body" edge.

func (*HustlerMutation) ResetClothes

func (m *HustlerMutation) ResetClothes()

ResetClothes resets all changes to the "clothes" edge.

func (*HustlerMutation) ResetColor

func (m *HustlerMutation) ResetColor()

ResetColor resets all changes to the "color" field.

func (*HustlerMutation) ResetCreatedAt

func (m *HustlerMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*HustlerMutation) ResetDrug

func (m *HustlerMutation) ResetDrug()

ResetDrug resets all changes to the "drug" edge.

func (*HustlerMutation) ResetEdge

func (m *HustlerMutation) 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 (*HustlerMutation) ResetField

func (m *HustlerMutation) 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 (*HustlerMutation) ResetFoot

func (m *HustlerMutation) ResetFoot()

ResetFoot resets all changes to the "foot" edge.

func (*HustlerMutation) ResetHair

func (m *HustlerMutation) ResetHair()

ResetHair resets all changes to the "hair" edge.

func (*HustlerMutation) ResetHand

func (m *HustlerMutation) ResetHand()

ResetHand resets all changes to the "hand" edge.

func (*HustlerMutation) ResetIndex

func (m *HustlerMutation) ResetIndex()

ResetIndex resets all changes to the "index" edge.

func (*HustlerMutation) ResetName

func (m *HustlerMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*HustlerMutation) ResetNeck

func (m *HustlerMutation) ResetNeck()

ResetNeck resets all changes to the "neck" edge.

func (*HustlerMutation) ResetOrder

func (m *HustlerMutation) ResetOrder()

ResetOrder resets all changes to the "order" field.

func (*HustlerMutation) ResetRing

func (m *HustlerMutation) ResetRing()

ResetRing resets all changes to the "ring" edge.

func (*HustlerMutation) ResetSex

func (m *HustlerMutation) ResetSex()

ResetSex resets all changes to the "sex" field.

func (*HustlerMutation) ResetSvg

func (m *HustlerMutation) ResetSvg()

ResetSvg resets all changes to the "svg" field.

func (*HustlerMutation) ResetTitle

func (m *HustlerMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*HustlerMutation) ResetType

func (m *HustlerMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*HustlerMutation) ResetVehicle

func (m *HustlerMutation) ResetVehicle()

ResetVehicle resets all changes to the "vehicle" edge.

func (*HustlerMutation) ResetViewbox

func (m *HustlerMutation) ResetViewbox()

ResetViewbox resets all changes to the "viewbox" field.

func (*HustlerMutation) ResetWaist

func (m *HustlerMutation) ResetWaist()

ResetWaist resets all changes to the "waist" edge.

func (*HustlerMutation) ResetWallet

func (m *HustlerMutation) ResetWallet()

ResetWallet resets all changes to the "wallet" edge.

func (*HustlerMutation) ResetWeapon

func (m *HustlerMutation) ResetWeapon()

ResetWeapon resets all changes to the "weapon" edge.

func (*HustlerMutation) RingCleared

func (m *HustlerMutation) RingCleared() bool

RingCleared reports if the "ring" edge to the Item entity was cleared.

func (*HustlerMutation) RingID

func (m *HustlerMutation) RingID() (id string, exists bool)

RingID returns the "ring" edge ID in the mutation.

func (*HustlerMutation) RingIDs

func (m *HustlerMutation) RingIDs() (ids []string)

RingIDs returns the "ring" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RingID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) SetAccessoryID

func (m *HustlerMutation) SetAccessoryID(id string)

SetAccessoryID sets the "accessory" edge to the Item entity by id.

func (*HustlerMutation) SetAge

func (m *HustlerMutation) SetAge(u uint64)

SetAge sets the "age" field.

func (*HustlerMutation) SetBackground

func (m *HustlerMutation) SetBackground(s string)

SetBackground sets the "background" field.

func (*HustlerMutation) SetBeardID

func (m *HustlerMutation) SetBeardID(id string)

SetBeardID sets the "beard" edge to the BodyPart entity by id.

func (*HustlerMutation) SetBodyID

func (m *HustlerMutation) SetBodyID(id string)

SetBodyID sets the "body" edge to the BodyPart entity by id.

func (*HustlerMutation) SetClothesID

func (m *HustlerMutation) SetClothesID(id string)

SetClothesID sets the "clothes" edge to the Item entity by id.

func (*HustlerMutation) SetColor

func (m *HustlerMutation) SetColor(s string)

SetColor sets the "color" field.

func (*HustlerMutation) SetCreatedAt

func (m *HustlerMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*HustlerMutation) SetDrugID

func (m *HustlerMutation) SetDrugID(id string)

SetDrugID sets the "drug" edge to the Item entity by id.

func (*HustlerMutation) SetField

func (m *HustlerMutation) 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 (*HustlerMutation) SetFootID

func (m *HustlerMutation) SetFootID(id string)

SetFootID sets the "foot" edge to the Item entity by id.

func (*HustlerMutation) SetHairID

func (m *HustlerMutation) SetHairID(id string)

SetHairID sets the "hair" edge to the BodyPart entity by id.

func (*HustlerMutation) SetHandID

func (m *HustlerMutation) SetHandID(id string)

SetHandID sets the "hand" edge to the Item entity by id.

func (*HustlerMutation) SetID

func (m *HustlerMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Hustler entities.

func (*HustlerMutation) SetIndexID

func (m *HustlerMutation) SetIndexID(id string)

SetIndexID sets the "index" edge to the Search entity by id.

func (*HustlerMutation) SetName

func (m *HustlerMutation) SetName(s string)

SetName sets the "name" field.

func (*HustlerMutation) SetNeckID

func (m *HustlerMutation) SetNeckID(id string)

SetNeckID sets the "neck" edge to the Item entity by id.

func (*HustlerMutation) SetOrder

func (m *HustlerMutation) SetOrder(i []int)

SetOrder sets the "order" field.

func (*HustlerMutation) SetRingID

func (m *HustlerMutation) SetRingID(id string)

SetRingID sets the "ring" edge to the Item entity by id.

func (*HustlerMutation) SetSex

func (m *HustlerMutation) SetSex(h hustler.Sex)

SetSex sets the "sex" field.

func (*HustlerMutation) SetSvg

func (m *HustlerMutation) SetSvg(s string)

SetSvg sets the "svg" field.

func (*HustlerMutation) SetTitle

func (m *HustlerMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*HustlerMutation) SetType

func (m *HustlerMutation) SetType(h hustler.Type)

SetType sets the "type" field.

func (*HustlerMutation) SetVehicleID

func (m *HustlerMutation) SetVehicleID(id string)

SetVehicleID sets the "vehicle" edge to the Item entity by id.

func (*HustlerMutation) SetViewbox

func (m *HustlerMutation) SetViewbox(i []int)

SetViewbox sets the "viewbox" field.

func (*HustlerMutation) SetWaistID

func (m *HustlerMutation) SetWaistID(id string)

SetWaistID sets the "waist" edge to the Item entity by id.

func (*HustlerMutation) SetWalletID

func (m *HustlerMutation) SetWalletID(id string)

SetWalletID sets the "wallet" edge to the Wallet entity by id.

func (*HustlerMutation) SetWeaponID

func (m *HustlerMutation) SetWeaponID(id string)

SetWeaponID sets the "weapon" edge to the Item entity by id.

func (*HustlerMutation) Sex

func (m *HustlerMutation) Sex() (r hustler.Sex, exists bool)

Sex returns the value of the "sex" field in the mutation.

func (*HustlerMutation) Svg

func (m *HustlerMutation) Svg() (r string, exists bool)

Svg returns the value of the "svg" field in the mutation.

func (*HustlerMutation) SvgCleared

func (m *HustlerMutation) SvgCleared() bool

SvgCleared returns if the "svg" field was cleared in this mutation.

func (*HustlerMutation) Title

func (m *HustlerMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (*HustlerMutation) TitleCleared

func (m *HustlerMutation) TitleCleared() bool

TitleCleared returns if the "title" field was cleared in this mutation.

func (HustlerMutation) Tx

func (m HustlerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*HustlerMutation) Type

func (m *HustlerMutation) Type() string

Type returns the node type of this mutation (Hustler).

func (*HustlerMutation) VehicleCleared

func (m *HustlerMutation) VehicleCleared() bool

VehicleCleared reports if the "vehicle" edge to the Item entity was cleared.

func (*HustlerMutation) VehicleID

func (m *HustlerMutation) VehicleID() (id string, exists bool)

VehicleID returns the "vehicle" edge ID in the mutation.

func (*HustlerMutation) VehicleIDs

func (m *HustlerMutation) VehicleIDs() (ids []string)

VehicleIDs returns the "vehicle" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VehicleID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) Viewbox

func (m *HustlerMutation) Viewbox() (r []int, exists bool)

Viewbox returns the value of the "viewbox" field in the mutation.

func (*HustlerMutation) WaistCleared

func (m *HustlerMutation) WaistCleared() bool

WaistCleared reports if the "waist" edge to the Item entity was cleared.

func (*HustlerMutation) WaistID

func (m *HustlerMutation) WaistID() (id string, exists bool)

WaistID returns the "waist" edge ID in the mutation.

func (*HustlerMutation) WaistIDs

func (m *HustlerMutation) WaistIDs() (ids []string)

WaistIDs returns the "waist" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WaistID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) WalletCleared

func (m *HustlerMutation) WalletCleared() bool

WalletCleared reports if the "wallet" edge to the Wallet entity was cleared.

func (*HustlerMutation) WalletID

func (m *HustlerMutation) WalletID() (id string, exists bool)

WalletID returns the "wallet" edge ID in the mutation.

func (*HustlerMutation) WalletIDs

func (m *HustlerMutation) WalletIDs() (ids []string)

WalletIDs returns the "wallet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WalletID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) WeaponCleared

func (m *HustlerMutation) WeaponCleared() bool

WeaponCleared reports if the "weapon" edge to the Item entity was cleared.

func (*HustlerMutation) WeaponID

func (m *HustlerMutation) WeaponID() (id string, exists bool)

WeaponID returns the "weapon" edge ID in the mutation.

func (*HustlerMutation) WeaponIDs

func (m *HustlerMutation) WeaponIDs() (ids []string)

WeaponIDs returns the "weapon" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WeaponID instead. It exists only for internal usage by the builders.

func (*HustlerMutation) Where

func (m *HustlerMutation) Where(ps ...predicate.Hustler)

Where appends a list predicates to the HustlerMutation builder.

type HustlerOrder

type HustlerOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *HustlerOrderField `json:"field"`
}

HustlerOrder defines the ordering of Hustler.

type HustlerOrderField

type HustlerOrderField struct {
	// contains filtered or unexported fields
}

HustlerOrderField defines the ordering field of Hustler.

func (HustlerOrderField) MarshalGQL

func (f HustlerOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (HustlerOrderField) String

func (f HustlerOrderField) String() string

String implement fmt.Stringer interface.

func (*HustlerOrderField) UnmarshalGQL

func (f *HustlerOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type HustlerPaginateOption

type HustlerPaginateOption func(*hustlerPager) error

HustlerPaginateOption enables pagination customization.

func WithHustlerFilter

func WithHustlerFilter(filter func(*HustlerQuery) (*HustlerQuery, error)) HustlerPaginateOption

WithHustlerFilter configures pagination filter.

func WithHustlerOrder

func WithHustlerOrder(order *HustlerOrder) HustlerPaginateOption

WithHustlerOrder configures pagination ordering.

type HustlerQuery

type HustlerQuery struct {
	// contains filtered or unexported fields
}

HustlerQuery is the builder for querying Hustler entities.

func (*HustlerQuery) All

func (hq *HustlerQuery) All(ctx context.Context) ([]*Hustler, error)

All executes the query and returns a list of Hustlers.

func (*HustlerQuery) AllX

func (hq *HustlerQuery) AllX(ctx context.Context) []*Hustler

AllX is like All, but panics if an error occurs.

func (*HustlerQuery) Clone

func (hq *HustlerQuery) Clone() *HustlerQuery

Clone returns a duplicate of the HustlerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*HustlerQuery) CollectFields

func (h *HustlerQuery) CollectFields(ctx context.Context, satisfies ...string) *HustlerQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*HustlerQuery) Count

func (hq *HustlerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*HustlerQuery) CountX

func (hq *HustlerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*HustlerQuery) Exist

func (hq *HustlerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*HustlerQuery) ExistX

func (hq *HustlerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*HustlerQuery) First

func (hq *HustlerQuery) First(ctx context.Context) (*Hustler, error)

First returns the first Hustler entity from the query. Returns a *NotFoundError when no Hustler was found.

func (*HustlerQuery) FirstID

func (hq *HustlerQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Hustler ID from the query. Returns a *NotFoundError when no Hustler ID was found.

func (*HustlerQuery) FirstIDX

func (hq *HustlerQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*HustlerQuery) FirstX

func (hq *HustlerQuery) FirstX(ctx context.Context) *Hustler

FirstX is like First, but panics if an error occurs.

func (*HustlerQuery) GroupBy

func (hq *HustlerQuery) GroupBy(field string, fields ...string) *HustlerGroupBy

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 {
	Type hustler.Type `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Hustler.Query().
	GroupBy(hustler.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*HustlerQuery) IDs

func (hq *HustlerQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Hustler IDs.

func (*HustlerQuery) IDsX

func (hq *HustlerQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*HustlerQuery) Limit

func (hq *HustlerQuery) Limit(limit int) *HustlerQuery

Limit adds a limit step to the query.

func (*HustlerQuery) Offset

func (hq *HustlerQuery) Offset(offset int) *HustlerQuery

Offset adds an offset step to the query.

func (*HustlerQuery) Only

func (hq *HustlerQuery) Only(ctx context.Context) (*Hustler, error)

Only returns a single Hustler entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Hustler entity is found. Returns a *NotFoundError when no Hustler entities are found.

func (*HustlerQuery) OnlyID

func (hq *HustlerQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Hustler ID in the query. Returns a *NotSingularError when more than one Hustler ID is found. Returns a *NotFoundError when no entities are found.

func (*HustlerQuery) OnlyIDX

func (hq *HustlerQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*HustlerQuery) OnlyX

func (hq *HustlerQuery) OnlyX(ctx context.Context) *Hustler

OnlyX is like Only, but panics if an error occurs.

func (*HustlerQuery) Order

func (hq *HustlerQuery) Order(o ...OrderFunc) *HustlerQuery

Order adds an order step to the query.

func (*HustlerQuery) Paginate

func (h *HustlerQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...HustlerPaginateOption,
) (*HustlerConnection, error)

Paginate executes the query and returns a relay based cursor connection to Hustler.

func (*HustlerQuery) QueryAccessory

func (hq *HustlerQuery) QueryAccessory() *ItemQuery

QueryAccessory chains the current query on the "accessory" edge.

func (*HustlerQuery) QueryBeard

func (hq *HustlerQuery) QueryBeard() *BodyPartQuery

QueryBeard chains the current query on the "beard" edge.

func (*HustlerQuery) QueryBody

func (hq *HustlerQuery) QueryBody() *BodyPartQuery

QueryBody chains the current query on the "body" edge.

func (*HustlerQuery) QueryClothes

func (hq *HustlerQuery) QueryClothes() *ItemQuery

QueryClothes chains the current query on the "clothes" edge.

func (*HustlerQuery) QueryDrug

func (hq *HustlerQuery) QueryDrug() *ItemQuery

QueryDrug chains the current query on the "drug" edge.

func (*HustlerQuery) QueryFoot

func (hq *HustlerQuery) QueryFoot() *ItemQuery

QueryFoot chains the current query on the "foot" edge.

func (*HustlerQuery) QueryHair

func (hq *HustlerQuery) QueryHair() *BodyPartQuery

QueryHair chains the current query on the "hair" edge.

func (*HustlerQuery) QueryHand

func (hq *HustlerQuery) QueryHand() *ItemQuery

QueryHand chains the current query on the "hand" edge.

func (*HustlerQuery) QueryIndex

func (hq *HustlerQuery) QueryIndex() *SearchQuery

QueryIndex chains the current query on the "index" edge.

func (*HustlerQuery) QueryNeck

func (hq *HustlerQuery) QueryNeck() *ItemQuery

QueryNeck chains the current query on the "neck" edge.

func (*HustlerQuery) QueryRing

func (hq *HustlerQuery) QueryRing() *ItemQuery

QueryRing chains the current query on the "ring" edge.

func (*HustlerQuery) QueryVehicle

func (hq *HustlerQuery) QueryVehicle() *ItemQuery

QueryVehicle chains the current query on the "vehicle" edge.

func (*HustlerQuery) QueryWaist

func (hq *HustlerQuery) QueryWaist() *ItemQuery

QueryWaist chains the current query on the "waist" edge.

func (*HustlerQuery) QueryWallet

func (hq *HustlerQuery) QueryWallet() *WalletQuery

QueryWallet chains the current query on the "wallet" edge.

func (*HustlerQuery) QueryWeapon

func (hq *HustlerQuery) QueryWeapon() *ItemQuery

QueryWeapon chains the current query on the "weapon" edge.

func (*HustlerQuery) Select

func (hq *HustlerQuery) Select(fields ...string) *HustlerSelect

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 {
	Type hustler.Type `json:"type,omitempty"`
}

client.Hustler.Query().
	Select(hustler.FieldType).
	Scan(ctx, &v)

func (*HustlerQuery) Unique

func (hq *HustlerQuery) Unique(unique bool) *HustlerQuery

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 (*HustlerQuery) Where

func (hq *HustlerQuery) Where(ps ...predicate.Hustler) *HustlerQuery

Where adds a new predicate for the HustlerQuery builder.

func (*HustlerQuery) WithAccessory

func (hq *HustlerQuery) WithAccessory(opts ...func(*ItemQuery)) *HustlerQuery

WithAccessory tells the query-builder to eager-load the nodes that are connected to the "accessory" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithBeard

func (hq *HustlerQuery) WithBeard(opts ...func(*BodyPartQuery)) *HustlerQuery

WithBeard tells the query-builder to eager-load the nodes that are connected to the "beard" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithBody

func (hq *HustlerQuery) WithBody(opts ...func(*BodyPartQuery)) *HustlerQuery

WithBody tells the query-builder to eager-load the nodes that are connected to the "body" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithClothes

func (hq *HustlerQuery) WithClothes(opts ...func(*ItemQuery)) *HustlerQuery

WithClothes tells the query-builder to eager-load the nodes that are connected to the "clothes" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithDrug

func (hq *HustlerQuery) WithDrug(opts ...func(*ItemQuery)) *HustlerQuery

WithDrug tells the query-builder to eager-load the nodes that are connected to the "drug" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithFoot

func (hq *HustlerQuery) WithFoot(opts ...func(*ItemQuery)) *HustlerQuery

WithFoot tells the query-builder to eager-load the nodes that are connected to the "foot" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithHair

func (hq *HustlerQuery) WithHair(opts ...func(*BodyPartQuery)) *HustlerQuery

WithHair tells the query-builder to eager-load the nodes that are connected to the "hair" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithHand

func (hq *HustlerQuery) WithHand(opts ...func(*ItemQuery)) *HustlerQuery

WithHand tells the query-builder to eager-load the nodes that are connected to the "hand" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithIndex

func (hq *HustlerQuery) WithIndex(opts ...func(*SearchQuery)) *HustlerQuery

WithIndex tells the query-builder to eager-load the nodes that are connected to the "index" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithNeck

func (hq *HustlerQuery) WithNeck(opts ...func(*ItemQuery)) *HustlerQuery

WithNeck tells the query-builder to eager-load the nodes that are connected to the "neck" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithRing

func (hq *HustlerQuery) WithRing(opts ...func(*ItemQuery)) *HustlerQuery

WithRing tells the query-builder to eager-load the nodes that are connected to the "ring" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithVehicle

func (hq *HustlerQuery) WithVehicle(opts ...func(*ItemQuery)) *HustlerQuery

WithVehicle tells the query-builder to eager-load the nodes that are connected to the "vehicle" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithWaist

func (hq *HustlerQuery) WithWaist(opts ...func(*ItemQuery)) *HustlerQuery

WithWaist tells the query-builder to eager-load the nodes that are connected to the "waist" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithWallet

func (hq *HustlerQuery) WithWallet(opts ...func(*WalletQuery)) *HustlerQuery

WithWallet tells the query-builder to eager-load the nodes that are connected to the "wallet" edge. The optional arguments are used to configure the query builder of the edge.

func (*HustlerQuery) WithWeapon

func (hq *HustlerQuery) WithWeapon(opts ...func(*ItemQuery)) *HustlerQuery

WithWeapon tells the query-builder to eager-load the nodes that are connected to the "weapon" edge. The optional arguments are used to configure the query builder of the edge.

type HustlerSelect

type HustlerSelect struct {
	*HustlerQuery
	// contains filtered or unexported fields
}

HustlerSelect is the builder for selecting fields of Hustler entities.

func (*HustlerSelect) Bool

func (hs *HustlerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HustlerSelect) BoolX

func (hs *HustlerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HustlerSelect) Bools

func (hs *HustlerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HustlerSelect) BoolsX

func (hs *HustlerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HustlerSelect) Float64

func (hs *HustlerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HustlerSelect) Float64X

func (hs *HustlerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HustlerSelect) Float64s

func (hs *HustlerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HustlerSelect) Float64sX

func (hs *HustlerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HustlerSelect) Int

func (hs *HustlerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HustlerSelect) IntX

func (hs *HustlerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HustlerSelect) Ints

func (hs *HustlerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HustlerSelect) IntsX

func (hs *HustlerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HustlerSelect) Scan

func (hs *HustlerSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*HustlerSelect) ScanX

func (hs *HustlerSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*HustlerSelect) String

func (hs *HustlerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HustlerSelect) StringX

func (hs *HustlerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HustlerSelect) Strings

func (hs *HustlerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HustlerSelect) StringsX

func (hs *HustlerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HustlerUpdate

type HustlerUpdate struct {
	// contains filtered or unexported fields
}

HustlerUpdate is the builder for updating Hustler entities.

func (*HustlerUpdate) AddAge

func (hu *HustlerUpdate) AddAge(u int64) *HustlerUpdate

AddAge adds u to the "age" field.

func (*HustlerUpdate) ClearAccessory

func (hu *HustlerUpdate) ClearAccessory() *HustlerUpdate

ClearAccessory clears the "accessory" edge to the Item entity.

func (*HustlerUpdate) ClearBackground

func (hu *HustlerUpdate) ClearBackground() *HustlerUpdate

ClearBackground clears the value of the "background" field.

func (*HustlerUpdate) ClearBeard

func (hu *HustlerUpdate) ClearBeard() *HustlerUpdate

ClearBeard clears the "beard" edge to the BodyPart entity.

func (*HustlerUpdate) ClearBody

func (hu *HustlerUpdate) ClearBody() *HustlerUpdate

ClearBody clears the "body" edge to the BodyPart entity.

func (*HustlerUpdate) ClearClothes

func (hu *HustlerUpdate) ClearClothes() *HustlerUpdate

ClearClothes clears the "clothes" edge to the Item entity.

func (*HustlerUpdate) ClearColor

func (hu *HustlerUpdate) ClearColor() *HustlerUpdate

ClearColor clears the value of the "color" field.

func (*HustlerUpdate) ClearDrug

func (hu *HustlerUpdate) ClearDrug() *HustlerUpdate

ClearDrug clears the "drug" edge to the Item entity.

func (*HustlerUpdate) ClearFoot

func (hu *HustlerUpdate) ClearFoot() *HustlerUpdate

ClearFoot clears the "foot" edge to the Item entity.

func (*HustlerUpdate) ClearHair

func (hu *HustlerUpdate) ClearHair() *HustlerUpdate

ClearHair clears the "hair" edge to the BodyPart entity.

func (*HustlerUpdate) ClearHand

func (hu *HustlerUpdate) ClearHand() *HustlerUpdate

ClearHand clears the "hand" edge to the Item entity.

func (*HustlerUpdate) ClearIndex

func (hu *HustlerUpdate) ClearIndex() *HustlerUpdate

ClearIndex clears the "index" edge to the Search entity.

func (*HustlerUpdate) ClearName

func (hu *HustlerUpdate) ClearName() *HustlerUpdate

ClearName clears the value of the "name" field.

func (*HustlerUpdate) ClearNeck

func (hu *HustlerUpdate) ClearNeck() *HustlerUpdate

ClearNeck clears the "neck" edge to the Item entity.

func (*HustlerUpdate) ClearRing

func (hu *HustlerUpdate) ClearRing() *HustlerUpdate

ClearRing clears the "ring" edge to the Item entity.

func (*HustlerUpdate) ClearSvg

func (hu *HustlerUpdate) ClearSvg() *HustlerUpdate

ClearSvg clears the value of the "svg" field.

func (*HustlerUpdate) ClearTitle

func (hu *HustlerUpdate) ClearTitle() *HustlerUpdate

ClearTitle clears the value of the "title" field.

func (*HustlerUpdate) ClearVehicle

func (hu *HustlerUpdate) ClearVehicle() *HustlerUpdate

ClearVehicle clears the "vehicle" edge to the Item entity.

func (*HustlerUpdate) ClearWaist

func (hu *HustlerUpdate) ClearWaist() *HustlerUpdate

ClearWaist clears the "waist" edge to the Item entity.

func (*HustlerUpdate) ClearWallet

func (hu *HustlerUpdate) ClearWallet() *HustlerUpdate

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*HustlerUpdate) ClearWeapon

func (hu *HustlerUpdate) ClearWeapon() *HustlerUpdate

ClearWeapon clears the "weapon" edge to the Item entity.

func (*HustlerUpdate) Exec

func (hu *HustlerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*HustlerUpdate) ExecX

func (hu *HustlerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HustlerUpdate) Mutation

func (hu *HustlerUpdate) Mutation() *HustlerMutation

Mutation returns the HustlerMutation object of the builder.

func (*HustlerUpdate) Save

func (hu *HustlerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*HustlerUpdate) SaveX

func (hu *HustlerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*HustlerUpdate) SetAccessory

func (hu *HustlerUpdate) SetAccessory(i *Item) *HustlerUpdate

SetAccessory sets the "accessory" edge to the Item entity.

func (*HustlerUpdate) SetAccessoryID

func (hu *HustlerUpdate) SetAccessoryID(id string) *HustlerUpdate

SetAccessoryID sets the "accessory" edge to the Item entity by ID.

func (*HustlerUpdate) SetAge

func (hu *HustlerUpdate) SetAge(u uint64) *HustlerUpdate

SetAge sets the "age" field.

func (*HustlerUpdate) SetBackground

func (hu *HustlerUpdate) SetBackground(s string) *HustlerUpdate

SetBackground sets the "background" field.

func (*HustlerUpdate) SetBeard

func (hu *HustlerUpdate) SetBeard(b *BodyPart) *HustlerUpdate

SetBeard sets the "beard" edge to the BodyPart entity.

func (*HustlerUpdate) SetBeardID

func (hu *HustlerUpdate) SetBeardID(id string) *HustlerUpdate

SetBeardID sets the "beard" edge to the BodyPart entity by ID.

func (*HustlerUpdate) SetBody

func (hu *HustlerUpdate) SetBody(b *BodyPart) *HustlerUpdate

SetBody sets the "body" edge to the BodyPart entity.

func (*HustlerUpdate) SetBodyID

func (hu *HustlerUpdate) SetBodyID(id string) *HustlerUpdate

SetBodyID sets the "body" edge to the BodyPart entity by ID.

func (*HustlerUpdate) SetClothes

func (hu *HustlerUpdate) SetClothes(i *Item) *HustlerUpdate

SetClothes sets the "clothes" edge to the Item entity.

func (*HustlerUpdate) SetClothesID

func (hu *HustlerUpdate) SetClothesID(id string) *HustlerUpdate

SetClothesID sets the "clothes" edge to the Item entity by ID.

func (*HustlerUpdate) SetColor

func (hu *HustlerUpdate) SetColor(s string) *HustlerUpdate

SetColor sets the "color" field.

func (*HustlerUpdate) SetDrug

func (hu *HustlerUpdate) SetDrug(i *Item) *HustlerUpdate

SetDrug sets the "drug" edge to the Item entity.

func (*HustlerUpdate) SetDrugID

func (hu *HustlerUpdate) SetDrugID(id string) *HustlerUpdate

SetDrugID sets the "drug" edge to the Item entity by ID.

func (*HustlerUpdate) SetFoot

func (hu *HustlerUpdate) SetFoot(i *Item) *HustlerUpdate

SetFoot sets the "foot" edge to the Item entity.

func (*HustlerUpdate) SetFootID

func (hu *HustlerUpdate) SetFootID(id string) *HustlerUpdate

SetFootID sets the "foot" edge to the Item entity by ID.

func (*HustlerUpdate) SetHair

func (hu *HustlerUpdate) SetHair(b *BodyPart) *HustlerUpdate

SetHair sets the "hair" edge to the BodyPart entity.

func (*HustlerUpdate) SetHairID

func (hu *HustlerUpdate) SetHairID(id string) *HustlerUpdate

SetHairID sets the "hair" edge to the BodyPart entity by ID.

func (*HustlerUpdate) SetHand

func (hu *HustlerUpdate) SetHand(i *Item) *HustlerUpdate

SetHand sets the "hand" edge to the Item entity.

func (*HustlerUpdate) SetHandID

func (hu *HustlerUpdate) SetHandID(id string) *HustlerUpdate

SetHandID sets the "hand" edge to the Item entity by ID.

func (*HustlerUpdate) SetIndex

func (hu *HustlerUpdate) SetIndex(s *Search) *HustlerUpdate

SetIndex sets the "index" edge to the Search entity.

func (*HustlerUpdate) SetIndexID

func (hu *HustlerUpdate) SetIndexID(id string) *HustlerUpdate

SetIndexID sets the "index" edge to the Search entity by ID.

func (*HustlerUpdate) SetName

func (hu *HustlerUpdate) SetName(s string) *HustlerUpdate

SetName sets the "name" field.

func (*HustlerUpdate) SetNeck

func (hu *HustlerUpdate) SetNeck(i *Item) *HustlerUpdate

SetNeck sets the "neck" edge to the Item entity.

func (*HustlerUpdate) SetNeckID

func (hu *HustlerUpdate) SetNeckID(id string) *HustlerUpdate

SetNeckID sets the "neck" edge to the Item entity by ID.

func (*HustlerUpdate) SetNillableAccessoryID

func (hu *HustlerUpdate) SetNillableAccessoryID(id *string) *HustlerUpdate

SetNillableAccessoryID sets the "accessory" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableBackground

func (hu *HustlerUpdate) SetNillableBackground(s *string) *HustlerUpdate

SetNillableBackground sets the "background" field if the given value is not nil.

func (*HustlerUpdate) SetNillableBeardID

func (hu *HustlerUpdate) SetNillableBeardID(id *string) *HustlerUpdate

SetNillableBeardID sets the "beard" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableBodyID

func (hu *HustlerUpdate) SetNillableBodyID(id *string) *HustlerUpdate

SetNillableBodyID sets the "body" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableClothesID

func (hu *HustlerUpdate) SetNillableClothesID(id *string) *HustlerUpdate

SetNillableClothesID sets the "clothes" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableColor

func (hu *HustlerUpdate) SetNillableColor(s *string) *HustlerUpdate

SetNillableColor sets the "color" field if the given value is not nil.

func (*HustlerUpdate) SetNillableDrugID

func (hu *HustlerUpdate) SetNillableDrugID(id *string) *HustlerUpdate

SetNillableDrugID sets the "drug" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableFootID

func (hu *HustlerUpdate) SetNillableFootID(id *string) *HustlerUpdate

SetNillableFootID sets the "foot" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableHairID

func (hu *HustlerUpdate) SetNillableHairID(id *string) *HustlerUpdate

SetNillableHairID sets the "hair" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableHandID

func (hu *HustlerUpdate) SetNillableHandID(id *string) *HustlerUpdate

SetNillableHandID sets the "hand" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableIndexID

func (hu *HustlerUpdate) SetNillableIndexID(id *string) *HustlerUpdate

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableName

func (hu *HustlerUpdate) SetNillableName(s *string) *HustlerUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*HustlerUpdate) SetNillableNeckID

func (hu *HustlerUpdate) SetNillableNeckID(id *string) *HustlerUpdate

SetNillableNeckID sets the "neck" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableRingID

func (hu *HustlerUpdate) SetNillableRingID(id *string) *HustlerUpdate

SetNillableRingID sets the "ring" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableSex

func (hu *HustlerUpdate) SetNillableSex(h *hustler.Sex) *HustlerUpdate

SetNillableSex sets the "sex" field if the given value is not nil.

func (*HustlerUpdate) SetNillableSvg

func (hu *HustlerUpdate) SetNillableSvg(s *string) *HustlerUpdate

SetNillableSvg sets the "svg" field if the given value is not nil.

func (*HustlerUpdate) SetNillableTitle

func (hu *HustlerUpdate) SetNillableTitle(s *string) *HustlerUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*HustlerUpdate) SetNillableVehicleID

func (hu *HustlerUpdate) SetNillableVehicleID(id *string) *HustlerUpdate

SetNillableVehicleID sets the "vehicle" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableWaistID

func (hu *HustlerUpdate) SetNillableWaistID(id *string) *HustlerUpdate

SetNillableWaistID sets the "waist" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableWalletID

func (hu *HustlerUpdate) SetNillableWalletID(id *string) *HustlerUpdate

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*HustlerUpdate) SetNillableWeaponID

func (hu *HustlerUpdate) SetNillableWeaponID(id *string) *HustlerUpdate

SetNillableWeaponID sets the "weapon" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdate) SetOrder

func (hu *HustlerUpdate) SetOrder(i []int) *HustlerUpdate

SetOrder sets the "order" field.

func (*HustlerUpdate) SetRing

func (hu *HustlerUpdate) SetRing(i *Item) *HustlerUpdate

SetRing sets the "ring" edge to the Item entity.

func (*HustlerUpdate) SetRingID

func (hu *HustlerUpdate) SetRingID(id string) *HustlerUpdate

SetRingID sets the "ring" edge to the Item entity by ID.

func (*HustlerUpdate) SetSex

func (hu *HustlerUpdate) SetSex(h hustler.Sex) *HustlerUpdate

SetSex sets the "sex" field.

func (*HustlerUpdate) SetSvg

func (hu *HustlerUpdate) SetSvg(s string) *HustlerUpdate

SetSvg sets the "svg" field.

func (*HustlerUpdate) SetTitle

func (hu *HustlerUpdate) SetTitle(s string) *HustlerUpdate

SetTitle sets the "title" field.

func (*HustlerUpdate) SetVehicle

func (hu *HustlerUpdate) SetVehicle(i *Item) *HustlerUpdate

SetVehicle sets the "vehicle" edge to the Item entity.

func (*HustlerUpdate) SetVehicleID

func (hu *HustlerUpdate) SetVehicleID(id string) *HustlerUpdate

SetVehicleID sets the "vehicle" edge to the Item entity by ID.

func (*HustlerUpdate) SetViewbox

func (hu *HustlerUpdate) SetViewbox(i []int) *HustlerUpdate

SetViewbox sets the "viewbox" field.

func (*HustlerUpdate) SetWaist

func (hu *HustlerUpdate) SetWaist(i *Item) *HustlerUpdate

SetWaist sets the "waist" edge to the Item entity.

func (*HustlerUpdate) SetWaistID

func (hu *HustlerUpdate) SetWaistID(id string) *HustlerUpdate

SetWaistID sets the "waist" edge to the Item entity by ID.

func (*HustlerUpdate) SetWallet

func (hu *HustlerUpdate) SetWallet(w *Wallet) *HustlerUpdate

SetWallet sets the "wallet" edge to the Wallet entity.

func (*HustlerUpdate) SetWalletID

func (hu *HustlerUpdate) SetWalletID(id string) *HustlerUpdate

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

func (*HustlerUpdate) SetWeapon

func (hu *HustlerUpdate) SetWeapon(i *Item) *HustlerUpdate

SetWeapon sets the "weapon" edge to the Item entity.

func (*HustlerUpdate) SetWeaponID

func (hu *HustlerUpdate) SetWeaponID(id string) *HustlerUpdate

SetWeaponID sets the "weapon" edge to the Item entity by ID.

func (*HustlerUpdate) Where

func (hu *HustlerUpdate) Where(ps ...predicate.Hustler) *HustlerUpdate

Where appends a list predicates to the HustlerUpdate builder.

type HustlerUpdateOne

type HustlerUpdateOne struct {
	// contains filtered or unexported fields
}

HustlerUpdateOne is the builder for updating a single Hustler entity.

func (*HustlerUpdateOne) AddAge

func (huo *HustlerUpdateOne) AddAge(u int64) *HustlerUpdateOne

AddAge adds u to the "age" field.

func (*HustlerUpdateOne) ClearAccessory

func (huo *HustlerUpdateOne) ClearAccessory() *HustlerUpdateOne

ClearAccessory clears the "accessory" edge to the Item entity.

func (*HustlerUpdateOne) ClearBackground

func (huo *HustlerUpdateOne) ClearBackground() *HustlerUpdateOne

ClearBackground clears the value of the "background" field.

func (*HustlerUpdateOne) ClearBeard

func (huo *HustlerUpdateOne) ClearBeard() *HustlerUpdateOne

ClearBeard clears the "beard" edge to the BodyPart entity.

func (*HustlerUpdateOne) ClearBody

func (huo *HustlerUpdateOne) ClearBody() *HustlerUpdateOne

ClearBody clears the "body" edge to the BodyPart entity.

func (*HustlerUpdateOne) ClearClothes

func (huo *HustlerUpdateOne) ClearClothes() *HustlerUpdateOne

ClearClothes clears the "clothes" edge to the Item entity.

func (*HustlerUpdateOne) ClearColor

func (huo *HustlerUpdateOne) ClearColor() *HustlerUpdateOne

ClearColor clears the value of the "color" field.

func (*HustlerUpdateOne) ClearDrug

func (huo *HustlerUpdateOne) ClearDrug() *HustlerUpdateOne

ClearDrug clears the "drug" edge to the Item entity.

func (*HustlerUpdateOne) ClearFoot

func (huo *HustlerUpdateOne) ClearFoot() *HustlerUpdateOne

ClearFoot clears the "foot" edge to the Item entity.

func (*HustlerUpdateOne) ClearHair

func (huo *HustlerUpdateOne) ClearHair() *HustlerUpdateOne

ClearHair clears the "hair" edge to the BodyPart entity.

func (*HustlerUpdateOne) ClearHand

func (huo *HustlerUpdateOne) ClearHand() *HustlerUpdateOne

ClearHand clears the "hand" edge to the Item entity.

func (*HustlerUpdateOne) ClearIndex

func (huo *HustlerUpdateOne) ClearIndex() *HustlerUpdateOne

ClearIndex clears the "index" edge to the Search entity.

func (*HustlerUpdateOne) ClearName

func (huo *HustlerUpdateOne) ClearName() *HustlerUpdateOne

ClearName clears the value of the "name" field.

func (*HustlerUpdateOne) ClearNeck

func (huo *HustlerUpdateOne) ClearNeck() *HustlerUpdateOne

ClearNeck clears the "neck" edge to the Item entity.

func (*HustlerUpdateOne) ClearRing

func (huo *HustlerUpdateOne) ClearRing() *HustlerUpdateOne

ClearRing clears the "ring" edge to the Item entity.

func (*HustlerUpdateOne) ClearSvg

func (huo *HustlerUpdateOne) ClearSvg() *HustlerUpdateOne

ClearSvg clears the value of the "svg" field.

func (*HustlerUpdateOne) ClearTitle

func (huo *HustlerUpdateOne) ClearTitle() *HustlerUpdateOne

ClearTitle clears the value of the "title" field.

func (*HustlerUpdateOne) ClearVehicle

func (huo *HustlerUpdateOne) ClearVehicle() *HustlerUpdateOne

ClearVehicle clears the "vehicle" edge to the Item entity.

func (*HustlerUpdateOne) ClearWaist

func (huo *HustlerUpdateOne) ClearWaist() *HustlerUpdateOne

ClearWaist clears the "waist" edge to the Item entity.

func (*HustlerUpdateOne) ClearWallet

func (huo *HustlerUpdateOne) ClearWallet() *HustlerUpdateOne

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*HustlerUpdateOne) ClearWeapon

func (huo *HustlerUpdateOne) ClearWeapon() *HustlerUpdateOne

ClearWeapon clears the "weapon" edge to the Item entity.

func (*HustlerUpdateOne) Exec

func (huo *HustlerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*HustlerUpdateOne) ExecX

func (huo *HustlerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HustlerUpdateOne) Mutation

func (huo *HustlerUpdateOne) Mutation() *HustlerMutation

Mutation returns the HustlerMutation object of the builder.

func (*HustlerUpdateOne) Save

func (huo *HustlerUpdateOne) Save(ctx context.Context) (*Hustler, error)

Save executes the query and returns the updated Hustler entity.

func (*HustlerUpdateOne) SaveX

func (huo *HustlerUpdateOne) SaveX(ctx context.Context) *Hustler

SaveX is like Save, but panics if an error occurs.

func (*HustlerUpdateOne) Select

func (huo *HustlerUpdateOne) Select(field string, fields ...string) *HustlerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*HustlerUpdateOne) SetAccessory

func (huo *HustlerUpdateOne) SetAccessory(i *Item) *HustlerUpdateOne

SetAccessory sets the "accessory" edge to the Item entity.

func (*HustlerUpdateOne) SetAccessoryID

func (huo *HustlerUpdateOne) SetAccessoryID(id string) *HustlerUpdateOne

SetAccessoryID sets the "accessory" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetAge

func (huo *HustlerUpdateOne) SetAge(u uint64) *HustlerUpdateOne

SetAge sets the "age" field.

func (*HustlerUpdateOne) SetBackground

func (huo *HustlerUpdateOne) SetBackground(s string) *HustlerUpdateOne

SetBackground sets the "background" field.

func (*HustlerUpdateOne) SetBeard

func (huo *HustlerUpdateOne) SetBeard(b *BodyPart) *HustlerUpdateOne

SetBeard sets the "beard" edge to the BodyPart entity.

func (*HustlerUpdateOne) SetBeardID

func (huo *HustlerUpdateOne) SetBeardID(id string) *HustlerUpdateOne

SetBeardID sets the "beard" edge to the BodyPart entity by ID.

func (*HustlerUpdateOne) SetBody

func (huo *HustlerUpdateOne) SetBody(b *BodyPart) *HustlerUpdateOne

SetBody sets the "body" edge to the BodyPart entity.

func (*HustlerUpdateOne) SetBodyID

func (huo *HustlerUpdateOne) SetBodyID(id string) *HustlerUpdateOne

SetBodyID sets the "body" edge to the BodyPart entity by ID.

func (*HustlerUpdateOne) SetClothes

func (huo *HustlerUpdateOne) SetClothes(i *Item) *HustlerUpdateOne

SetClothes sets the "clothes" edge to the Item entity.

func (*HustlerUpdateOne) SetClothesID

func (huo *HustlerUpdateOne) SetClothesID(id string) *HustlerUpdateOne

SetClothesID sets the "clothes" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetColor

func (huo *HustlerUpdateOne) SetColor(s string) *HustlerUpdateOne

SetColor sets the "color" field.

func (*HustlerUpdateOne) SetDrug

func (huo *HustlerUpdateOne) SetDrug(i *Item) *HustlerUpdateOne

SetDrug sets the "drug" edge to the Item entity.

func (*HustlerUpdateOne) SetDrugID

func (huo *HustlerUpdateOne) SetDrugID(id string) *HustlerUpdateOne

SetDrugID sets the "drug" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetFoot

func (huo *HustlerUpdateOne) SetFoot(i *Item) *HustlerUpdateOne

SetFoot sets the "foot" edge to the Item entity.

func (*HustlerUpdateOne) SetFootID

func (huo *HustlerUpdateOne) SetFootID(id string) *HustlerUpdateOne

SetFootID sets the "foot" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetHair

func (huo *HustlerUpdateOne) SetHair(b *BodyPart) *HustlerUpdateOne

SetHair sets the "hair" edge to the BodyPart entity.

func (*HustlerUpdateOne) SetHairID

func (huo *HustlerUpdateOne) SetHairID(id string) *HustlerUpdateOne

SetHairID sets the "hair" edge to the BodyPart entity by ID.

func (*HustlerUpdateOne) SetHand

func (huo *HustlerUpdateOne) SetHand(i *Item) *HustlerUpdateOne

SetHand sets the "hand" edge to the Item entity.

func (*HustlerUpdateOne) SetHandID

func (huo *HustlerUpdateOne) SetHandID(id string) *HustlerUpdateOne

SetHandID sets the "hand" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetIndex

func (huo *HustlerUpdateOne) SetIndex(s *Search) *HustlerUpdateOne

SetIndex sets the "index" edge to the Search entity.

func (*HustlerUpdateOne) SetIndexID

func (huo *HustlerUpdateOne) SetIndexID(id string) *HustlerUpdateOne

SetIndexID sets the "index" edge to the Search entity by ID.

func (*HustlerUpdateOne) SetName

func (huo *HustlerUpdateOne) SetName(s string) *HustlerUpdateOne

SetName sets the "name" field.

func (*HustlerUpdateOne) SetNeck

func (huo *HustlerUpdateOne) SetNeck(i *Item) *HustlerUpdateOne

SetNeck sets the "neck" edge to the Item entity.

func (*HustlerUpdateOne) SetNeckID

func (huo *HustlerUpdateOne) SetNeckID(id string) *HustlerUpdateOne

SetNeckID sets the "neck" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetNillableAccessoryID

func (huo *HustlerUpdateOne) SetNillableAccessoryID(id *string) *HustlerUpdateOne

SetNillableAccessoryID sets the "accessory" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableBackground

func (huo *HustlerUpdateOne) SetNillableBackground(s *string) *HustlerUpdateOne

SetNillableBackground sets the "background" field if the given value is not nil.

func (*HustlerUpdateOne) SetNillableBeardID

func (huo *HustlerUpdateOne) SetNillableBeardID(id *string) *HustlerUpdateOne

SetNillableBeardID sets the "beard" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableBodyID

func (huo *HustlerUpdateOne) SetNillableBodyID(id *string) *HustlerUpdateOne

SetNillableBodyID sets the "body" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableClothesID

func (huo *HustlerUpdateOne) SetNillableClothesID(id *string) *HustlerUpdateOne

SetNillableClothesID sets the "clothes" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableColor

func (huo *HustlerUpdateOne) SetNillableColor(s *string) *HustlerUpdateOne

SetNillableColor sets the "color" field if the given value is not nil.

func (*HustlerUpdateOne) SetNillableDrugID

func (huo *HustlerUpdateOne) SetNillableDrugID(id *string) *HustlerUpdateOne

SetNillableDrugID sets the "drug" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableFootID

func (huo *HustlerUpdateOne) SetNillableFootID(id *string) *HustlerUpdateOne

SetNillableFootID sets the "foot" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableHairID

func (huo *HustlerUpdateOne) SetNillableHairID(id *string) *HustlerUpdateOne

SetNillableHairID sets the "hair" edge to the BodyPart entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableHandID

func (huo *HustlerUpdateOne) SetNillableHandID(id *string) *HustlerUpdateOne

SetNillableHandID sets the "hand" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableIndexID

func (huo *HustlerUpdateOne) SetNillableIndexID(id *string) *HustlerUpdateOne

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableName

func (huo *HustlerUpdateOne) SetNillableName(s *string) *HustlerUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*HustlerUpdateOne) SetNillableNeckID

func (huo *HustlerUpdateOne) SetNillableNeckID(id *string) *HustlerUpdateOne

SetNillableNeckID sets the "neck" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableRingID

func (huo *HustlerUpdateOne) SetNillableRingID(id *string) *HustlerUpdateOne

SetNillableRingID sets the "ring" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableSex

func (huo *HustlerUpdateOne) SetNillableSex(h *hustler.Sex) *HustlerUpdateOne

SetNillableSex sets the "sex" field if the given value is not nil.

func (*HustlerUpdateOne) SetNillableSvg

func (huo *HustlerUpdateOne) SetNillableSvg(s *string) *HustlerUpdateOne

SetNillableSvg sets the "svg" field if the given value is not nil.

func (*HustlerUpdateOne) SetNillableTitle

func (huo *HustlerUpdateOne) SetNillableTitle(s *string) *HustlerUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*HustlerUpdateOne) SetNillableVehicleID

func (huo *HustlerUpdateOne) SetNillableVehicleID(id *string) *HustlerUpdateOne

SetNillableVehicleID sets the "vehicle" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableWaistID

func (huo *HustlerUpdateOne) SetNillableWaistID(id *string) *HustlerUpdateOne

SetNillableWaistID sets the "waist" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableWalletID

func (huo *HustlerUpdateOne) SetNillableWalletID(id *string) *HustlerUpdateOne

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetNillableWeaponID

func (huo *HustlerUpdateOne) SetNillableWeaponID(id *string) *HustlerUpdateOne

SetNillableWeaponID sets the "weapon" edge to the Item entity by ID if the given value is not nil.

func (*HustlerUpdateOne) SetOrder

func (huo *HustlerUpdateOne) SetOrder(i []int) *HustlerUpdateOne

SetOrder sets the "order" field.

func (*HustlerUpdateOne) SetRing

func (huo *HustlerUpdateOne) SetRing(i *Item) *HustlerUpdateOne

SetRing sets the "ring" edge to the Item entity.

func (*HustlerUpdateOne) SetRingID

func (huo *HustlerUpdateOne) SetRingID(id string) *HustlerUpdateOne

SetRingID sets the "ring" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetSex

func (huo *HustlerUpdateOne) SetSex(h hustler.Sex) *HustlerUpdateOne

SetSex sets the "sex" field.

func (*HustlerUpdateOne) SetSvg

func (huo *HustlerUpdateOne) SetSvg(s string) *HustlerUpdateOne

SetSvg sets the "svg" field.

func (*HustlerUpdateOne) SetTitle

func (huo *HustlerUpdateOne) SetTitle(s string) *HustlerUpdateOne

SetTitle sets the "title" field.

func (*HustlerUpdateOne) SetVehicle

func (huo *HustlerUpdateOne) SetVehicle(i *Item) *HustlerUpdateOne

SetVehicle sets the "vehicle" edge to the Item entity.

func (*HustlerUpdateOne) SetVehicleID

func (huo *HustlerUpdateOne) SetVehicleID(id string) *HustlerUpdateOne

SetVehicleID sets the "vehicle" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetViewbox

func (huo *HustlerUpdateOne) SetViewbox(i []int) *HustlerUpdateOne

SetViewbox sets the "viewbox" field.

func (*HustlerUpdateOne) SetWaist

func (huo *HustlerUpdateOne) SetWaist(i *Item) *HustlerUpdateOne

SetWaist sets the "waist" edge to the Item entity.

func (*HustlerUpdateOne) SetWaistID

func (huo *HustlerUpdateOne) SetWaistID(id string) *HustlerUpdateOne

SetWaistID sets the "waist" edge to the Item entity by ID.

func (*HustlerUpdateOne) SetWallet

func (huo *HustlerUpdateOne) SetWallet(w *Wallet) *HustlerUpdateOne

SetWallet sets the "wallet" edge to the Wallet entity.

func (*HustlerUpdateOne) SetWalletID

func (huo *HustlerUpdateOne) SetWalletID(id string) *HustlerUpdateOne

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

func (*HustlerUpdateOne) SetWeapon

func (huo *HustlerUpdateOne) SetWeapon(i *Item) *HustlerUpdateOne

SetWeapon sets the "weapon" edge to the Item entity.

func (*HustlerUpdateOne) SetWeaponID

func (huo *HustlerUpdateOne) SetWeaponID(id string) *HustlerUpdateOne

SetWeaponID sets the "weapon" edge to the Item entity by ID.

type HustlerUpsert

type HustlerUpsert struct {
	*sql.UpdateSet
}

HustlerUpsert is the "OnConflict" setter.

func (*HustlerUpsert) AddAge

func (u *HustlerUpsert) AddAge(v uint64) *HustlerUpsert

AddAge adds v to the "age" field.

func (*HustlerUpsert) ClearBackground

func (u *HustlerUpsert) ClearBackground() *HustlerUpsert

ClearBackground clears the value of the "background" field.

func (*HustlerUpsert) ClearColor

func (u *HustlerUpsert) ClearColor() *HustlerUpsert

ClearColor clears the value of the "color" field.

func (*HustlerUpsert) ClearName

func (u *HustlerUpsert) ClearName() *HustlerUpsert

ClearName clears the value of the "name" field.

func (*HustlerUpsert) ClearSvg

func (u *HustlerUpsert) ClearSvg() *HustlerUpsert

ClearSvg clears the value of the "svg" field.

func (*HustlerUpsert) ClearTitle

func (u *HustlerUpsert) ClearTitle() *HustlerUpsert

ClearTitle clears the value of the "title" field.

func (*HustlerUpsert) SetAge

func (u *HustlerUpsert) SetAge(v uint64) *HustlerUpsert

SetAge sets the "age" field.

func (*HustlerUpsert) SetBackground

func (u *HustlerUpsert) SetBackground(v string) *HustlerUpsert

SetBackground sets the "background" field.

func (*HustlerUpsert) SetColor

func (u *HustlerUpsert) SetColor(v string) *HustlerUpsert

SetColor sets the "color" field.

func (*HustlerUpsert) SetCreatedAt

func (u *HustlerUpsert) SetCreatedAt(v time.Time) *HustlerUpsert

SetCreatedAt sets the "created_at" field.

func (*HustlerUpsert) SetName

func (u *HustlerUpsert) SetName(v string) *HustlerUpsert

SetName sets the "name" field.

func (*HustlerUpsert) SetOrder

func (u *HustlerUpsert) SetOrder(v []int) *HustlerUpsert

SetOrder sets the "order" field.

func (*HustlerUpsert) SetSex

func (u *HustlerUpsert) SetSex(v hustler.Sex) *HustlerUpsert

SetSex sets the "sex" field.

func (*HustlerUpsert) SetSvg

func (u *HustlerUpsert) SetSvg(v string) *HustlerUpsert

SetSvg sets the "svg" field.

func (*HustlerUpsert) SetTitle

func (u *HustlerUpsert) SetTitle(v string) *HustlerUpsert

SetTitle sets the "title" field.

func (*HustlerUpsert) SetType

func (u *HustlerUpsert) SetType(v hustler.Type) *HustlerUpsert

SetType sets the "type" field.

func (*HustlerUpsert) SetViewbox

func (u *HustlerUpsert) SetViewbox(v []int) *HustlerUpsert

SetViewbox sets the "viewbox" field.

func (*HustlerUpsert) UpdateAge

func (u *HustlerUpsert) UpdateAge() *HustlerUpsert

UpdateAge sets the "age" field to the value that was provided on create.

func (*HustlerUpsert) UpdateBackground

func (u *HustlerUpsert) UpdateBackground() *HustlerUpsert

UpdateBackground sets the "background" field to the value that was provided on create.

func (*HustlerUpsert) UpdateColor

func (u *HustlerUpsert) UpdateColor() *HustlerUpsert

UpdateColor sets the "color" field to the value that was provided on create.

func (*HustlerUpsert) UpdateCreatedAt

func (u *HustlerUpsert) UpdateCreatedAt() *HustlerUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*HustlerUpsert) UpdateName

func (u *HustlerUpsert) UpdateName() *HustlerUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*HustlerUpsert) UpdateOrder

func (u *HustlerUpsert) UpdateOrder() *HustlerUpsert

UpdateOrder sets the "order" field to the value that was provided on create.

func (*HustlerUpsert) UpdateSex

func (u *HustlerUpsert) UpdateSex() *HustlerUpsert

UpdateSex sets the "sex" field to the value that was provided on create.

func (*HustlerUpsert) UpdateSvg

func (u *HustlerUpsert) UpdateSvg() *HustlerUpsert

UpdateSvg sets the "svg" field to the value that was provided on create.

func (*HustlerUpsert) UpdateTitle

func (u *HustlerUpsert) UpdateTitle() *HustlerUpsert

UpdateTitle sets the "title" field to the value that was provided on create.

func (*HustlerUpsert) UpdateType

func (u *HustlerUpsert) UpdateType() *HustlerUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*HustlerUpsert) UpdateViewbox

func (u *HustlerUpsert) UpdateViewbox() *HustlerUpsert

UpdateViewbox sets the "viewbox" field to the value that was provided on create.

type HustlerUpsertBulk

type HustlerUpsertBulk struct {
	// contains filtered or unexported fields
}

HustlerUpsertBulk is the builder for "upsert"-ing a bulk of Hustler nodes.

func (*HustlerUpsertBulk) AddAge

AddAge adds v to the "age" field.

func (*HustlerUpsertBulk) ClearBackground

func (u *HustlerUpsertBulk) ClearBackground() *HustlerUpsertBulk

ClearBackground clears the value of the "background" field.

func (*HustlerUpsertBulk) ClearColor

func (u *HustlerUpsertBulk) ClearColor() *HustlerUpsertBulk

ClearColor clears the value of the "color" field.

func (*HustlerUpsertBulk) ClearName

func (u *HustlerUpsertBulk) ClearName() *HustlerUpsertBulk

ClearName clears the value of the "name" field.

func (*HustlerUpsertBulk) ClearSvg

func (u *HustlerUpsertBulk) ClearSvg() *HustlerUpsertBulk

ClearSvg clears the value of the "svg" field.

func (*HustlerUpsertBulk) ClearTitle

func (u *HustlerUpsertBulk) ClearTitle() *HustlerUpsertBulk

ClearTitle clears the value of the "title" field.

func (*HustlerUpsertBulk) DoNothing

func (u *HustlerUpsertBulk) DoNothing() *HustlerUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HustlerUpsertBulk) Exec

func (u *HustlerUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*HustlerUpsertBulk) ExecX

func (u *HustlerUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HustlerUpsertBulk) Ignore

func (u *HustlerUpsertBulk) Ignore() *HustlerUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Hustler.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*HustlerUpsertBulk) SetAge

SetAge sets the "age" field.

func (*HustlerUpsertBulk) SetBackground

func (u *HustlerUpsertBulk) SetBackground(v string) *HustlerUpsertBulk

SetBackground sets the "background" field.

func (*HustlerUpsertBulk) SetColor

func (u *HustlerUpsertBulk) SetColor(v string) *HustlerUpsertBulk

SetColor sets the "color" field.

func (*HustlerUpsertBulk) SetCreatedAt

func (u *HustlerUpsertBulk) SetCreatedAt(v time.Time) *HustlerUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*HustlerUpsertBulk) SetName

SetName sets the "name" field.

func (*HustlerUpsertBulk) SetOrder

func (u *HustlerUpsertBulk) SetOrder(v []int) *HustlerUpsertBulk

SetOrder sets the "order" field.

func (*HustlerUpsertBulk) SetSex

SetSex sets the "sex" field.

func (*HustlerUpsertBulk) SetSvg

SetSvg sets the "svg" field.

func (*HustlerUpsertBulk) SetTitle

func (u *HustlerUpsertBulk) SetTitle(v string) *HustlerUpsertBulk

SetTitle sets the "title" field.

func (*HustlerUpsertBulk) SetType

SetType sets the "type" field.

func (*HustlerUpsertBulk) SetViewbox

func (u *HustlerUpsertBulk) SetViewbox(v []int) *HustlerUpsertBulk

SetViewbox sets the "viewbox" field.

func (*HustlerUpsertBulk) Update

func (u *HustlerUpsertBulk) Update(set func(*HustlerUpsert)) *HustlerUpsertBulk

Update allows overriding fields `UPDATE` values. See the HustlerCreateBulk.OnConflict documentation for more info.

func (*HustlerUpsertBulk) UpdateAge

func (u *HustlerUpsertBulk) UpdateAge() *HustlerUpsertBulk

UpdateAge sets the "age" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateBackground

func (u *HustlerUpsertBulk) UpdateBackground() *HustlerUpsertBulk

UpdateBackground sets the "background" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateColor

func (u *HustlerUpsertBulk) UpdateColor() *HustlerUpsertBulk

UpdateColor sets the "color" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateCreatedAt

func (u *HustlerUpsertBulk) UpdateCreatedAt() *HustlerUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateName

func (u *HustlerUpsertBulk) UpdateName() *HustlerUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateNewValues

func (u *HustlerUpsertBulk) UpdateNewValues() *HustlerUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Hustler.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(hustler.FieldID)
		}),
	).
	Exec(ctx)

func (*HustlerUpsertBulk) UpdateOrder

func (u *HustlerUpsertBulk) UpdateOrder() *HustlerUpsertBulk

UpdateOrder sets the "order" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateSex

func (u *HustlerUpsertBulk) UpdateSex() *HustlerUpsertBulk

UpdateSex sets the "sex" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateSvg

func (u *HustlerUpsertBulk) UpdateSvg() *HustlerUpsertBulk

UpdateSvg sets the "svg" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateTitle

func (u *HustlerUpsertBulk) UpdateTitle() *HustlerUpsertBulk

UpdateTitle sets the "title" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateType

func (u *HustlerUpsertBulk) UpdateType() *HustlerUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*HustlerUpsertBulk) UpdateViewbox

func (u *HustlerUpsertBulk) UpdateViewbox() *HustlerUpsertBulk

UpdateViewbox sets the "viewbox" field to the value that was provided on create.

type HustlerUpsertOne

type HustlerUpsertOne struct {
	// contains filtered or unexported fields
}

HustlerUpsertOne is the builder for "upsert"-ing

one Hustler node.

func (*HustlerUpsertOne) AddAge

AddAge adds v to the "age" field.

func (*HustlerUpsertOne) ClearBackground

func (u *HustlerUpsertOne) ClearBackground() *HustlerUpsertOne

ClearBackground clears the value of the "background" field.

func (*HustlerUpsertOne) ClearColor

func (u *HustlerUpsertOne) ClearColor() *HustlerUpsertOne

ClearColor clears the value of the "color" field.

func (*HustlerUpsertOne) ClearName

func (u *HustlerUpsertOne) ClearName() *HustlerUpsertOne

ClearName clears the value of the "name" field.

func (*HustlerUpsertOne) ClearSvg

func (u *HustlerUpsertOne) ClearSvg() *HustlerUpsertOne

ClearSvg clears the value of the "svg" field.

func (*HustlerUpsertOne) ClearTitle

func (u *HustlerUpsertOne) ClearTitle() *HustlerUpsertOne

ClearTitle clears the value of the "title" field.

func (*HustlerUpsertOne) DoNothing

func (u *HustlerUpsertOne) DoNothing() *HustlerUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HustlerUpsertOne) Exec

func (u *HustlerUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*HustlerUpsertOne) ExecX

func (u *HustlerUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HustlerUpsertOne) ID

func (u *HustlerUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*HustlerUpsertOne) IDX

func (u *HustlerUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*HustlerUpsertOne) Ignore

func (u *HustlerUpsertOne) Ignore() *HustlerUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Hustler.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*HustlerUpsertOne) SetAge

SetAge sets the "age" field.

func (*HustlerUpsertOne) SetBackground

func (u *HustlerUpsertOne) SetBackground(v string) *HustlerUpsertOne

SetBackground sets the "background" field.

func (*HustlerUpsertOne) SetColor

func (u *HustlerUpsertOne) SetColor(v string) *HustlerUpsertOne

SetColor sets the "color" field.

func (*HustlerUpsertOne) SetCreatedAt

func (u *HustlerUpsertOne) SetCreatedAt(v time.Time) *HustlerUpsertOne

SetCreatedAt sets the "created_at" field.

func (*HustlerUpsertOne) SetName

func (u *HustlerUpsertOne) SetName(v string) *HustlerUpsertOne

SetName sets the "name" field.

func (*HustlerUpsertOne) SetOrder

func (u *HustlerUpsertOne) SetOrder(v []int) *HustlerUpsertOne

SetOrder sets the "order" field.

func (*HustlerUpsertOne) SetSex

SetSex sets the "sex" field.

func (*HustlerUpsertOne) SetSvg

SetSvg sets the "svg" field.

func (*HustlerUpsertOne) SetTitle

func (u *HustlerUpsertOne) SetTitle(v string) *HustlerUpsertOne

SetTitle sets the "title" field.

func (*HustlerUpsertOne) SetType

SetType sets the "type" field.

func (*HustlerUpsertOne) SetViewbox

func (u *HustlerUpsertOne) SetViewbox(v []int) *HustlerUpsertOne

SetViewbox sets the "viewbox" field.

func (*HustlerUpsertOne) Update

func (u *HustlerUpsertOne) Update(set func(*HustlerUpsert)) *HustlerUpsertOne

Update allows overriding fields `UPDATE` values. See the HustlerCreate.OnConflict documentation for more info.

func (*HustlerUpsertOne) UpdateAge

func (u *HustlerUpsertOne) UpdateAge() *HustlerUpsertOne

UpdateAge sets the "age" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateBackground

func (u *HustlerUpsertOne) UpdateBackground() *HustlerUpsertOne

UpdateBackground sets the "background" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateColor

func (u *HustlerUpsertOne) UpdateColor() *HustlerUpsertOne

UpdateColor sets the "color" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateCreatedAt

func (u *HustlerUpsertOne) UpdateCreatedAt() *HustlerUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateName

func (u *HustlerUpsertOne) UpdateName() *HustlerUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateNewValues

func (u *HustlerUpsertOne) UpdateNewValues() *HustlerUpsertOne

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.Hustler.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(hustler.FieldID)
		}),
	).
	Exec(ctx)

func (*HustlerUpsertOne) UpdateOrder

func (u *HustlerUpsertOne) UpdateOrder() *HustlerUpsertOne

UpdateOrder sets the "order" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateSex

func (u *HustlerUpsertOne) UpdateSex() *HustlerUpsertOne

UpdateSex sets the "sex" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateSvg

func (u *HustlerUpsertOne) UpdateSvg() *HustlerUpsertOne

UpdateSvg sets the "svg" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateTitle

func (u *HustlerUpsertOne) UpdateTitle() *HustlerUpsertOne

UpdateTitle sets the "title" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateType

func (u *HustlerUpsertOne) UpdateType() *HustlerUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*HustlerUpsertOne) UpdateViewbox

func (u *HustlerUpsertOne) UpdateViewbox() *HustlerUpsertOne

UpdateViewbox sets the "viewbox" field to the value that was provided on create.

type HustlerWhereInput

type HustlerWhereInput struct {
	Not *HustlerWhereInput   `json:"not,omitempty"`
	Or  []*HustlerWhereInput `json:"or,omitempty"`
	And []*HustlerWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "type" field predicates.
	Type      *hustler.Type  `json:"type,omitempty"`
	TypeNEQ   *hustler.Type  `json:"typeNEQ,omitempty"`
	TypeIn    []hustler.Type `json:"typeIn,omitempty"`
	TypeNotIn []hustler.Type `json:"typeNotIn,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameIsNil        bool     `json:"nameIsNil,omitempty"`
	NameNotNil       bool     `json:"nameNotNil,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "title" field predicates.
	Title             *string  `json:"title,omitempty"`
	TitleNEQ          *string  `json:"titleNEQ,omitempty"`
	TitleIn           []string `json:"titleIn,omitempty"`
	TitleNotIn        []string `json:"titleNotIn,omitempty"`
	TitleGT           *string  `json:"titleGT,omitempty"`
	TitleGTE          *string  `json:"titleGTE,omitempty"`
	TitleLT           *string  `json:"titleLT,omitempty"`
	TitleLTE          *string  `json:"titleLTE,omitempty"`
	TitleContains     *string  `json:"titleContains,omitempty"`
	TitleHasPrefix    *string  `json:"titleHasPrefix,omitempty"`
	TitleHasSuffix    *string  `json:"titleHasSuffix,omitempty"`
	TitleIsNil        bool     `json:"titleIsNil,omitempty"`
	TitleNotNil       bool     `json:"titleNotNil,omitempty"`
	TitleEqualFold    *string  `json:"titleEqualFold,omitempty"`
	TitleContainsFold *string  `json:"titleContainsFold,omitempty"`

	// "color" field predicates.
	Color             *string  `json:"color,omitempty"`
	ColorNEQ          *string  `json:"colorNEQ,omitempty"`
	ColorIn           []string `json:"colorIn,omitempty"`
	ColorNotIn        []string `json:"colorNotIn,omitempty"`
	ColorGT           *string  `json:"colorGT,omitempty"`
	ColorGTE          *string  `json:"colorGTE,omitempty"`
	ColorLT           *string  `json:"colorLT,omitempty"`
	ColorLTE          *string  `json:"colorLTE,omitempty"`
	ColorContains     *string  `json:"colorContains,omitempty"`
	ColorHasPrefix    *string  `json:"colorHasPrefix,omitempty"`
	ColorHasSuffix    *string  `json:"colorHasSuffix,omitempty"`
	ColorIsNil        bool     `json:"colorIsNil,omitempty"`
	ColorNotNil       bool     `json:"colorNotNil,omitempty"`
	ColorEqualFold    *string  `json:"colorEqualFold,omitempty"`
	ColorContainsFold *string  `json:"colorContainsFold,omitempty"`

	// "background" field predicates.
	Background             *string  `json:"background,omitempty"`
	BackgroundNEQ          *string  `json:"backgroundNEQ,omitempty"`
	BackgroundIn           []string `json:"backgroundIn,omitempty"`
	BackgroundNotIn        []string `json:"backgroundNotIn,omitempty"`
	BackgroundGT           *string  `json:"backgroundGT,omitempty"`
	BackgroundGTE          *string  `json:"backgroundGTE,omitempty"`
	BackgroundLT           *string  `json:"backgroundLT,omitempty"`
	BackgroundLTE          *string  `json:"backgroundLTE,omitempty"`
	BackgroundContains     *string  `json:"backgroundContains,omitempty"`
	BackgroundHasPrefix    *string  `json:"backgroundHasPrefix,omitempty"`
	BackgroundHasSuffix    *string  `json:"backgroundHasSuffix,omitempty"`
	BackgroundIsNil        bool     `json:"backgroundIsNil,omitempty"`
	BackgroundNotNil       bool     `json:"backgroundNotNil,omitempty"`
	BackgroundEqualFold    *string  `json:"backgroundEqualFold,omitempty"`
	BackgroundContainsFold *string  `json:"backgroundContainsFold,omitempty"`

	// "age" field predicates.
	Age      *uint64  `json:"age,omitempty"`
	AgeNEQ   *uint64  `json:"ageNEQ,omitempty"`
	AgeIn    []uint64 `json:"ageIn,omitempty"`
	AgeNotIn []uint64 `json:"ageNotIn,omitempty"`
	AgeGT    *uint64  `json:"ageGT,omitempty"`
	AgeGTE   *uint64  `json:"ageGTE,omitempty"`
	AgeLT    *uint64  `json:"ageLT,omitempty"`
	AgeLTE   *uint64  `json:"ageLTE,omitempty"`

	// "sex" field predicates.
	Sex      *hustler.Sex  `json:"sex,omitempty"`
	SexNEQ   *hustler.Sex  `json:"sexNEQ,omitempty"`
	SexIn    []hustler.Sex `json:"sexIn,omitempty"`
	SexNotIn []hustler.Sex `json:"sexNotIn,omitempty"`

	// "svg" field predicates.
	Svg             *string  `json:"svg,omitempty"`
	SvgNEQ          *string  `json:"svgNEQ,omitempty"`
	SvgIn           []string `json:"svgIn,omitempty"`
	SvgNotIn        []string `json:"svgNotIn,omitempty"`
	SvgGT           *string  `json:"svgGT,omitempty"`
	SvgGTE          *string  `json:"svgGTE,omitempty"`
	SvgLT           *string  `json:"svgLT,omitempty"`
	SvgLTE          *string  `json:"svgLTE,omitempty"`
	SvgContains     *string  `json:"svgContains,omitempty"`
	SvgHasPrefix    *string  `json:"svgHasPrefix,omitempty"`
	SvgHasSuffix    *string  `json:"svgHasSuffix,omitempty"`
	SvgIsNil        bool     `json:"svgIsNil,omitempty"`
	SvgNotNil       bool     `json:"svgNotNil,omitempty"`
	SvgEqualFold    *string  `json:"svgEqualFold,omitempty"`
	SvgContainsFold *string  `json:"svgContainsFold,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "wallet" edge predicates.
	HasWallet     *bool               `json:"hasWallet,omitempty"`
	HasWalletWith []*WalletWhereInput `json:"hasWalletWith,omitempty"`

	// "weapon" edge predicates.
	HasWeapon     *bool             `json:"hasWeapon,omitempty"`
	HasWeaponWith []*ItemWhereInput `json:"hasWeaponWith,omitempty"`

	// "clothes" edge predicates.
	HasClothes     *bool             `json:"hasClothes,omitempty"`
	HasClothesWith []*ItemWhereInput `json:"hasClothesWith,omitempty"`

	// "vehicle" edge predicates.
	HasVehicle     *bool             `json:"hasVehicle,omitempty"`
	HasVehicleWith []*ItemWhereInput `json:"hasVehicleWith,omitempty"`

	// "waist" edge predicates.
	HasWaist     *bool             `json:"hasWaist,omitempty"`
	HasWaistWith []*ItemWhereInput `json:"hasWaistWith,omitempty"`

	// "foot" edge predicates.
	HasFoot     *bool             `json:"hasFoot,omitempty"`
	HasFootWith []*ItemWhereInput `json:"hasFootWith,omitempty"`

	// "hand" edge predicates.
	HasHand     *bool             `json:"hasHand,omitempty"`
	HasHandWith []*ItemWhereInput `json:"hasHandWith,omitempty"`

	// "drug" edge predicates.
	HasDrug     *bool             `json:"hasDrug,omitempty"`
	HasDrugWith []*ItemWhereInput `json:"hasDrugWith,omitempty"`

	// "neck" edge predicates.
	HasNeck     *bool             `json:"hasNeck,omitempty"`
	HasNeckWith []*ItemWhereInput `json:"hasNeckWith,omitempty"`

	// "ring" edge predicates.
	HasRing     *bool             `json:"hasRing,omitempty"`
	HasRingWith []*ItemWhereInput `json:"hasRingWith,omitempty"`

	// "accessory" edge predicates.
	HasAccessory     *bool             `json:"hasAccessory,omitempty"`
	HasAccessoryWith []*ItemWhereInput `json:"hasAccessoryWith,omitempty"`

	// "body" edge predicates.
	HasBody     *bool                 `json:"hasBody,omitempty"`
	HasBodyWith []*BodyPartWhereInput `json:"hasBodyWith,omitempty"`

	// "hair" edge predicates.
	HasHair     *bool                 `json:"hasHair,omitempty"`
	HasHairWith []*BodyPartWhereInput `json:"hasHairWith,omitempty"`

	// "beard" edge predicates.
	HasBeard     *bool                 `json:"hasBeard,omitempty"`
	HasBeardWith []*BodyPartWhereInput `json:"hasBeardWith,omitempty"`

	// "index" edge predicates.
	HasIndex     *bool               `json:"hasIndex,omitempty"`
	HasIndexWith []*SearchWhereInput `json:"hasIndexWith,omitempty"`
}

HustlerWhereInput represents a where input for filtering Hustler queries.

func (*HustlerWhereInput) Filter

Filter applies the HustlerWhereInput filter on the HustlerQuery builder.

func (*HustlerWhereInput) P

P returns a predicate for filtering hustlers. An error is returned if the input is empty or invalid.

type Hustlers

type Hustlers []*Hustler

Hustlers is a parsable slice of Hustler.

type Item

type Item struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type item.Type `json:"type,omitempty"`
	// NamePrefix holds the value of the "name_prefix" field.
	NamePrefix string `json:"name_prefix,omitempty"`
	// NameSuffix holds the value of the "name_suffix" field.
	NameSuffix string `json:"name_suffix,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Suffix holds the value of the "suffix" field.
	Suffix string `json:"suffix,omitempty"`
	// Augmented holds the value of the "augmented" field.
	Augmented bool `json:"augmented,omitempty"`
	// Count holds the value of the "count" field.
	Count int `json:"count,omitempty"`
	// Tier holds the value of the "tier" field.
	Tier item.Tier `json:"tier,omitempty"`
	// Greatness holds the value of the "greatness" field.
	Greatness int `json:"greatness,omitempty"`
	// Rles holds the value of the "rles" field.
	Rles schema.RLEs `json:"rles,omitempty"`
	// Svg holds the value of the "svg" field.
	Svg string `json:"svg,omitempty"`
	// Sprite holds the value of the "sprite" field.
	Sprite schema.Sprites `json:"sprite,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ItemQuery when eager-loading is set.
	Edges ItemEdges `json:"edges"`
	// contains filtered or unexported fields
}

Item is the model entity for the Item schema.

func (*Item) Base

func (i *Item) Base(ctx context.Context) (*Item, error)

func (*Item) Derivative

func (i *Item) Derivative(ctx context.Context) ([]*Item, error)

func (*Item) Dopes

func (i *Item) Dopes(ctx context.Context) ([]*Dope, error)

func (*Item) HustlerAccessories

func (i *Item) HustlerAccessories(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerClothes

func (i *Item) HustlerClothes(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerDrugs

func (i *Item) HustlerDrugs(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerFeet

func (i *Item) HustlerFeet(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerHands

func (i *Item) HustlerHands(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerNecks

func (i *Item) HustlerNecks(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerRings

func (i *Item) HustlerRings(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerVehicles

func (i *Item) HustlerVehicles(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerWaists

func (i *Item) HustlerWaists(ctx context.Context) ([]*Hustler, error)

func (*Item) HustlerWeapons

func (i *Item) HustlerWeapons(ctx context.Context) ([]*Hustler, error)

func (*Item) Index

func (i *Item) Index(ctx context.Context) (*Search, error)

func (*Item) IsSearchResult

func (*Item) IsSearchResult()

func (*Item) IsToken

func (*Item) IsToken()

func (*Item) Node

func (i *Item) Node(ctx context.Context) (node *Node, err error)

func (*Item) QueryBase

func (i *Item) QueryBase() *ItemQuery

QueryBase queries the "base" edge of the Item entity.

func (*Item) QueryDerivative

func (i *Item) QueryDerivative() *ItemQuery

QueryDerivative queries the "derivative" edge of the Item entity.

func (*Item) QueryDopes

func (i *Item) QueryDopes() *DopeQuery

QueryDopes queries the "dopes" edge of the Item entity.

func (*Item) QueryHustlerAccessories

func (i *Item) QueryHustlerAccessories() *HustlerQuery

QueryHustlerAccessories queries the "hustler_accessories" edge of the Item entity.

func (*Item) QueryHustlerClothes

func (i *Item) QueryHustlerClothes() *HustlerQuery

QueryHustlerClothes queries the "hustler_clothes" edge of the Item entity.

func (*Item) QueryHustlerDrugs

func (i *Item) QueryHustlerDrugs() *HustlerQuery

QueryHustlerDrugs queries the "hustler_drugs" edge of the Item entity.

func (*Item) QueryHustlerFeet

func (i *Item) QueryHustlerFeet() *HustlerQuery

QueryHustlerFeet queries the "hustler_feet" edge of the Item entity.

func (*Item) QueryHustlerHands

func (i *Item) QueryHustlerHands() *HustlerQuery

QueryHustlerHands queries the "hustler_hands" edge of the Item entity.

func (*Item) QueryHustlerNecks

func (i *Item) QueryHustlerNecks() *HustlerQuery

QueryHustlerNecks queries the "hustler_necks" edge of the Item entity.

func (*Item) QueryHustlerRings

func (i *Item) QueryHustlerRings() *HustlerQuery

QueryHustlerRings queries the "hustler_rings" edge of the Item entity.

func (*Item) QueryHustlerVehicles

func (i *Item) QueryHustlerVehicles() *HustlerQuery

QueryHustlerVehicles queries the "hustler_vehicles" edge of the Item entity.

func (*Item) QueryHustlerWaists

func (i *Item) QueryHustlerWaists() *HustlerQuery

QueryHustlerWaists queries the "hustler_waists" edge of the Item entity.

func (*Item) QueryHustlerWeapons

func (i *Item) QueryHustlerWeapons() *HustlerQuery

QueryHustlerWeapons queries the "hustler_weapons" edge of the Item entity.

func (*Item) QueryIndex

func (i *Item) QueryIndex() *SearchQuery

QueryIndex queries the "index" edge of the Item entity.

func (*Item) QueryWallets

func (i *Item) QueryWallets() *WalletItemsQuery

QueryWallets queries the "wallets" edge of the Item entity.

func (*Item) String

func (i *Item) String() string

String implements the fmt.Stringer.

func (*Item) ToEdge

func (i *Item) ToEdge(order *ItemOrder) *ItemEdge

ToEdge converts Item into ItemEdge.

func (*Item) Unwrap

func (i *Item) Unwrap() *Item

Unwrap unwraps the Item 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 (*Item) Update

func (i *Item) Update() *ItemUpdateOne

Update returns a builder for updating this Item. Note that you need to call Item.Unwrap() before calling this method if this Item was returned from a transaction, and the transaction was committed or rolled back.

func (*Item) Wallets

func (i *Item) Wallets(ctx context.Context) ([]*WalletItems, error)

type ItemClient

type ItemClient struct {
	// contains filtered or unexported fields
}

ItemClient is a client for the Item schema.

func NewItemClient

func NewItemClient(c config) *ItemClient

NewItemClient returns a client for the Item from the given config.

func (*ItemClient) Create

func (c *ItemClient) Create() *ItemCreate

Create returns a create builder for Item.

func (*ItemClient) CreateBulk

func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk

CreateBulk returns a builder for creating a bulk of Item entities.

func (*ItemClient) Delete

func (c *ItemClient) Delete() *ItemDelete

Delete returns a delete builder for Item.

func (*ItemClient) DeleteOne

func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ItemClient) DeleteOneID

func (c *ItemClient) DeleteOneID(id string) *ItemDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ItemClient) Get

func (c *ItemClient) Get(ctx context.Context, id string) (*Item, error)

Get returns a Item entity by its id.

func (*ItemClient) GetX

func (c *ItemClient) GetX(ctx context.Context, id string) *Item

GetX is like Get, but panics if an error occurs.

func (*ItemClient) Hooks

func (c *ItemClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ItemClient) Query

func (c *ItemClient) Query() *ItemQuery

Query returns a query builder for Item.

func (*ItemClient) QueryBase

func (c *ItemClient) QueryBase(i *Item) *ItemQuery

QueryBase queries the base edge of a Item.

func (*ItemClient) QueryDerivative

func (c *ItemClient) QueryDerivative(i *Item) *ItemQuery

QueryDerivative queries the derivative edge of a Item.

func (*ItemClient) QueryDopes

func (c *ItemClient) QueryDopes(i *Item) *DopeQuery

QueryDopes queries the dopes edge of a Item.

func (*ItemClient) QueryHustlerAccessories

func (c *ItemClient) QueryHustlerAccessories(i *Item) *HustlerQuery

QueryHustlerAccessories queries the hustler_accessories edge of a Item.

func (*ItemClient) QueryHustlerClothes

func (c *ItemClient) QueryHustlerClothes(i *Item) *HustlerQuery

QueryHustlerClothes queries the hustler_clothes edge of a Item.

func (*ItemClient) QueryHustlerDrugs

func (c *ItemClient) QueryHustlerDrugs(i *Item) *HustlerQuery

QueryHustlerDrugs queries the hustler_drugs edge of a Item.

func (*ItemClient) QueryHustlerFeet

func (c *ItemClient) QueryHustlerFeet(i *Item) *HustlerQuery

QueryHustlerFeet queries the hustler_feet edge of a Item.

func (*ItemClient) QueryHustlerHands

func (c *ItemClient) QueryHustlerHands(i *Item) *HustlerQuery

QueryHustlerHands queries the hustler_hands edge of a Item.

func (*ItemClient) QueryHustlerNecks

func (c *ItemClient) QueryHustlerNecks(i *Item) *HustlerQuery

QueryHustlerNecks queries the hustler_necks edge of a Item.

func (*ItemClient) QueryHustlerRings

func (c *ItemClient) QueryHustlerRings(i *Item) *HustlerQuery

QueryHustlerRings queries the hustler_rings edge of a Item.

func (*ItemClient) QueryHustlerVehicles

func (c *ItemClient) QueryHustlerVehicles(i *Item) *HustlerQuery

QueryHustlerVehicles queries the hustler_vehicles edge of a Item.

func (*ItemClient) QueryHustlerWaists

func (c *ItemClient) QueryHustlerWaists(i *Item) *HustlerQuery

QueryHustlerWaists queries the hustler_waists edge of a Item.

func (*ItemClient) QueryHustlerWeapons

func (c *ItemClient) QueryHustlerWeapons(i *Item) *HustlerQuery

QueryHustlerWeapons queries the hustler_weapons edge of a Item.

func (*ItemClient) QueryIndex

func (c *ItemClient) QueryIndex(i *Item) *SearchQuery

QueryIndex queries the index edge of a Item.

func (*ItemClient) QueryWallets

func (c *ItemClient) QueryWallets(i *Item) *WalletItemsQuery

QueryWallets queries the wallets edge of a Item.

func (*ItemClient) Update

func (c *ItemClient) Update() *ItemUpdate

Update returns an update builder for Item.

func (*ItemClient) UpdateOne

func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ItemClient) UpdateOneID

func (c *ItemClient) UpdateOneID(id string) *ItemUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ItemClient) Use

func (c *ItemClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `item.Hooks(f(g(h())))`.

type ItemConnection

type ItemConnection struct {
	Edges      []*ItemEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

ItemConnection is the connection containing edges to Item.

type ItemCreate

type ItemCreate struct {
	// contains filtered or unexported fields
}

ItemCreate is the builder for creating a Item entity.

func (*ItemCreate) AddDerivative

func (ic *ItemCreate) AddDerivative(i ...*Item) *ItemCreate

AddDerivative adds the "derivative" edges to the Item entity.

func (*ItemCreate) AddDerivativeIDs

func (ic *ItemCreate) AddDerivativeIDs(ids ...string) *ItemCreate

AddDerivativeIDs adds the "derivative" edge to the Item entity by IDs.

func (*ItemCreate) AddDopeIDs

func (ic *ItemCreate) AddDopeIDs(ids ...string) *ItemCreate

AddDopeIDs adds the "dopes" edge to the Dope entity by IDs.

func (*ItemCreate) AddDopes

func (ic *ItemCreate) AddDopes(d ...*Dope) *ItemCreate

AddDopes adds the "dopes" edges to the Dope entity.

func (*ItemCreate) AddHustlerAccessories

func (ic *ItemCreate) AddHustlerAccessories(h ...*Hustler) *ItemCreate

AddHustlerAccessories adds the "hustler_accessories" edges to the Hustler entity.

func (*ItemCreate) AddHustlerAccessoryIDs

func (ic *ItemCreate) AddHustlerAccessoryIDs(ids ...string) *ItemCreate

AddHustlerAccessoryIDs adds the "hustler_accessories" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerClotheIDs

func (ic *ItemCreate) AddHustlerClotheIDs(ids ...string) *ItemCreate

AddHustlerClotheIDs adds the "hustler_clothes" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerClothes

func (ic *ItemCreate) AddHustlerClothes(h ...*Hustler) *ItemCreate

AddHustlerClothes adds the "hustler_clothes" edges to the Hustler entity.

func (*ItemCreate) AddHustlerDrugIDs

func (ic *ItemCreate) AddHustlerDrugIDs(ids ...string) *ItemCreate

AddHustlerDrugIDs adds the "hustler_drugs" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerDrugs

func (ic *ItemCreate) AddHustlerDrugs(h ...*Hustler) *ItemCreate

AddHustlerDrugs adds the "hustler_drugs" edges to the Hustler entity.

func (*ItemCreate) AddHustlerFeet

func (ic *ItemCreate) AddHustlerFeet(h ...*Hustler) *ItemCreate

AddHustlerFeet adds the "hustler_feet" edges to the Hustler entity.

func (*ItemCreate) AddHustlerFeetIDs

func (ic *ItemCreate) AddHustlerFeetIDs(ids ...string) *ItemCreate

AddHustlerFeetIDs adds the "hustler_feet" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerHandIDs

func (ic *ItemCreate) AddHustlerHandIDs(ids ...string) *ItemCreate

AddHustlerHandIDs adds the "hustler_hands" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerHands

func (ic *ItemCreate) AddHustlerHands(h ...*Hustler) *ItemCreate

AddHustlerHands adds the "hustler_hands" edges to the Hustler entity.

func (*ItemCreate) AddHustlerNeckIDs

func (ic *ItemCreate) AddHustlerNeckIDs(ids ...string) *ItemCreate

AddHustlerNeckIDs adds the "hustler_necks" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerNecks

func (ic *ItemCreate) AddHustlerNecks(h ...*Hustler) *ItemCreate

AddHustlerNecks adds the "hustler_necks" edges to the Hustler entity.

func (*ItemCreate) AddHustlerRingIDs

func (ic *ItemCreate) AddHustlerRingIDs(ids ...string) *ItemCreate

AddHustlerRingIDs adds the "hustler_rings" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerRings

func (ic *ItemCreate) AddHustlerRings(h ...*Hustler) *ItemCreate

AddHustlerRings adds the "hustler_rings" edges to the Hustler entity.

func (*ItemCreate) AddHustlerVehicleIDs

func (ic *ItemCreate) AddHustlerVehicleIDs(ids ...string) *ItemCreate

AddHustlerVehicleIDs adds the "hustler_vehicles" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerVehicles

func (ic *ItemCreate) AddHustlerVehicles(h ...*Hustler) *ItemCreate

AddHustlerVehicles adds the "hustler_vehicles" edges to the Hustler entity.

func (*ItemCreate) AddHustlerWaistIDs

func (ic *ItemCreate) AddHustlerWaistIDs(ids ...string) *ItemCreate

AddHustlerWaistIDs adds the "hustler_waists" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerWaists

func (ic *ItemCreate) AddHustlerWaists(h ...*Hustler) *ItemCreate

AddHustlerWaists adds the "hustler_waists" edges to the Hustler entity.

func (*ItemCreate) AddHustlerWeaponIDs

func (ic *ItemCreate) AddHustlerWeaponIDs(ids ...string) *ItemCreate

AddHustlerWeaponIDs adds the "hustler_weapons" edge to the Hustler entity by IDs.

func (*ItemCreate) AddHustlerWeapons

func (ic *ItemCreate) AddHustlerWeapons(h ...*Hustler) *ItemCreate

AddHustlerWeapons adds the "hustler_weapons" edges to the Hustler entity.

func (*ItemCreate) AddWalletIDs

func (ic *ItemCreate) AddWalletIDs(ids ...string) *ItemCreate

AddWalletIDs adds the "wallets" edge to the WalletItems entity by IDs.

func (*ItemCreate) AddWallets

func (ic *ItemCreate) AddWallets(w ...*WalletItems) *ItemCreate

AddWallets adds the "wallets" edges to the WalletItems entity.

func (*ItemCreate) Exec

func (ic *ItemCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemCreate) ExecX

func (ic *ItemCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemCreate) Mutation

func (ic *ItemCreate) Mutation() *ItemMutation

Mutation returns the ItemMutation object of the builder.

func (*ItemCreate) OnConflict

func (ic *ItemCreate) OnConflict(opts ...sql.ConflictOption) *ItemUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Item.Create().
	SetType(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.ItemUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*ItemCreate) OnConflictColumns

func (ic *ItemCreate) OnConflictColumns(columns ...string) *ItemUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ItemCreate) Save

func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)

Save creates the Item in the database.

func (*ItemCreate) SaveX

func (ic *ItemCreate) SaveX(ctx context.Context) *Item

SaveX calls Save and panics if Save returns an error.

func (*ItemCreate) SetAugmented

func (ic *ItemCreate) SetAugmented(b bool) *ItemCreate

SetAugmented sets the "augmented" field.

func (*ItemCreate) SetBase

func (ic *ItemCreate) SetBase(i *Item) *ItemCreate

SetBase sets the "base" edge to the Item entity.

func (*ItemCreate) SetBaseID

func (ic *ItemCreate) SetBaseID(id string) *ItemCreate

SetBaseID sets the "base" edge to the Item entity by ID.

func (*ItemCreate) SetCount

func (ic *ItemCreate) SetCount(i int) *ItemCreate

SetCount sets the "count" field.

func (*ItemCreate) SetGreatness

func (ic *ItemCreate) SetGreatness(i int) *ItemCreate

SetGreatness sets the "greatness" field.

func (*ItemCreate) SetID

func (ic *ItemCreate) SetID(s string) *ItemCreate

SetID sets the "id" field.

func (*ItemCreate) SetIndex

func (ic *ItemCreate) SetIndex(s *Search) *ItemCreate

SetIndex sets the "index" edge to the Search entity.

func (*ItemCreate) SetIndexID

func (ic *ItemCreate) SetIndexID(id string) *ItemCreate

SetIndexID sets the "index" edge to the Search entity by ID.

func (*ItemCreate) SetName

func (ic *ItemCreate) SetName(s string) *ItemCreate

SetName sets the "name" field.

func (*ItemCreate) SetNamePrefix

func (ic *ItemCreate) SetNamePrefix(s string) *ItemCreate

SetNamePrefix sets the "name_prefix" field.

func (*ItemCreate) SetNameSuffix

func (ic *ItemCreate) SetNameSuffix(s string) *ItemCreate

SetNameSuffix sets the "name_suffix" field.

func (*ItemCreate) SetNillableAugmented

func (ic *ItemCreate) SetNillableAugmented(b *bool) *ItemCreate

SetNillableAugmented sets the "augmented" field if the given value is not nil.

func (*ItemCreate) SetNillableBaseID

func (ic *ItemCreate) SetNillableBaseID(id *string) *ItemCreate

SetNillableBaseID sets the "base" edge to the Item entity by ID if the given value is not nil.

func (*ItemCreate) SetNillableCount

func (ic *ItemCreate) SetNillableCount(i *int) *ItemCreate

SetNillableCount sets the "count" field if the given value is not nil.

func (*ItemCreate) SetNillableGreatness

func (ic *ItemCreate) SetNillableGreatness(i *int) *ItemCreate

SetNillableGreatness sets the "greatness" field if the given value is not nil.

func (*ItemCreate) SetNillableIndexID

func (ic *ItemCreate) SetNillableIndexID(id *string) *ItemCreate

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*ItemCreate) SetNillableNamePrefix

func (ic *ItemCreate) SetNillableNamePrefix(s *string) *ItemCreate

SetNillableNamePrefix sets the "name_prefix" field if the given value is not nil.

func (*ItemCreate) SetNillableNameSuffix

func (ic *ItemCreate) SetNillableNameSuffix(s *string) *ItemCreate

SetNillableNameSuffix sets the "name_suffix" field if the given value is not nil.

func (*ItemCreate) SetNillableRles

func (ic *ItemCreate) SetNillableRles(se *schema.RLEs) *ItemCreate

SetNillableRles sets the "rles" field if the given value is not nil.

func (*ItemCreate) SetNillableSprite

func (ic *ItemCreate) SetNillableSprite(s *schema.Sprites) *ItemCreate

SetNillableSprite sets the "sprite" field if the given value is not nil.

func (*ItemCreate) SetNillableSuffix

func (ic *ItemCreate) SetNillableSuffix(s *string) *ItemCreate

SetNillableSuffix sets the "suffix" field if the given value is not nil.

func (*ItemCreate) SetNillableSvg

func (ic *ItemCreate) SetNillableSvg(s *string) *ItemCreate

SetNillableSvg sets the "svg" field if the given value is not nil.

func (*ItemCreate) SetNillableTier

func (ic *ItemCreate) SetNillableTier(i *item.Tier) *ItemCreate

SetNillableTier sets the "tier" field if the given value is not nil.

func (*ItemCreate) SetRles

func (ic *ItemCreate) SetRles(se schema.RLEs) *ItemCreate

SetRles sets the "rles" field.

func (*ItemCreate) SetSprite

func (ic *ItemCreate) SetSprite(s schema.Sprites) *ItemCreate

SetSprite sets the "sprite" field.

func (*ItemCreate) SetSuffix

func (ic *ItemCreate) SetSuffix(s string) *ItemCreate

SetSuffix sets the "suffix" field.

func (*ItemCreate) SetSvg

func (ic *ItemCreate) SetSvg(s string) *ItemCreate

SetSvg sets the "svg" field.

func (*ItemCreate) SetTier

func (ic *ItemCreate) SetTier(i item.Tier) *ItemCreate

SetTier sets the "tier" field.

func (*ItemCreate) SetType

func (ic *ItemCreate) SetType(i item.Type) *ItemCreate

SetType sets the "type" field.

type ItemCreateBulk

type ItemCreateBulk struct {
	// contains filtered or unexported fields
}

ItemCreateBulk is the builder for creating many Item entities in bulk.

func (*ItemCreateBulk) Exec

func (icb *ItemCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemCreateBulk) ExecX

func (icb *ItemCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemCreateBulk) OnConflict

func (icb *ItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *ItemUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Item.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.ItemUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*ItemCreateBulk) OnConflictColumns

func (icb *ItemCreateBulk) OnConflictColumns(columns ...string) *ItemUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ItemCreateBulk) Save

func (icb *ItemCreateBulk) Save(ctx context.Context) ([]*Item, error)

Save creates the Item entities in the database.

func (*ItemCreateBulk) SaveX

func (icb *ItemCreateBulk) SaveX(ctx context.Context) []*Item

SaveX is like Save, but panics if an error occurs.

type ItemDelete

type ItemDelete struct {
	// contains filtered or unexported fields
}

ItemDelete is the builder for deleting a Item entity.

func (*ItemDelete) Exec

func (id *ItemDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ItemDelete) ExecX

func (id *ItemDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ItemDelete) Where

func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete

Where appends a list predicates to the ItemDelete builder.

type ItemDeleteOne

type ItemDeleteOne struct {
	// contains filtered or unexported fields
}

ItemDeleteOne is the builder for deleting a single Item entity.

func (*ItemDeleteOne) Exec

func (ido *ItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ItemDeleteOne) ExecX

func (ido *ItemDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ItemEdge

type ItemEdge struct {
	Node   *Item  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

ItemEdge is the edge representation of Item.

type ItemEdges

type ItemEdges struct {
	// Wallets holds the value of the wallets edge.
	Wallets []*WalletItems `json:"wallets,omitempty"`
	// Dopes holds the value of the dopes edge.
	Dopes []*Dope `json:"dopes,omitempty"`
	// HustlerWeapons holds the value of the hustler_weapons edge.
	HustlerWeapons []*Hustler `json:"hustler_weapons,omitempty"`
	// HustlerClothes holds the value of the hustler_clothes edge.
	HustlerClothes []*Hustler `json:"hustler_clothes,omitempty"`
	// HustlerVehicles holds the value of the hustler_vehicles edge.
	HustlerVehicles []*Hustler `json:"hustler_vehicles,omitempty"`
	// HustlerWaists holds the value of the hustler_waists edge.
	HustlerWaists []*Hustler `json:"hustler_waists,omitempty"`
	// HustlerFeet holds the value of the hustler_feet edge.
	HustlerFeet []*Hustler `json:"hustler_feet,omitempty"`
	// HustlerHands holds the value of the hustler_hands edge.
	HustlerHands []*Hustler `json:"hustler_hands,omitempty"`
	// HustlerDrugs holds the value of the hustler_drugs edge.
	HustlerDrugs []*Hustler `json:"hustler_drugs,omitempty"`
	// HustlerNecks holds the value of the hustler_necks edge.
	HustlerNecks []*Hustler `json:"hustler_necks,omitempty"`
	// HustlerRings holds the value of the hustler_rings edge.
	HustlerRings []*Hustler `json:"hustler_rings,omitempty"`
	// HustlerAccessories holds the value of the hustler_accessories edge.
	HustlerAccessories []*Hustler `json:"hustler_accessories,omitempty"`
	// Base holds the value of the base edge.
	Base *Item `json:"base,omitempty"`
	// Derivative holds the value of the derivative edge.
	Derivative []*Item `json:"derivative,omitempty"`
	// Index holds the value of the index edge.
	Index *Search `json:"index,omitempty"`
	// contains filtered or unexported fields
}

ItemEdges holds the relations/edges for other nodes in the graph.

func (ItemEdges) BaseOrErr

func (e ItemEdges) BaseOrErr() (*Item, error)

BaseOrErr returns the Base value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ItemEdges) DerivativeOrErr

func (e ItemEdges) DerivativeOrErr() ([]*Item, error)

DerivativeOrErr returns the Derivative value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) DopesOrErr

func (e ItemEdges) DopesOrErr() ([]*Dope, error)

DopesOrErr returns the Dopes value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerAccessoriesOrErr

func (e ItemEdges) HustlerAccessoriesOrErr() ([]*Hustler, error)

HustlerAccessoriesOrErr returns the HustlerAccessories value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerClothesOrErr

func (e ItemEdges) HustlerClothesOrErr() ([]*Hustler, error)

HustlerClothesOrErr returns the HustlerClothes value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerDrugsOrErr

func (e ItemEdges) HustlerDrugsOrErr() ([]*Hustler, error)

HustlerDrugsOrErr returns the HustlerDrugs value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerFeetOrErr

func (e ItemEdges) HustlerFeetOrErr() ([]*Hustler, error)

HustlerFeetOrErr returns the HustlerFeet value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerHandsOrErr

func (e ItemEdges) HustlerHandsOrErr() ([]*Hustler, error)

HustlerHandsOrErr returns the HustlerHands value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerNecksOrErr

func (e ItemEdges) HustlerNecksOrErr() ([]*Hustler, error)

HustlerNecksOrErr returns the HustlerNecks value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerRingsOrErr

func (e ItemEdges) HustlerRingsOrErr() ([]*Hustler, error)

HustlerRingsOrErr returns the HustlerRings value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerVehiclesOrErr

func (e ItemEdges) HustlerVehiclesOrErr() ([]*Hustler, error)

HustlerVehiclesOrErr returns the HustlerVehicles value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerWaistsOrErr

func (e ItemEdges) HustlerWaistsOrErr() ([]*Hustler, error)

HustlerWaistsOrErr returns the HustlerWaists value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) HustlerWeaponsOrErr

func (e ItemEdges) HustlerWeaponsOrErr() ([]*Hustler, error)

HustlerWeaponsOrErr returns the HustlerWeapons value or an error if the edge was not loaded in eager-loading.

func (ItemEdges) IndexOrErr

func (e ItemEdges) IndexOrErr() (*Search, error)

IndexOrErr returns the Index value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ItemEdges) WalletsOrErr

func (e ItemEdges) WalletsOrErr() ([]*WalletItems, error)

WalletsOrErr returns the Wallets value or an error if the edge was not loaded in eager-loading.

type ItemGroupBy

type ItemGroupBy struct {
	// contains filtered or unexported fields
}

ItemGroupBy is the group-by builder for Item entities.

func (*ItemGroupBy) Aggregate

func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ItemGroupBy) Bool

func (igb *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) BoolX

func (igb *ItemGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ItemGroupBy) Bools

func (igb *ItemGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) BoolsX

func (igb *ItemGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ItemGroupBy) Float64

func (igb *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) Float64X

func (igb *ItemGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ItemGroupBy) Float64s

func (igb *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) Float64sX

func (igb *ItemGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ItemGroupBy) Int

func (igb *ItemGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) IntX

func (igb *ItemGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ItemGroupBy) Ints

func (igb *ItemGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) IntsX

func (igb *ItemGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ItemGroupBy) Scan

func (igb *ItemGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*ItemGroupBy) ScanX

func (igb *ItemGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ItemGroupBy) String

func (igb *ItemGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) StringX

func (igb *ItemGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ItemGroupBy) Strings

func (igb *ItemGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) StringsX

func (igb *ItemGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ItemMutation

type ItemMutation struct {
	// contains filtered or unexported fields
}

ItemMutation represents an operation that mutates the Item nodes in the graph.

func (*ItemMutation) AddCount

func (m *ItemMutation) AddCount(i int)

AddCount adds i to the "count" field.

func (*ItemMutation) AddDerivativeIDs

func (m *ItemMutation) AddDerivativeIDs(ids ...string)

AddDerivativeIDs adds the "derivative" edge to the Item entity by ids.

func (*ItemMutation) AddDopeIDs

func (m *ItemMutation) AddDopeIDs(ids ...string)

AddDopeIDs adds the "dopes" edge to the Dope entity by ids.

func (*ItemMutation) AddField

func (m *ItemMutation) 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 (*ItemMutation) AddGreatness

func (m *ItemMutation) AddGreatness(i int)

AddGreatness adds i to the "greatness" field.

func (*ItemMutation) AddHustlerAccessoryIDs

func (m *ItemMutation) AddHustlerAccessoryIDs(ids ...string)

AddHustlerAccessoryIDs adds the "hustler_accessories" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerClotheIDs

func (m *ItemMutation) AddHustlerClotheIDs(ids ...string)

AddHustlerClotheIDs adds the "hustler_clothes" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerDrugIDs

func (m *ItemMutation) AddHustlerDrugIDs(ids ...string)

AddHustlerDrugIDs adds the "hustler_drugs" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerFeetIDs

func (m *ItemMutation) AddHustlerFeetIDs(ids ...string)

AddHustlerFeetIDs adds the "hustler_feet" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerHandIDs

func (m *ItemMutation) AddHustlerHandIDs(ids ...string)

AddHustlerHandIDs adds the "hustler_hands" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerNeckIDs

func (m *ItemMutation) AddHustlerNeckIDs(ids ...string)

AddHustlerNeckIDs adds the "hustler_necks" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerRingIDs

func (m *ItemMutation) AddHustlerRingIDs(ids ...string)

AddHustlerRingIDs adds the "hustler_rings" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerVehicleIDs

func (m *ItemMutation) AddHustlerVehicleIDs(ids ...string)

AddHustlerVehicleIDs adds the "hustler_vehicles" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerWaistIDs

func (m *ItemMutation) AddHustlerWaistIDs(ids ...string)

AddHustlerWaistIDs adds the "hustler_waists" edge to the Hustler entity by ids.

func (*ItemMutation) AddHustlerWeaponIDs

func (m *ItemMutation) AddHustlerWeaponIDs(ids ...string)

AddHustlerWeaponIDs adds the "hustler_weapons" edge to the Hustler entity by ids.

func (*ItemMutation) AddWalletIDs

func (m *ItemMutation) AddWalletIDs(ids ...string)

AddWalletIDs adds the "wallets" edge to the WalletItems entity by ids.

func (*ItemMutation) AddedCount

func (m *ItemMutation) AddedCount() (r int, exists bool)

AddedCount returns the value that was added to the "count" field in this mutation.

func (*ItemMutation) AddedEdges

func (m *ItemMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ItemMutation) AddedField

func (m *ItemMutation) 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 (*ItemMutation) AddedFields

func (m *ItemMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ItemMutation) AddedGreatness

func (m *ItemMutation) AddedGreatness() (r int, exists bool)

AddedGreatness returns the value that was added to the "greatness" field in this mutation.

func (*ItemMutation) AddedIDs

func (m *ItemMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ItemMutation) Augmented

func (m *ItemMutation) Augmented() (r bool, exists bool)

Augmented returns the value of the "augmented" field in the mutation.

func (*ItemMutation) AugmentedCleared

func (m *ItemMutation) AugmentedCleared() bool

AugmentedCleared returns if the "augmented" field was cleared in this mutation.

func (*ItemMutation) BaseCleared

func (m *ItemMutation) BaseCleared() bool

BaseCleared reports if the "base" edge to the Item entity was cleared.

func (*ItemMutation) BaseID

func (m *ItemMutation) BaseID() (id string, exists bool)

BaseID returns the "base" edge ID in the mutation.

func (*ItemMutation) BaseIDs

func (m *ItemMutation) BaseIDs() (ids []string)

BaseIDs returns the "base" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BaseID instead. It exists only for internal usage by the builders.

func (*ItemMutation) ClearAugmented

func (m *ItemMutation) ClearAugmented()

ClearAugmented clears the value of the "augmented" field.

func (*ItemMutation) ClearBase

func (m *ItemMutation) ClearBase()

ClearBase clears the "base" edge to the Item entity.

func (*ItemMutation) ClearCount

func (m *ItemMutation) ClearCount()

ClearCount clears the value of the "count" field.

func (*ItemMutation) ClearDerivative

func (m *ItemMutation) ClearDerivative()

ClearDerivative clears the "derivative" edge to the Item entity.

func (*ItemMutation) ClearDopes

func (m *ItemMutation) ClearDopes()

ClearDopes clears the "dopes" edge to the Dope entity.

func (*ItemMutation) ClearEdge

func (m *ItemMutation) 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 (*ItemMutation) ClearField

func (m *ItemMutation) 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 (*ItemMutation) ClearGreatness

func (m *ItemMutation) ClearGreatness()

ClearGreatness clears the value of the "greatness" field.

func (*ItemMutation) ClearHustlerAccessories

func (m *ItemMutation) ClearHustlerAccessories()

ClearHustlerAccessories clears the "hustler_accessories" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerClothes

func (m *ItemMutation) ClearHustlerClothes()

ClearHustlerClothes clears the "hustler_clothes" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerDrugs

func (m *ItemMutation) ClearHustlerDrugs()

ClearHustlerDrugs clears the "hustler_drugs" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerFeet

func (m *ItemMutation) ClearHustlerFeet()

ClearHustlerFeet clears the "hustler_feet" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerHands

func (m *ItemMutation) ClearHustlerHands()

ClearHustlerHands clears the "hustler_hands" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerNecks

func (m *ItemMutation) ClearHustlerNecks()

ClearHustlerNecks clears the "hustler_necks" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerRings

func (m *ItemMutation) ClearHustlerRings()

ClearHustlerRings clears the "hustler_rings" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerVehicles

func (m *ItemMutation) ClearHustlerVehicles()

ClearHustlerVehicles clears the "hustler_vehicles" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerWaists

func (m *ItemMutation) ClearHustlerWaists()

ClearHustlerWaists clears the "hustler_waists" edge to the Hustler entity.

func (*ItemMutation) ClearHustlerWeapons

func (m *ItemMutation) ClearHustlerWeapons()

ClearHustlerWeapons clears the "hustler_weapons" edge to the Hustler entity.

func (*ItemMutation) ClearIndex

func (m *ItemMutation) ClearIndex()

ClearIndex clears the "index" edge to the Search entity.

func (*ItemMutation) ClearNamePrefix

func (m *ItemMutation) ClearNamePrefix()

ClearNamePrefix clears the value of the "name_prefix" field.

func (*ItemMutation) ClearNameSuffix

func (m *ItemMutation) ClearNameSuffix()

ClearNameSuffix clears the value of the "name_suffix" field.

func (*ItemMutation) ClearRles

func (m *ItemMutation) ClearRles()

ClearRles clears the value of the "rles" field.

func (*ItemMutation) ClearSprite

func (m *ItemMutation) ClearSprite()

ClearSprite clears the value of the "sprite" field.

func (*ItemMutation) ClearSuffix

func (m *ItemMutation) ClearSuffix()

ClearSuffix clears the value of the "suffix" field.

func (*ItemMutation) ClearSvg

func (m *ItemMutation) ClearSvg()

ClearSvg clears the value of the "svg" field.

func (*ItemMutation) ClearTier

func (m *ItemMutation) ClearTier()

ClearTier clears the value of the "tier" field.

func (*ItemMutation) ClearWallets

func (m *ItemMutation) ClearWallets()

ClearWallets clears the "wallets" edge to the WalletItems entity.

func (*ItemMutation) ClearedEdges

func (m *ItemMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ItemMutation) ClearedFields

func (m *ItemMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ItemMutation) Client

func (m ItemMutation) 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 (*ItemMutation) Count

func (m *ItemMutation) Count() (r int, exists bool)

Count returns the value of the "count" field in the mutation.

func (*ItemMutation) CountCleared

func (m *ItemMutation) CountCleared() bool

CountCleared returns if the "count" field was cleared in this mutation.

func (*ItemMutation) DerivativeCleared

func (m *ItemMutation) DerivativeCleared() bool

DerivativeCleared reports if the "derivative" edge to the Item entity was cleared.

func (*ItemMutation) DerivativeIDs

func (m *ItemMutation) DerivativeIDs() (ids []string)

DerivativeIDs returns the "derivative" edge IDs in the mutation.

func (*ItemMutation) DopesCleared

func (m *ItemMutation) DopesCleared() bool

DopesCleared reports if the "dopes" edge to the Dope entity was cleared.

func (*ItemMutation) DopesIDs

func (m *ItemMutation) DopesIDs() (ids []string)

DopesIDs returns the "dopes" edge IDs in the mutation.

func (*ItemMutation) EdgeCleared

func (m *ItemMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ItemMutation) Field

func (m *ItemMutation) 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 (*ItemMutation) FieldCleared

func (m *ItemMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ItemMutation) Fields

func (m *ItemMutation) 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 (*ItemMutation) GetType

func (m *ItemMutation) GetType() (r item.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ItemMutation) Greatness

func (m *ItemMutation) Greatness() (r int, exists bool)

Greatness returns the value of the "greatness" field in the mutation.

func (*ItemMutation) GreatnessCleared

func (m *ItemMutation) GreatnessCleared() bool

GreatnessCleared returns if the "greatness" field was cleared in this mutation.

func (*ItemMutation) HustlerAccessoriesCleared

func (m *ItemMutation) HustlerAccessoriesCleared() bool

HustlerAccessoriesCleared reports if the "hustler_accessories" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerAccessoriesIDs

func (m *ItemMutation) HustlerAccessoriesIDs() (ids []string)

HustlerAccessoriesIDs returns the "hustler_accessories" edge IDs in the mutation.

func (*ItemMutation) HustlerClothesCleared

func (m *ItemMutation) HustlerClothesCleared() bool

HustlerClothesCleared reports if the "hustler_clothes" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerClothesIDs

func (m *ItemMutation) HustlerClothesIDs() (ids []string)

HustlerClothesIDs returns the "hustler_clothes" edge IDs in the mutation.

func (*ItemMutation) HustlerDrugsCleared

func (m *ItemMutation) HustlerDrugsCleared() bool

HustlerDrugsCleared reports if the "hustler_drugs" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerDrugsIDs

func (m *ItemMutation) HustlerDrugsIDs() (ids []string)

HustlerDrugsIDs returns the "hustler_drugs" edge IDs in the mutation.

func (*ItemMutation) HustlerFeetCleared

func (m *ItemMutation) HustlerFeetCleared() bool

HustlerFeetCleared reports if the "hustler_feet" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerFeetIDs

func (m *ItemMutation) HustlerFeetIDs() (ids []string)

HustlerFeetIDs returns the "hustler_feet" edge IDs in the mutation.

func (*ItemMutation) HustlerHandsCleared

func (m *ItemMutation) HustlerHandsCleared() bool

HustlerHandsCleared reports if the "hustler_hands" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerHandsIDs

func (m *ItemMutation) HustlerHandsIDs() (ids []string)

HustlerHandsIDs returns the "hustler_hands" edge IDs in the mutation.

func (*ItemMutation) HustlerNecksCleared

func (m *ItemMutation) HustlerNecksCleared() bool

HustlerNecksCleared reports if the "hustler_necks" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerNecksIDs

func (m *ItemMutation) HustlerNecksIDs() (ids []string)

HustlerNecksIDs returns the "hustler_necks" edge IDs in the mutation.

func (*ItemMutation) HustlerRingsCleared

func (m *ItemMutation) HustlerRingsCleared() bool

HustlerRingsCleared reports if the "hustler_rings" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerRingsIDs

func (m *ItemMutation) HustlerRingsIDs() (ids []string)

HustlerRingsIDs returns the "hustler_rings" edge IDs in the mutation.

func (*ItemMutation) HustlerVehiclesCleared

func (m *ItemMutation) HustlerVehiclesCleared() bool

HustlerVehiclesCleared reports if the "hustler_vehicles" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerVehiclesIDs

func (m *ItemMutation) HustlerVehiclesIDs() (ids []string)

HustlerVehiclesIDs returns the "hustler_vehicles" edge IDs in the mutation.

func (*ItemMutation) HustlerWaistsCleared

func (m *ItemMutation) HustlerWaistsCleared() bool

HustlerWaistsCleared reports if the "hustler_waists" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerWaistsIDs

func (m *ItemMutation) HustlerWaistsIDs() (ids []string)

HustlerWaistsIDs returns the "hustler_waists" edge IDs in the mutation.

func (*ItemMutation) HustlerWeaponsCleared

func (m *ItemMutation) HustlerWeaponsCleared() bool

HustlerWeaponsCleared reports if the "hustler_weapons" edge to the Hustler entity was cleared.

func (*ItemMutation) HustlerWeaponsIDs

func (m *ItemMutation) HustlerWeaponsIDs() (ids []string)

HustlerWeaponsIDs returns the "hustler_weapons" edge IDs in the mutation.

func (*ItemMutation) ID

func (m *ItemMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ItemMutation) IDs

func (m *ItemMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ItemMutation) IndexCleared

func (m *ItemMutation) IndexCleared() bool

IndexCleared reports if the "index" edge to the Search entity was cleared.

func (*ItemMutation) IndexID

func (m *ItemMutation) IndexID() (id string, exists bool)

IndexID returns the "index" edge ID in the mutation.

func (*ItemMutation) IndexIDs

func (m *ItemMutation) IndexIDs() (ids []string)

IndexIDs returns the "index" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IndexID instead. It exists only for internal usage by the builders.

func (*ItemMutation) Name

func (m *ItemMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ItemMutation) NamePrefix

func (m *ItemMutation) NamePrefix() (r string, exists bool)

NamePrefix returns the value of the "name_prefix" field in the mutation.

func (*ItemMutation) NamePrefixCleared

func (m *ItemMutation) NamePrefixCleared() bool

NamePrefixCleared returns if the "name_prefix" field was cleared in this mutation.

func (*ItemMutation) NameSuffix

func (m *ItemMutation) NameSuffix() (r string, exists bool)

NameSuffix returns the value of the "name_suffix" field in the mutation.

func (*ItemMutation) NameSuffixCleared

func (m *ItemMutation) NameSuffixCleared() bool

NameSuffixCleared returns if the "name_suffix" field was cleared in this mutation.

func (*ItemMutation) OldAugmented

func (m *ItemMutation) OldAugmented(ctx context.Context) (v bool, err error)

OldAugmented returns the old "augmented" field's value of the Item entity. If the Item 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 (*ItemMutation) OldCount

func (m *ItemMutation) OldCount(ctx context.Context) (v int, err error)

OldCount returns the old "count" field's value of the Item entity. If the Item 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 (*ItemMutation) OldField

func (m *ItemMutation) 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 (*ItemMutation) OldGreatness

func (m *ItemMutation) OldGreatness(ctx context.Context) (v int, err error)

OldGreatness returns the old "greatness" field's value of the Item entity. If the Item 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 (*ItemMutation) OldName

func (m *ItemMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Item entity. If the Item 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 (*ItemMutation) OldNamePrefix

func (m *ItemMutation) OldNamePrefix(ctx context.Context) (v string, err error)

OldNamePrefix returns the old "name_prefix" field's value of the Item entity. If the Item 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 (*ItemMutation) OldNameSuffix

func (m *ItemMutation) OldNameSuffix(ctx context.Context) (v string, err error)

OldNameSuffix returns the old "name_suffix" field's value of the Item entity. If the Item 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 (*ItemMutation) OldRles

func (m *ItemMutation) OldRles(ctx context.Context) (v schema.RLEs, err error)

OldRles returns the old "rles" field's value of the Item entity. If the Item 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 (*ItemMutation) OldSprite

func (m *ItemMutation) OldSprite(ctx context.Context) (v schema.Sprites, err error)

OldSprite returns the old "sprite" field's value of the Item entity. If the Item 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 (*ItemMutation) OldSuffix

func (m *ItemMutation) OldSuffix(ctx context.Context) (v string, err error)

OldSuffix returns the old "suffix" field's value of the Item entity. If the Item 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 (*ItemMutation) OldSvg

func (m *ItemMutation) OldSvg(ctx context.Context) (v string, err error)

OldSvg returns the old "svg" field's value of the Item entity. If the Item 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 (*ItemMutation) OldTier

func (m *ItemMutation) OldTier(ctx context.Context) (v item.Tier, err error)

OldTier returns the old "tier" field's value of the Item entity. If the Item 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 (*ItemMutation) OldType

func (m *ItemMutation) OldType(ctx context.Context) (v item.Type, err error)

OldType returns the old "type" field's value of the Item entity. If the Item 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 (*ItemMutation) Op

func (m *ItemMutation) Op() Op

Op returns the operation name.

func (*ItemMutation) RemoveDerivativeIDs

func (m *ItemMutation) RemoveDerivativeIDs(ids ...string)

RemoveDerivativeIDs removes the "derivative" edge to the Item entity by IDs.

func (*ItemMutation) RemoveDopeIDs

func (m *ItemMutation) RemoveDopeIDs(ids ...string)

RemoveDopeIDs removes the "dopes" edge to the Dope entity by IDs.

func (*ItemMutation) RemoveHustlerAccessoryIDs

func (m *ItemMutation) RemoveHustlerAccessoryIDs(ids ...string)

RemoveHustlerAccessoryIDs removes the "hustler_accessories" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerClotheIDs

func (m *ItemMutation) RemoveHustlerClotheIDs(ids ...string)

RemoveHustlerClotheIDs removes the "hustler_clothes" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerDrugIDs

func (m *ItemMutation) RemoveHustlerDrugIDs(ids ...string)

RemoveHustlerDrugIDs removes the "hustler_drugs" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerFeetIDs

func (m *ItemMutation) RemoveHustlerFeetIDs(ids ...string)

RemoveHustlerFeetIDs removes the "hustler_feet" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerHandIDs

func (m *ItemMutation) RemoveHustlerHandIDs(ids ...string)

RemoveHustlerHandIDs removes the "hustler_hands" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerNeckIDs

func (m *ItemMutation) RemoveHustlerNeckIDs(ids ...string)

RemoveHustlerNeckIDs removes the "hustler_necks" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerRingIDs

func (m *ItemMutation) RemoveHustlerRingIDs(ids ...string)

RemoveHustlerRingIDs removes the "hustler_rings" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerVehicleIDs

func (m *ItemMutation) RemoveHustlerVehicleIDs(ids ...string)

RemoveHustlerVehicleIDs removes the "hustler_vehicles" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerWaistIDs

func (m *ItemMutation) RemoveHustlerWaistIDs(ids ...string)

RemoveHustlerWaistIDs removes the "hustler_waists" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveHustlerWeaponIDs

func (m *ItemMutation) RemoveHustlerWeaponIDs(ids ...string)

RemoveHustlerWeaponIDs removes the "hustler_weapons" edge to the Hustler entity by IDs.

func (*ItemMutation) RemoveWalletIDs

func (m *ItemMutation) RemoveWalletIDs(ids ...string)

RemoveWalletIDs removes the "wallets" edge to the WalletItems entity by IDs.

func (*ItemMutation) RemovedDerivativeIDs

func (m *ItemMutation) RemovedDerivativeIDs() (ids []string)

RemovedDerivative returns the removed IDs of the "derivative" edge to the Item entity.

func (*ItemMutation) RemovedDopesIDs

func (m *ItemMutation) RemovedDopesIDs() (ids []string)

RemovedDopes returns the removed IDs of the "dopes" edge to the Dope entity.

func (*ItemMutation) RemovedEdges

func (m *ItemMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ItemMutation) RemovedHustlerAccessoriesIDs

func (m *ItemMutation) RemovedHustlerAccessoriesIDs() (ids []string)

RemovedHustlerAccessories returns the removed IDs of the "hustler_accessories" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerClothesIDs

func (m *ItemMutation) RemovedHustlerClothesIDs() (ids []string)

RemovedHustlerClothes returns the removed IDs of the "hustler_clothes" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerDrugsIDs

func (m *ItemMutation) RemovedHustlerDrugsIDs() (ids []string)

RemovedHustlerDrugs returns the removed IDs of the "hustler_drugs" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerFeetIDs

func (m *ItemMutation) RemovedHustlerFeetIDs() (ids []string)

RemovedHustlerFeet returns the removed IDs of the "hustler_feet" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerHandsIDs

func (m *ItemMutation) RemovedHustlerHandsIDs() (ids []string)

RemovedHustlerHands returns the removed IDs of the "hustler_hands" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerNecksIDs

func (m *ItemMutation) RemovedHustlerNecksIDs() (ids []string)

RemovedHustlerNecks returns the removed IDs of the "hustler_necks" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerRingsIDs

func (m *ItemMutation) RemovedHustlerRingsIDs() (ids []string)

RemovedHustlerRings returns the removed IDs of the "hustler_rings" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerVehiclesIDs

func (m *ItemMutation) RemovedHustlerVehiclesIDs() (ids []string)

RemovedHustlerVehicles returns the removed IDs of the "hustler_vehicles" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerWaistsIDs

func (m *ItemMutation) RemovedHustlerWaistsIDs() (ids []string)

RemovedHustlerWaists returns the removed IDs of the "hustler_waists" edge to the Hustler entity.

func (*ItemMutation) RemovedHustlerWeaponsIDs

func (m *ItemMutation) RemovedHustlerWeaponsIDs() (ids []string)

RemovedHustlerWeapons returns the removed IDs of the "hustler_weapons" edge to the Hustler entity.

func (*ItemMutation) RemovedIDs

func (m *ItemMutation) 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 (*ItemMutation) RemovedWalletsIDs

func (m *ItemMutation) RemovedWalletsIDs() (ids []string)

RemovedWallets returns the removed IDs of the "wallets" edge to the WalletItems entity.

func (*ItemMutation) ResetAugmented

func (m *ItemMutation) ResetAugmented()

ResetAugmented resets all changes to the "augmented" field.

func (*ItemMutation) ResetBase

func (m *ItemMutation) ResetBase()

ResetBase resets all changes to the "base" edge.

func (*ItemMutation) ResetCount

func (m *ItemMutation) ResetCount()

ResetCount resets all changes to the "count" field.

func (*ItemMutation) ResetDerivative

func (m *ItemMutation) ResetDerivative()

ResetDerivative resets all changes to the "derivative" edge.

func (*ItemMutation) ResetDopes

func (m *ItemMutation) ResetDopes()

ResetDopes resets all changes to the "dopes" edge.

func (*ItemMutation) ResetEdge

func (m *ItemMutation) 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 (*ItemMutation) ResetField

func (m *ItemMutation) 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 (*ItemMutation) ResetGreatness

func (m *ItemMutation) ResetGreatness()

ResetGreatness resets all changes to the "greatness" field.

func (*ItemMutation) ResetHustlerAccessories

func (m *ItemMutation) ResetHustlerAccessories()

ResetHustlerAccessories resets all changes to the "hustler_accessories" edge.

func (*ItemMutation) ResetHustlerClothes

func (m *ItemMutation) ResetHustlerClothes()

ResetHustlerClothes resets all changes to the "hustler_clothes" edge.

func (*ItemMutation) ResetHustlerDrugs

func (m *ItemMutation) ResetHustlerDrugs()

ResetHustlerDrugs resets all changes to the "hustler_drugs" edge.

func (*ItemMutation) ResetHustlerFeet

func (m *ItemMutation) ResetHustlerFeet()

ResetHustlerFeet resets all changes to the "hustler_feet" edge.

func (*ItemMutation) ResetHustlerHands

func (m *ItemMutation) ResetHustlerHands()

ResetHustlerHands resets all changes to the "hustler_hands" edge.

func (*ItemMutation) ResetHustlerNecks

func (m *ItemMutation) ResetHustlerNecks()

ResetHustlerNecks resets all changes to the "hustler_necks" edge.

func (*ItemMutation) ResetHustlerRings

func (m *ItemMutation) ResetHustlerRings()

ResetHustlerRings resets all changes to the "hustler_rings" edge.

func (*ItemMutation) ResetHustlerVehicles

func (m *ItemMutation) ResetHustlerVehicles()

ResetHustlerVehicles resets all changes to the "hustler_vehicles" edge.

func (*ItemMutation) ResetHustlerWaists

func (m *ItemMutation) ResetHustlerWaists()

ResetHustlerWaists resets all changes to the "hustler_waists" edge.

func (*ItemMutation) ResetHustlerWeapons

func (m *ItemMutation) ResetHustlerWeapons()

ResetHustlerWeapons resets all changes to the "hustler_weapons" edge.

func (*ItemMutation) ResetIndex

func (m *ItemMutation) ResetIndex()

ResetIndex resets all changes to the "index" edge.

func (*ItemMutation) ResetName

func (m *ItemMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ItemMutation) ResetNamePrefix

func (m *ItemMutation) ResetNamePrefix()

ResetNamePrefix resets all changes to the "name_prefix" field.

func (*ItemMutation) ResetNameSuffix

func (m *ItemMutation) ResetNameSuffix()

ResetNameSuffix resets all changes to the "name_suffix" field.

func (*ItemMutation) ResetRles

func (m *ItemMutation) ResetRles()

ResetRles resets all changes to the "rles" field.

func (*ItemMutation) ResetSprite

func (m *ItemMutation) ResetSprite()

ResetSprite resets all changes to the "sprite" field.

func (*ItemMutation) ResetSuffix

func (m *ItemMutation) ResetSuffix()

ResetSuffix resets all changes to the "suffix" field.

func (*ItemMutation) ResetSvg

func (m *ItemMutation) ResetSvg()

ResetSvg resets all changes to the "svg" field.

func (*ItemMutation) ResetTier

func (m *ItemMutation) ResetTier()

ResetTier resets all changes to the "tier" field.

func (*ItemMutation) ResetType

func (m *ItemMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ItemMutation) ResetWallets

func (m *ItemMutation) ResetWallets()

ResetWallets resets all changes to the "wallets" edge.

func (*ItemMutation) Rles

func (m *ItemMutation) Rles() (r schema.RLEs, exists bool)

Rles returns the value of the "rles" field in the mutation.

func (*ItemMutation) RlesCleared

func (m *ItemMutation) RlesCleared() bool

RlesCleared returns if the "rles" field was cleared in this mutation.

func (*ItemMutation) SetAugmented

func (m *ItemMutation) SetAugmented(b bool)

SetAugmented sets the "augmented" field.

func (*ItemMutation) SetBaseID

func (m *ItemMutation) SetBaseID(id string)

SetBaseID sets the "base" edge to the Item entity by id.

func (*ItemMutation) SetCount

func (m *ItemMutation) SetCount(i int)

SetCount sets the "count" field.

func (*ItemMutation) SetField

func (m *ItemMutation) 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 (*ItemMutation) SetGreatness

func (m *ItemMutation) SetGreatness(i int)

SetGreatness sets the "greatness" field.

func (*ItemMutation) SetID

func (m *ItemMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Item entities.

func (*ItemMutation) SetIndexID

func (m *ItemMutation) SetIndexID(id string)

SetIndexID sets the "index" edge to the Search entity by id.

func (*ItemMutation) SetName

func (m *ItemMutation) SetName(s string)

SetName sets the "name" field.

func (*ItemMutation) SetNamePrefix

func (m *ItemMutation) SetNamePrefix(s string)

SetNamePrefix sets the "name_prefix" field.

func (*ItemMutation) SetNameSuffix

func (m *ItemMutation) SetNameSuffix(s string)

SetNameSuffix sets the "name_suffix" field.

func (*ItemMutation) SetRles

func (m *ItemMutation) SetRles(se schema.RLEs)

SetRles sets the "rles" field.

func (*ItemMutation) SetSprite

func (m *ItemMutation) SetSprite(s schema.Sprites)

SetSprite sets the "sprite" field.

func (*ItemMutation) SetSuffix

func (m *ItemMutation) SetSuffix(s string)

SetSuffix sets the "suffix" field.

func (*ItemMutation) SetSvg

func (m *ItemMutation) SetSvg(s string)

SetSvg sets the "svg" field.

func (*ItemMutation) SetTier

func (m *ItemMutation) SetTier(i item.Tier)

SetTier sets the "tier" field.

func (*ItemMutation) SetType

func (m *ItemMutation) SetType(i item.Type)

SetType sets the "type" field.

func (*ItemMutation) Sprite

func (m *ItemMutation) Sprite() (r schema.Sprites, exists bool)

Sprite returns the value of the "sprite" field in the mutation.

func (*ItemMutation) SpriteCleared

func (m *ItemMutation) SpriteCleared() bool

SpriteCleared returns if the "sprite" field was cleared in this mutation.

func (*ItemMutation) Suffix

func (m *ItemMutation) Suffix() (r string, exists bool)

Suffix returns the value of the "suffix" field in the mutation.

func (*ItemMutation) SuffixCleared

func (m *ItemMutation) SuffixCleared() bool

SuffixCleared returns if the "suffix" field was cleared in this mutation.

func (*ItemMutation) Svg

func (m *ItemMutation) Svg() (r string, exists bool)

Svg returns the value of the "svg" field in the mutation.

func (*ItemMutation) SvgCleared

func (m *ItemMutation) SvgCleared() bool

SvgCleared returns if the "svg" field was cleared in this mutation.

func (*ItemMutation) Tier

func (m *ItemMutation) Tier() (r item.Tier, exists bool)

Tier returns the value of the "tier" field in the mutation.

func (*ItemMutation) TierCleared

func (m *ItemMutation) TierCleared() bool

TierCleared returns if the "tier" field was cleared in this mutation.

func (ItemMutation) Tx

func (m ItemMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ItemMutation) Type

func (m *ItemMutation) Type() string

Type returns the node type of this mutation (Item).

func (*ItemMutation) WalletsCleared

func (m *ItemMutation) WalletsCleared() bool

WalletsCleared reports if the "wallets" edge to the WalletItems entity was cleared.

func (*ItemMutation) WalletsIDs

func (m *ItemMutation) WalletsIDs() (ids []string)

WalletsIDs returns the "wallets" edge IDs in the mutation.

func (*ItemMutation) Where

func (m *ItemMutation) Where(ps ...predicate.Item)

Where appends a list predicates to the ItemMutation builder.

type ItemOrder

type ItemOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *ItemOrderField `json:"field"`
}

ItemOrder defines the ordering of Item.

type ItemOrderField

type ItemOrderField struct {
	// contains filtered or unexported fields
}

ItemOrderField defines the ordering field of Item.

func (ItemOrderField) MarshalGQL

func (f ItemOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ItemOrderField) String

func (f ItemOrderField) String() string

String implement fmt.Stringer interface.

func (*ItemOrderField) UnmarshalGQL

func (f *ItemOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ItemPaginateOption

type ItemPaginateOption func(*itemPager) error

ItemPaginateOption enables pagination customization.

func WithItemFilter

func WithItemFilter(filter func(*ItemQuery) (*ItemQuery, error)) ItemPaginateOption

WithItemFilter configures pagination filter.

func WithItemOrder

func WithItemOrder(order *ItemOrder) ItemPaginateOption

WithItemOrder configures pagination ordering.

type ItemQuery

type ItemQuery struct {
	// contains filtered or unexported fields
}

ItemQuery is the builder for querying Item entities.

func (*ItemQuery) All

func (iq *ItemQuery) All(ctx context.Context) ([]*Item, error)

All executes the query and returns a list of Items.

func (*ItemQuery) AllX

func (iq *ItemQuery) AllX(ctx context.Context) []*Item

AllX is like All, but panics if an error occurs.

func (*ItemQuery) Clone

func (iq *ItemQuery) Clone() *ItemQuery

Clone returns a duplicate of the ItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ItemQuery) CollectFields

func (i *ItemQuery) CollectFields(ctx context.Context, satisfies ...string) *ItemQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ItemQuery) Count

func (iq *ItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ItemQuery) CountX

func (iq *ItemQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ItemQuery) Exist

func (iq *ItemQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ItemQuery) ExistX

func (iq *ItemQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ItemQuery) First

func (iq *ItemQuery) First(ctx context.Context) (*Item, error)

First returns the first Item entity from the query. Returns a *NotFoundError when no Item was found.

func (*ItemQuery) FirstID

func (iq *ItemQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Item ID from the query. Returns a *NotFoundError when no Item ID was found.

func (*ItemQuery) FirstIDX

func (iq *ItemQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*ItemQuery) FirstX

func (iq *ItemQuery) FirstX(ctx context.Context) *Item

FirstX is like First, but panics if an error occurs.

func (*ItemQuery) GroupBy

func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy

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 {
	Type item.Type `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Item.Query().
	GroupBy(item.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ItemQuery) IDs

func (iq *ItemQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Item IDs.

func (*ItemQuery) IDsX

func (iq *ItemQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*ItemQuery) Limit

func (iq *ItemQuery) Limit(limit int) *ItemQuery

Limit adds a limit step to the query.

func (*ItemQuery) Offset

func (iq *ItemQuery) Offset(offset int) *ItemQuery

Offset adds an offset step to the query.

func (*ItemQuery) Only

func (iq *ItemQuery) Only(ctx context.Context) (*Item, error)

Only returns a single Item entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Item entity is found. Returns a *NotFoundError when no Item entities are found.

func (*ItemQuery) OnlyID

func (iq *ItemQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Item ID in the query. Returns a *NotSingularError when more than one Item ID is found. Returns a *NotFoundError when no entities are found.

func (*ItemQuery) OnlyIDX

func (iq *ItemQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ItemQuery) OnlyX

func (iq *ItemQuery) OnlyX(ctx context.Context) *Item

OnlyX is like Only, but panics if an error occurs.

func (*ItemQuery) Order

func (iq *ItemQuery) Order(o ...OrderFunc) *ItemQuery

Order adds an order step to the query.

func (*ItemQuery) Paginate

func (i *ItemQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ItemPaginateOption,
) (*ItemConnection, error)

Paginate executes the query and returns a relay based cursor connection to Item.

func (*ItemQuery) QueryBase

func (iq *ItemQuery) QueryBase() *ItemQuery

QueryBase chains the current query on the "base" edge.

func (*ItemQuery) QueryDerivative

func (iq *ItemQuery) QueryDerivative() *ItemQuery

QueryDerivative chains the current query on the "derivative" edge.

func (*ItemQuery) QueryDopes

func (iq *ItemQuery) QueryDopes() *DopeQuery

QueryDopes chains the current query on the "dopes" edge.

func (*ItemQuery) QueryHustlerAccessories

func (iq *ItemQuery) QueryHustlerAccessories() *HustlerQuery

QueryHustlerAccessories chains the current query on the "hustler_accessories" edge.

func (*ItemQuery) QueryHustlerClothes

func (iq *ItemQuery) QueryHustlerClothes() *HustlerQuery

QueryHustlerClothes chains the current query on the "hustler_clothes" edge.

func (*ItemQuery) QueryHustlerDrugs

func (iq *ItemQuery) QueryHustlerDrugs() *HustlerQuery

QueryHustlerDrugs chains the current query on the "hustler_drugs" edge.

func (*ItemQuery) QueryHustlerFeet

func (iq *ItemQuery) QueryHustlerFeet() *HustlerQuery

QueryHustlerFeet chains the current query on the "hustler_feet" edge.

func (*ItemQuery) QueryHustlerHands

func (iq *ItemQuery) QueryHustlerHands() *HustlerQuery

QueryHustlerHands chains the current query on the "hustler_hands" edge.

func (*ItemQuery) QueryHustlerNecks

func (iq *ItemQuery) QueryHustlerNecks() *HustlerQuery

QueryHustlerNecks chains the current query on the "hustler_necks" edge.

func (*ItemQuery) QueryHustlerRings

func (iq *ItemQuery) QueryHustlerRings() *HustlerQuery

QueryHustlerRings chains the current query on the "hustler_rings" edge.

func (*ItemQuery) QueryHustlerVehicles

func (iq *ItemQuery) QueryHustlerVehicles() *HustlerQuery

QueryHustlerVehicles chains the current query on the "hustler_vehicles" edge.

func (*ItemQuery) QueryHustlerWaists

func (iq *ItemQuery) QueryHustlerWaists() *HustlerQuery

QueryHustlerWaists chains the current query on the "hustler_waists" edge.

func (*ItemQuery) QueryHustlerWeapons

func (iq *ItemQuery) QueryHustlerWeapons() *HustlerQuery

QueryHustlerWeapons chains the current query on the "hustler_weapons" edge.

func (*ItemQuery) QueryIndex

func (iq *ItemQuery) QueryIndex() *SearchQuery

QueryIndex chains the current query on the "index" edge.

func (*ItemQuery) QueryWallets

func (iq *ItemQuery) QueryWallets() *WalletItemsQuery

QueryWallets chains the current query on the "wallets" edge.

func (*ItemQuery) Select

func (iq *ItemQuery) Select(fields ...string) *ItemSelect

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 {
	Type item.Type `json:"type,omitempty"`
}

client.Item.Query().
	Select(item.FieldType).
	Scan(ctx, &v)

func (*ItemQuery) Unique

func (iq *ItemQuery) Unique(unique bool) *ItemQuery

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 (*ItemQuery) Where

func (iq *ItemQuery) Where(ps ...predicate.Item) *ItemQuery

Where adds a new predicate for the ItemQuery builder.

func (*ItemQuery) WithBase

func (iq *ItemQuery) WithBase(opts ...func(*ItemQuery)) *ItemQuery

WithBase tells the query-builder to eager-load the nodes that are connected to the "base" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithDerivative

func (iq *ItemQuery) WithDerivative(opts ...func(*ItemQuery)) *ItemQuery

WithDerivative tells the query-builder to eager-load the nodes that are connected to the "derivative" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithDopes

func (iq *ItemQuery) WithDopes(opts ...func(*DopeQuery)) *ItemQuery

WithDopes tells the query-builder to eager-load the nodes that are connected to the "dopes" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerAccessories

func (iq *ItemQuery) WithHustlerAccessories(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerAccessories tells the query-builder to eager-load the nodes that are connected to the "hustler_accessories" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerClothes

func (iq *ItemQuery) WithHustlerClothes(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerClothes tells the query-builder to eager-load the nodes that are connected to the "hustler_clothes" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerDrugs

func (iq *ItemQuery) WithHustlerDrugs(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerDrugs tells the query-builder to eager-load the nodes that are connected to the "hustler_drugs" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerFeet

func (iq *ItemQuery) WithHustlerFeet(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerFeet tells the query-builder to eager-load the nodes that are connected to the "hustler_feet" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerHands

func (iq *ItemQuery) WithHustlerHands(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerHands tells the query-builder to eager-load the nodes that are connected to the "hustler_hands" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerNecks

func (iq *ItemQuery) WithHustlerNecks(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerNecks tells the query-builder to eager-load the nodes that are connected to the "hustler_necks" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerRings

func (iq *ItemQuery) WithHustlerRings(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerRings tells the query-builder to eager-load the nodes that are connected to the "hustler_rings" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerVehicles

func (iq *ItemQuery) WithHustlerVehicles(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerVehicles tells the query-builder to eager-load the nodes that are connected to the "hustler_vehicles" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerWaists

func (iq *ItemQuery) WithHustlerWaists(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerWaists tells the query-builder to eager-load the nodes that are connected to the "hustler_waists" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithHustlerWeapons

func (iq *ItemQuery) WithHustlerWeapons(opts ...func(*HustlerQuery)) *ItemQuery

WithHustlerWeapons tells the query-builder to eager-load the nodes that are connected to the "hustler_weapons" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithIndex

func (iq *ItemQuery) WithIndex(opts ...func(*SearchQuery)) *ItemQuery

WithIndex tells the query-builder to eager-load the nodes that are connected to the "index" edge. The optional arguments are used to configure the query builder of the edge.

func (*ItemQuery) WithWallets

func (iq *ItemQuery) WithWallets(opts ...func(*WalletItemsQuery)) *ItemQuery

WithWallets tells the query-builder to eager-load the nodes that are connected to the "wallets" edge. The optional arguments are used to configure the query builder of the edge.

type ItemSelect

type ItemSelect struct {
	*ItemQuery
	// contains filtered or unexported fields
}

ItemSelect is the builder for selecting fields of Item entities.

func (*ItemSelect) Bool

func (is *ItemSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ItemSelect) BoolX

func (is *ItemSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ItemSelect) Bools

func (is *ItemSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ItemSelect) BoolsX

func (is *ItemSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ItemSelect) Float64

func (is *ItemSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ItemSelect) Float64X

func (is *ItemSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ItemSelect) Float64s

func (is *ItemSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ItemSelect) Float64sX

func (is *ItemSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ItemSelect) Int

func (is *ItemSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ItemSelect) IntX

func (is *ItemSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ItemSelect) Ints

func (is *ItemSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ItemSelect) IntsX

func (is *ItemSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ItemSelect) Scan

func (is *ItemSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*ItemSelect) ScanX

func (is *ItemSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ItemSelect) String

func (is *ItemSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ItemSelect) StringX

func (is *ItemSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ItemSelect) Strings

func (is *ItemSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ItemSelect) StringsX

func (is *ItemSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ItemUpdate

type ItemUpdate struct {
	// contains filtered or unexported fields
}

ItemUpdate is the builder for updating Item entities.

func (*ItemUpdate) AddCount

func (iu *ItemUpdate) AddCount(i int) *ItemUpdate

AddCount adds i to the "count" field.

func (*ItemUpdate) AddDerivative

func (iu *ItemUpdate) AddDerivative(i ...*Item) *ItemUpdate

AddDerivative adds the "derivative" edges to the Item entity.

func (*ItemUpdate) AddDerivativeIDs

func (iu *ItemUpdate) AddDerivativeIDs(ids ...string) *ItemUpdate

AddDerivativeIDs adds the "derivative" edge to the Item entity by IDs.

func (*ItemUpdate) AddDopeIDs

func (iu *ItemUpdate) AddDopeIDs(ids ...string) *ItemUpdate

AddDopeIDs adds the "dopes" edge to the Dope entity by IDs.

func (*ItemUpdate) AddDopes

func (iu *ItemUpdate) AddDopes(d ...*Dope) *ItemUpdate

AddDopes adds the "dopes" edges to the Dope entity.

func (*ItemUpdate) AddGreatness

func (iu *ItemUpdate) AddGreatness(i int) *ItemUpdate

AddGreatness adds i to the "greatness" field.

func (*ItemUpdate) AddHustlerAccessories

func (iu *ItemUpdate) AddHustlerAccessories(h ...*Hustler) *ItemUpdate

AddHustlerAccessories adds the "hustler_accessories" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerAccessoryIDs

func (iu *ItemUpdate) AddHustlerAccessoryIDs(ids ...string) *ItemUpdate

AddHustlerAccessoryIDs adds the "hustler_accessories" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerClotheIDs

func (iu *ItemUpdate) AddHustlerClotheIDs(ids ...string) *ItemUpdate

AddHustlerClotheIDs adds the "hustler_clothes" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerClothes

func (iu *ItemUpdate) AddHustlerClothes(h ...*Hustler) *ItemUpdate

AddHustlerClothes adds the "hustler_clothes" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerDrugIDs

func (iu *ItemUpdate) AddHustlerDrugIDs(ids ...string) *ItemUpdate

AddHustlerDrugIDs adds the "hustler_drugs" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerDrugs

func (iu *ItemUpdate) AddHustlerDrugs(h ...*Hustler) *ItemUpdate

AddHustlerDrugs adds the "hustler_drugs" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerFeet

func (iu *ItemUpdate) AddHustlerFeet(h ...*Hustler) *ItemUpdate

AddHustlerFeet adds the "hustler_feet" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerFeetIDs

func (iu *ItemUpdate) AddHustlerFeetIDs(ids ...string) *ItemUpdate

AddHustlerFeetIDs adds the "hustler_feet" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerHandIDs

func (iu *ItemUpdate) AddHustlerHandIDs(ids ...string) *ItemUpdate

AddHustlerHandIDs adds the "hustler_hands" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerHands

func (iu *ItemUpdate) AddHustlerHands(h ...*Hustler) *ItemUpdate

AddHustlerHands adds the "hustler_hands" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerNeckIDs

func (iu *ItemUpdate) AddHustlerNeckIDs(ids ...string) *ItemUpdate

AddHustlerNeckIDs adds the "hustler_necks" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerNecks

func (iu *ItemUpdate) AddHustlerNecks(h ...*Hustler) *ItemUpdate

AddHustlerNecks adds the "hustler_necks" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerRingIDs

func (iu *ItemUpdate) AddHustlerRingIDs(ids ...string) *ItemUpdate

AddHustlerRingIDs adds the "hustler_rings" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerRings

func (iu *ItemUpdate) AddHustlerRings(h ...*Hustler) *ItemUpdate

AddHustlerRings adds the "hustler_rings" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerVehicleIDs

func (iu *ItemUpdate) AddHustlerVehicleIDs(ids ...string) *ItemUpdate

AddHustlerVehicleIDs adds the "hustler_vehicles" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerVehicles

func (iu *ItemUpdate) AddHustlerVehicles(h ...*Hustler) *ItemUpdate

AddHustlerVehicles adds the "hustler_vehicles" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerWaistIDs

func (iu *ItemUpdate) AddHustlerWaistIDs(ids ...string) *ItemUpdate

AddHustlerWaistIDs adds the "hustler_waists" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerWaists

func (iu *ItemUpdate) AddHustlerWaists(h ...*Hustler) *ItemUpdate

AddHustlerWaists adds the "hustler_waists" edges to the Hustler entity.

func (*ItemUpdate) AddHustlerWeaponIDs

func (iu *ItemUpdate) AddHustlerWeaponIDs(ids ...string) *ItemUpdate

AddHustlerWeaponIDs adds the "hustler_weapons" edge to the Hustler entity by IDs.

func (*ItemUpdate) AddHustlerWeapons

func (iu *ItemUpdate) AddHustlerWeapons(h ...*Hustler) *ItemUpdate

AddHustlerWeapons adds the "hustler_weapons" edges to the Hustler entity.

func (*ItemUpdate) AddWalletIDs

func (iu *ItemUpdate) AddWalletIDs(ids ...string) *ItemUpdate

AddWalletIDs adds the "wallets" edge to the WalletItems entity by IDs.

func (*ItemUpdate) AddWallets

func (iu *ItemUpdate) AddWallets(w ...*WalletItems) *ItemUpdate

AddWallets adds the "wallets" edges to the WalletItems entity.

func (*ItemUpdate) ClearBase

func (iu *ItemUpdate) ClearBase() *ItemUpdate

ClearBase clears the "base" edge to the Item entity.

func (*ItemUpdate) ClearCount

func (iu *ItemUpdate) ClearCount() *ItemUpdate

ClearCount clears the value of the "count" field.

func (*ItemUpdate) ClearDerivative

func (iu *ItemUpdate) ClearDerivative() *ItemUpdate

ClearDerivative clears all "derivative" edges to the Item entity.

func (*ItemUpdate) ClearDopes

func (iu *ItemUpdate) ClearDopes() *ItemUpdate

ClearDopes clears all "dopes" edges to the Dope entity.

func (*ItemUpdate) ClearGreatness

func (iu *ItemUpdate) ClearGreatness() *ItemUpdate

ClearGreatness clears the value of the "greatness" field.

func (*ItemUpdate) ClearHustlerAccessories

func (iu *ItemUpdate) ClearHustlerAccessories() *ItemUpdate

ClearHustlerAccessories clears all "hustler_accessories" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerClothes

func (iu *ItemUpdate) ClearHustlerClothes() *ItemUpdate

ClearHustlerClothes clears all "hustler_clothes" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerDrugs

func (iu *ItemUpdate) ClearHustlerDrugs() *ItemUpdate

ClearHustlerDrugs clears all "hustler_drugs" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerFeet

func (iu *ItemUpdate) ClearHustlerFeet() *ItemUpdate

ClearHustlerFeet clears all "hustler_feet" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerHands

func (iu *ItemUpdate) ClearHustlerHands() *ItemUpdate

ClearHustlerHands clears all "hustler_hands" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerNecks

func (iu *ItemUpdate) ClearHustlerNecks() *ItemUpdate

ClearHustlerNecks clears all "hustler_necks" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerRings

func (iu *ItemUpdate) ClearHustlerRings() *ItemUpdate

ClearHustlerRings clears all "hustler_rings" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerVehicles

func (iu *ItemUpdate) ClearHustlerVehicles() *ItemUpdate

ClearHustlerVehicles clears all "hustler_vehicles" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerWaists

func (iu *ItemUpdate) ClearHustlerWaists() *ItemUpdate

ClearHustlerWaists clears all "hustler_waists" edges to the Hustler entity.

func (*ItemUpdate) ClearHustlerWeapons

func (iu *ItemUpdate) ClearHustlerWeapons() *ItemUpdate

ClearHustlerWeapons clears all "hustler_weapons" edges to the Hustler entity.

func (*ItemUpdate) ClearIndex

func (iu *ItemUpdate) ClearIndex() *ItemUpdate

ClearIndex clears the "index" edge to the Search entity.

func (*ItemUpdate) ClearRles

func (iu *ItemUpdate) ClearRles() *ItemUpdate

ClearRles clears the value of the "rles" field.

func (*ItemUpdate) ClearSprite

func (iu *ItemUpdate) ClearSprite() *ItemUpdate

ClearSprite clears the value of the "sprite" field.

func (*ItemUpdate) ClearSvg

func (iu *ItemUpdate) ClearSvg() *ItemUpdate

ClearSvg clears the value of the "svg" field.

func (*ItemUpdate) ClearTier

func (iu *ItemUpdate) ClearTier() *ItemUpdate

ClearTier clears the value of the "tier" field.

func (*ItemUpdate) ClearWallets

func (iu *ItemUpdate) ClearWallets() *ItemUpdate

ClearWallets clears all "wallets" edges to the WalletItems entity.

func (*ItemUpdate) Exec

func (iu *ItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemUpdate) ExecX

func (iu *ItemUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemUpdate) Mutation

func (iu *ItemUpdate) Mutation() *ItemMutation

Mutation returns the ItemMutation object of the builder.

func (*ItemUpdate) RemoveDerivative

func (iu *ItemUpdate) RemoveDerivative(i ...*Item) *ItemUpdate

RemoveDerivative removes "derivative" edges to Item entities.

func (*ItemUpdate) RemoveDerivativeIDs

func (iu *ItemUpdate) RemoveDerivativeIDs(ids ...string) *ItemUpdate

RemoveDerivativeIDs removes the "derivative" edge to Item entities by IDs.

func (*ItemUpdate) RemoveDopeIDs

func (iu *ItemUpdate) RemoveDopeIDs(ids ...string) *ItemUpdate

RemoveDopeIDs removes the "dopes" edge to Dope entities by IDs.

func (*ItemUpdate) RemoveDopes

func (iu *ItemUpdate) RemoveDopes(d ...*Dope) *ItemUpdate

RemoveDopes removes "dopes" edges to Dope entities.

func (*ItemUpdate) RemoveHustlerAccessories

func (iu *ItemUpdate) RemoveHustlerAccessories(h ...*Hustler) *ItemUpdate

RemoveHustlerAccessories removes "hustler_accessories" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerAccessoryIDs

func (iu *ItemUpdate) RemoveHustlerAccessoryIDs(ids ...string) *ItemUpdate

RemoveHustlerAccessoryIDs removes the "hustler_accessories" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerClotheIDs

func (iu *ItemUpdate) RemoveHustlerClotheIDs(ids ...string) *ItemUpdate

RemoveHustlerClotheIDs removes the "hustler_clothes" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerClothes

func (iu *ItemUpdate) RemoveHustlerClothes(h ...*Hustler) *ItemUpdate

RemoveHustlerClothes removes "hustler_clothes" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerDrugIDs

func (iu *ItemUpdate) RemoveHustlerDrugIDs(ids ...string) *ItemUpdate

RemoveHustlerDrugIDs removes the "hustler_drugs" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerDrugs

func (iu *ItemUpdate) RemoveHustlerDrugs(h ...*Hustler) *ItemUpdate

RemoveHustlerDrugs removes "hustler_drugs" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerFeet

func (iu *ItemUpdate) RemoveHustlerFeet(h ...*Hustler) *ItemUpdate

RemoveHustlerFeet removes "hustler_feet" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerFeetIDs

func (iu *ItemUpdate) RemoveHustlerFeetIDs(ids ...string) *ItemUpdate

RemoveHustlerFeetIDs removes the "hustler_feet" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerHandIDs

func (iu *ItemUpdate) RemoveHustlerHandIDs(ids ...string) *ItemUpdate

RemoveHustlerHandIDs removes the "hustler_hands" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerHands

func (iu *ItemUpdate) RemoveHustlerHands(h ...*Hustler) *ItemUpdate

RemoveHustlerHands removes "hustler_hands" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerNeckIDs

func (iu *ItemUpdate) RemoveHustlerNeckIDs(ids ...string) *ItemUpdate

RemoveHustlerNeckIDs removes the "hustler_necks" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerNecks

func (iu *ItemUpdate) RemoveHustlerNecks(h ...*Hustler) *ItemUpdate

RemoveHustlerNecks removes "hustler_necks" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerRingIDs

func (iu *ItemUpdate) RemoveHustlerRingIDs(ids ...string) *ItemUpdate

RemoveHustlerRingIDs removes the "hustler_rings" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerRings

func (iu *ItemUpdate) RemoveHustlerRings(h ...*Hustler) *ItemUpdate

RemoveHustlerRings removes "hustler_rings" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerVehicleIDs

func (iu *ItemUpdate) RemoveHustlerVehicleIDs(ids ...string) *ItemUpdate

RemoveHustlerVehicleIDs removes the "hustler_vehicles" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerVehicles

func (iu *ItemUpdate) RemoveHustlerVehicles(h ...*Hustler) *ItemUpdate

RemoveHustlerVehicles removes "hustler_vehicles" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerWaistIDs

func (iu *ItemUpdate) RemoveHustlerWaistIDs(ids ...string) *ItemUpdate

RemoveHustlerWaistIDs removes the "hustler_waists" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerWaists

func (iu *ItemUpdate) RemoveHustlerWaists(h ...*Hustler) *ItemUpdate

RemoveHustlerWaists removes "hustler_waists" edges to Hustler entities.

func (*ItemUpdate) RemoveHustlerWeaponIDs

func (iu *ItemUpdate) RemoveHustlerWeaponIDs(ids ...string) *ItemUpdate

RemoveHustlerWeaponIDs removes the "hustler_weapons" edge to Hustler entities by IDs.

func (*ItemUpdate) RemoveHustlerWeapons

func (iu *ItemUpdate) RemoveHustlerWeapons(h ...*Hustler) *ItemUpdate

RemoveHustlerWeapons removes "hustler_weapons" edges to Hustler entities.

func (*ItemUpdate) RemoveWalletIDs

func (iu *ItemUpdate) RemoveWalletIDs(ids ...string) *ItemUpdate

RemoveWalletIDs removes the "wallets" edge to WalletItems entities by IDs.

func (*ItemUpdate) RemoveWallets

func (iu *ItemUpdate) RemoveWallets(w ...*WalletItems) *ItemUpdate

RemoveWallets removes "wallets" edges to WalletItems entities.

func (*ItemUpdate) Save

func (iu *ItemUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ItemUpdate) SaveX

func (iu *ItemUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ItemUpdate) SetBase

func (iu *ItemUpdate) SetBase(i *Item) *ItemUpdate

SetBase sets the "base" edge to the Item entity.

func (*ItemUpdate) SetBaseID

func (iu *ItemUpdate) SetBaseID(id string) *ItemUpdate

SetBaseID sets the "base" edge to the Item entity by ID.

func (*ItemUpdate) SetCount

func (iu *ItemUpdate) SetCount(i int) *ItemUpdate

SetCount sets the "count" field.

func (*ItemUpdate) SetGreatness

func (iu *ItemUpdate) SetGreatness(i int) *ItemUpdate

SetGreatness sets the "greatness" field.

func (*ItemUpdate) SetIndex

func (iu *ItemUpdate) SetIndex(s *Search) *ItemUpdate

SetIndex sets the "index" edge to the Search entity.

func (*ItemUpdate) SetIndexID

func (iu *ItemUpdate) SetIndexID(id string) *ItemUpdate

SetIndexID sets the "index" edge to the Search entity by ID.

func (*ItemUpdate) SetNillableBaseID

func (iu *ItemUpdate) SetNillableBaseID(id *string) *ItemUpdate

SetNillableBaseID sets the "base" edge to the Item entity by ID if the given value is not nil.

func (*ItemUpdate) SetNillableCount

func (iu *ItemUpdate) SetNillableCount(i *int) *ItemUpdate

SetNillableCount sets the "count" field if the given value is not nil.

func (*ItemUpdate) SetNillableGreatness

func (iu *ItemUpdate) SetNillableGreatness(i *int) *ItemUpdate

SetNillableGreatness sets the "greatness" field if the given value is not nil.

func (*ItemUpdate) SetNillableIndexID

func (iu *ItemUpdate) SetNillableIndexID(id *string) *ItemUpdate

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*ItemUpdate) SetNillableRles

func (iu *ItemUpdate) SetNillableRles(se *schema.RLEs) *ItemUpdate

SetNillableRles sets the "rles" field if the given value is not nil.

func (*ItemUpdate) SetNillableSprite

func (iu *ItemUpdate) SetNillableSprite(s *schema.Sprites) *ItemUpdate

SetNillableSprite sets the "sprite" field if the given value is not nil.

func (*ItemUpdate) SetNillableSvg

func (iu *ItemUpdate) SetNillableSvg(s *string) *ItemUpdate

SetNillableSvg sets the "svg" field if the given value is not nil.

func (*ItemUpdate) SetNillableTier

func (iu *ItemUpdate) SetNillableTier(i *item.Tier) *ItemUpdate

SetNillableTier sets the "tier" field if the given value is not nil.

func (*ItemUpdate) SetRles

func (iu *ItemUpdate) SetRles(se schema.RLEs) *ItemUpdate

SetRles sets the "rles" field.

func (*ItemUpdate) SetSprite

func (iu *ItemUpdate) SetSprite(s schema.Sprites) *ItemUpdate

SetSprite sets the "sprite" field.

func (*ItemUpdate) SetSvg

func (iu *ItemUpdate) SetSvg(s string) *ItemUpdate

SetSvg sets the "svg" field.

func (*ItemUpdate) SetTier

func (iu *ItemUpdate) SetTier(i item.Tier) *ItemUpdate

SetTier sets the "tier" field.

func (*ItemUpdate) Where

func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate

Where appends a list predicates to the ItemUpdate builder.

type ItemUpdateOne

type ItemUpdateOne struct {
	// contains filtered or unexported fields
}

ItemUpdateOne is the builder for updating a single Item entity.

func (*ItemUpdateOne) AddCount

func (iuo *ItemUpdateOne) AddCount(i int) *ItemUpdateOne

AddCount adds i to the "count" field.

func (*ItemUpdateOne) AddDerivative

func (iuo *ItemUpdateOne) AddDerivative(i ...*Item) *ItemUpdateOne

AddDerivative adds the "derivative" edges to the Item entity.

func (*ItemUpdateOne) AddDerivativeIDs

func (iuo *ItemUpdateOne) AddDerivativeIDs(ids ...string) *ItemUpdateOne

AddDerivativeIDs adds the "derivative" edge to the Item entity by IDs.

func (*ItemUpdateOne) AddDopeIDs

func (iuo *ItemUpdateOne) AddDopeIDs(ids ...string) *ItemUpdateOne

AddDopeIDs adds the "dopes" edge to the Dope entity by IDs.

func (*ItemUpdateOne) AddDopes

func (iuo *ItemUpdateOne) AddDopes(d ...*Dope) *ItemUpdateOne

AddDopes adds the "dopes" edges to the Dope entity.

func (*ItemUpdateOne) AddGreatness

func (iuo *ItemUpdateOne) AddGreatness(i int) *ItemUpdateOne

AddGreatness adds i to the "greatness" field.

func (*ItemUpdateOne) AddHustlerAccessories

func (iuo *ItemUpdateOne) AddHustlerAccessories(h ...*Hustler) *ItemUpdateOne

AddHustlerAccessories adds the "hustler_accessories" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerAccessoryIDs

func (iuo *ItemUpdateOne) AddHustlerAccessoryIDs(ids ...string) *ItemUpdateOne

AddHustlerAccessoryIDs adds the "hustler_accessories" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerClotheIDs

func (iuo *ItemUpdateOne) AddHustlerClotheIDs(ids ...string) *ItemUpdateOne

AddHustlerClotheIDs adds the "hustler_clothes" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerClothes

func (iuo *ItemUpdateOne) AddHustlerClothes(h ...*Hustler) *ItemUpdateOne

AddHustlerClothes adds the "hustler_clothes" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerDrugIDs

func (iuo *ItemUpdateOne) AddHustlerDrugIDs(ids ...string) *ItemUpdateOne

AddHustlerDrugIDs adds the "hustler_drugs" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerDrugs

func (iuo *ItemUpdateOne) AddHustlerDrugs(h ...*Hustler) *ItemUpdateOne

AddHustlerDrugs adds the "hustler_drugs" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerFeet

func (iuo *ItemUpdateOne) AddHustlerFeet(h ...*Hustler) *ItemUpdateOne

AddHustlerFeet adds the "hustler_feet" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerFeetIDs

func (iuo *ItemUpdateOne) AddHustlerFeetIDs(ids ...string) *ItemUpdateOne

AddHustlerFeetIDs adds the "hustler_feet" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerHandIDs

func (iuo *ItemUpdateOne) AddHustlerHandIDs(ids ...string) *ItemUpdateOne

AddHustlerHandIDs adds the "hustler_hands" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerHands

func (iuo *ItemUpdateOne) AddHustlerHands(h ...*Hustler) *ItemUpdateOne

AddHustlerHands adds the "hustler_hands" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerNeckIDs

func (iuo *ItemUpdateOne) AddHustlerNeckIDs(ids ...string) *ItemUpdateOne

AddHustlerNeckIDs adds the "hustler_necks" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerNecks

func (iuo *ItemUpdateOne) AddHustlerNecks(h ...*Hustler) *ItemUpdateOne

AddHustlerNecks adds the "hustler_necks" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerRingIDs

func (iuo *ItemUpdateOne) AddHustlerRingIDs(ids ...string) *ItemUpdateOne

AddHustlerRingIDs adds the "hustler_rings" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerRings

func (iuo *ItemUpdateOne) AddHustlerRings(h ...*Hustler) *ItemUpdateOne

AddHustlerRings adds the "hustler_rings" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerVehicleIDs

func (iuo *ItemUpdateOne) AddHustlerVehicleIDs(ids ...string) *ItemUpdateOne

AddHustlerVehicleIDs adds the "hustler_vehicles" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerVehicles

func (iuo *ItemUpdateOne) AddHustlerVehicles(h ...*Hustler) *ItemUpdateOne

AddHustlerVehicles adds the "hustler_vehicles" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerWaistIDs

func (iuo *ItemUpdateOne) AddHustlerWaistIDs(ids ...string) *ItemUpdateOne

AddHustlerWaistIDs adds the "hustler_waists" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerWaists

func (iuo *ItemUpdateOne) AddHustlerWaists(h ...*Hustler) *ItemUpdateOne

AddHustlerWaists adds the "hustler_waists" edges to the Hustler entity.

func (*ItemUpdateOne) AddHustlerWeaponIDs

func (iuo *ItemUpdateOne) AddHustlerWeaponIDs(ids ...string) *ItemUpdateOne

AddHustlerWeaponIDs adds the "hustler_weapons" edge to the Hustler entity by IDs.

func (*ItemUpdateOne) AddHustlerWeapons

func (iuo *ItemUpdateOne) AddHustlerWeapons(h ...*Hustler) *ItemUpdateOne

AddHustlerWeapons adds the "hustler_weapons" edges to the Hustler entity.

func (*ItemUpdateOne) AddWalletIDs

func (iuo *ItemUpdateOne) AddWalletIDs(ids ...string) *ItemUpdateOne

AddWalletIDs adds the "wallets" edge to the WalletItems entity by IDs.

func (*ItemUpdateOne) AddWallets

func (iuo *ItemUpdateOne) AddWallets(w ...*WalletItems) *ItemUpdateOne

AddWallets adds the "wallets" edges to the WalletItems entity.

func (*ItemUpdateOne) ClearBase

func (iuo *ItemUpdateOne) ClearBase() *ItemUpdateOne

ClearBase clears the "base" edge to the Item entity.

func (*ItemUpdateOne) ClearCount

func (iuo *ItemUpdateOne) ClearCount() *ItemUpdateOne

ClearCount clears the value of the "count" field.

func (*ItemUpdateOne) ClearDerivative

func (iuo *ItemUpdateOne) ClearDerivative() *ItemUpdateOne

ClearDerivative clears all "derivative" edges to the Item entity.

func (*ItemUpdateOne) ClearDopes

func (iuo *ItemUpdateOne) ClearDopes() *ItemUpdateOne

ClearDopes clears all "dopes" edges to the Dope entity.

func (*ItemUpdateOne) ClearGreatness

func (iuo *ItemUpdateOne) ClearGreatness() *ItemUpdateOne

ClearGreatness clears the value of the "greatness" field.

func (*ItemUpdateOne) ClearHustlerAccessories

func (iuo *ItemUpdateOne) ClearHustlerAccessories() *ItemUpdateOne

ClearHustlerAccessories clears all "hustler_accessories" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerClothes

func (iuo *ItemUpdateOne) ClearHustlerClothes() *ItemUpdateOne

ClearHustlerClothes clears all "hustler_clothes" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerDrugs

func (iuo *ItemUpdateOne) ClearHustlerDrugs() *ItemUpdateOne

ClearHustlerDrugs clears all "hustler_drugs" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerFeet

func (iuo *ItemUpdateOne) ClearHustlerFeet() *ItemUpdateOne

ClearHustlerFeet clears all "hustler_feet" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerHands

func (iuo *ItemUpdateOne) ClearHustlerHands() *ItemUpdateOne

ClearHustlerHands clears all "hustler_hands" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerNecks

func (iuo *ItemUpdateOne) ClearHustlerNecks() *ItemUpdateOne

ClearHustlerNecks clears all "hustler_necks" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerRings

func (iuo *ItemUpdateOne) ClearHustlerRings() *ItemUpdateOne

ClearHustlerRings clears all "hustler_rings" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerVehicles

func (iuo *ItemUpdateOne) ClearHustlerVehicles() *ItemUpdateOne

ClearHustlerVehicles clears all "hustler_vehicles" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerWaists

func (iuo *ItemUpdateOne) ClearHustlerWaists() *ItemUpdateOne

ClearHustlerWaists clears all "hustler_waists" edges to the Hustler entity.

func (*ItemUpdateOne) ClearHustlerWeapons

func (iuo *ItemUpdateOne) ClearHustlerWeapons() *ItemUpdateOne

ClearHustlerWeapons clears all "hustler_weapons" edges to the Hustler entity.

func (*ItemUpdateOne) ClearIndex

func (iuo *ItemUpdateOne) ClearIndex() *ItemUpdateOne

ClearIndex clears the "index" edge to the Search entity.

func (*ItemUpdateOne) ClearRles

func (iuo *ItemUpdateOne) ClearRles() *ItemUpdateOne

ClearRles clears the value of the "rles" field.

func (*ItemUpdateOne) ClearSprite

func (iuo *ItemUpdateOne) ClearSprite() *ItemUpdateOne

ClearSprite clears the value of the "sprite" field.

func (*ItemUpdateOne) ClearSvg

func (iuo *ItemUpdateOne) ClearSvg() *ItemUpdateOne

ClearSvg clears the value of the "svg" field.

func (*ItemUpdateOne) ClearTier

func (iuo *ItemUpdateOne) ClearTier() *ItemUpdateOne

ClearTier clears the value of the "tier" field.

func (*ItemUpdateOne) ClearWallets

func (iuo *ItemUpdateOne) ClearWallets() *ItemUpdateOne

ClearWallets clears all "wallets" edges to the WalletItems entity.

func (*ItemUpdateOne) Exec

func (iuo *ItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ItemUpdateOne) ExecX

func (iuo *ItemUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemUpdateOne) Mutation

func (iuo *ItemUpdateOne) Mutation() *ItemMutation

Mutation returns the ItemMutation object of the builder.

func (*ItemUpdateOne) RemoveDerivative

func (iuo *ItemUpdateOne) RemoveDerivative(i ...*Item) *ItemUpdateOne

RemoveDerivative removes "derivative" edges to Item entities.

func (*ItemUpdateOne) RemoveDerivativeIDs

func (iuo *ItemUpdateOne) RemoveDerivativeIDs(ids ...string) *ItemUpdateOne

RemoveDerivativeIDs removes the "derivative" edge to Item entities by IDs.

func (*ItemUpdateOne) RemoveDopeIDs

func (iuo *ItemUpdateOne) RemoveDopeIDs(ids ...string) *ItemUpdateOne

RemoveDopeIDs removes the "dopes" edge to Dope entities by IDs.

func (*ItemUpdateOne) RemoveDopes

func (iuo *ItemUpdateOne) RemoveDopes(d ...*Dope) *ItemUpdateOne

RemoveDopes removes "dopes" edges to Dope entities.

func (*ItemUpdateOne) RemoveHustlerAccessories

func (iuo *ItemUpdateOne) RemoveHustlerAccessories(h ...*Hustler) *ItemUpdateOne

RemoveHustlerAccessories removes "hustler_accessories" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerAccessoryIDs

func (iuo *ItemUpdateOne) RemoveHustlerAccessoryIDs(ids ...string) *ItemUpdateOne

RemoveHustlerAccessoryIDs removes the "hustler_accessories" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerClotheIDs

func (iuo *ItemUpdateOne) RemoveHustlerClotheIDs(ids ...string) *ItemUpdateOne

RemoveHustlerClotheIDs removes the "hustler_clothes" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerClothes

func (iuo *ItemUpdateOne) RemoveHustlerClothes(h ...*Hustler) *ItemUpdateOne

RemoveHustlerClothes removes "hustler_clothes" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerDrugIDs

func (iuo *ItemUpdateOne) RemoveHustlerDrugIDs(ids ...string) *ItemUpdateOne

RemoveHustlerDrugIDs removes the "hustler_drugs" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerDrugs

func (iuo *ItemUpdateOne) RemoveHustlerDrugs(h ...*Hustler) *ItemUpdateOne

RemoveHustlerDrugs removes "hustler_drugs" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerFeet

func (iuo *ItemUpdateOne) RemoveHustlerFeet(h ...*Hustler) *ItemUpdateOne

RemoveHustlerFeet removes "hustler_feet" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerFeetIDs

func (iuo *ItemUpdateOne) RemoveHustlerFeetIDs(ids ...string) *ItemUpdateOne

RemoveHustlerFeetIDs removes the "hustler_feet" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerHandIDs

func (iuo *ItemUpdateOne) RemoveHustlerHandIDs(ids ...string) *ItemUpdateOne

RemoveHustlerHandIDs removes the "hustler_hands" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerHands

func (iuo *ItemUpdateOne) RemoveHustlerHands(h ...*Hustler) *ItemUpdateOne

RemoveHustlerHands removes "hustler_hands" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerNeckIDs

func (iuo *ItemUpdateOne) RemoveHustlerNeckIDs(ids ...string) *ItemUpdateOne

RemoveHustlerNeckIDs removes the "hustler_necks" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerNecks

func (iuo *ItemUpdateOne) RemoveHustlerNecks(h ...*Hustler) *ItemUpdateOne

RemoveHustlerNecks removes "hustler_necks" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerRingIDs

func (iuo *ItemUpdateOne) RemoveHustlerRingIDs(ids ...string) *ItemUpdateOne

RemoveHustlerRingIDs removes the "hustler_rings" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerRings

func (iuo *ItemUpdateOne) RemoveHustlerRings(h ...*Hustler) *ItemUpdateOne

RemoveHustlerRings removes "hustler_rings" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerVehicleIDs

func (iuo *ItemUpdateOne) RemoveHustlerVehicleIDs(ids ...string) *ItemUpdateOne

RemoveHustlerVehicleIDs removes the "hustler_vehicles" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerVehicles

func (iuo *ItemUpdateOne) RemoveHustlerVehicles(h ...*Hustler) *ItemUpdateOne

RemoveHustlerVehicles removes "hustler_vehicles" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerWaistIDs

func (iuo *ItemUpdateOne) RemoveHustlerWaistIDs(ids ...string) *ItemUpdateOne

RemoveHustlerWaistIDs removes the "hustler_waists" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerWaists

func (iuo *ItemUpdateOne) RemoveHustlerWaists(h ...*Hustler) *ItemUpdateOne

RemoveHustlerWaists removes "hustler_waists" edges to Hustler entities.

func (*ItemUpdateOne) RemoveHustlerWeaponIDs

func (iuo *ItemUpdateOne) RemoveHustlerWeaponIDs(ids ...string) *ItemUpdateOne

RemoveHustlerWeaponIDs removes the "hustler_weapons" edge to Hustler entities by IDs.

func (*ItemUpdateOne) RemoveHustlerWeapons

func (iuo *ItemUpdateOne) RemoveHustlerWeapons(h ...*Hustler) *ItemUpdateOne

RemoveHustlerWeapons removes "hustler_weapons" edges to Hustler entities.

func (*ItemUpdateOne) RemoveWalletIDs

func (iuo *ItemUpdateOne) RemoveWalletIDs(ids ...string) *ItemUpdateOne

RemoveWalletIDs removes the "wallets" edge to WalletItems entities by IDs.

func (*ItemUpdateOne) RemoveWallets

func (iuo *ItemUpdateOne) RemoveWallets(w ...*WalletItems) *ItemUpdateOne

RemoveWallets removes "wallets" edges to WalletItems entities.

func (*ItemUpdateOne) Save

func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)

Save executes the query and returns the updated Item entity.

func (*ItemUpdateOne) SaveX

func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item

SaveX is like Save, but panics if an error occurs.

func (*ItemUpdateOne) Select

func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ItemUpdateOne) SetBase

func (iuo *ItemUpdateOne) SetBase(i *Item) *ItemUpdateOne

SetBase sets the "base" edge to the Item entity.

func (*ItemUpdateOne) SetBaseID

func (iuo *ItemUpdateOne) SetBaseID(id string) *ItemUpdateOne

SetBaseID sets the "base" edge to the Item entity by ID.

func (*ItemUpdateOne) SetCount

func (iuo *ItemUpdateOne) SetCount(i int) *ItemUpdateOne

SetCount sets the "count" field.

func (*ItemUpdateOne) SetGreatness

func (iuo *ItemUpdateOne) SetGreatness(i int) *ItemUpdateOne

SetGreatness sets the "greatness" field.

func (*ItemUpdateOne) SetIndex

func (iuo *ItemUpdateOne) SetIndex(s *Search) *ItemUpdateOne

SetIndex sets the "index" edge to the Search entity.

func (*ItemUpdateOne) SetIndexID

func (iuo *ItemUpdateOne) SetIndexID(id string) *ItemUpdateOne

SetIndexID sets the "index" edge to the Search entity by ID.

func (*ItemUpdateOne) SetNillableBaseID

func (iuo *ItemUpdateOne) SetNillableBaseID(id *string) *ItemUpdateOne

SetNillableBaseID sets the "base" edge to the Item entity by ID if the given value is not nil.

func (*ItemUpdateOne) SetNillableCount

func (iuo *ItemUpdateOne) SetNillableCount(i *int) *ItemUpdateOne

SetNillableCount sets the "count" field if the given value is not nil.

func (*ItemUpdateOne) SetNillableGreatness

func (iuo *ItemUpdateOne) SetNillableGreatness(i *int) *ItemUpdateOne

SetNillableGreatness sets the "greatness" field if the given value is not nil.

func (*ItemUpdateOne) SetNillableIndexID

func (iuo *ItemUpdateOne) SetNillableIndexID(id *string) *ItemUpdateOne

SetNillableIndexID sets the "index" edge to the Search entity by ID if the given value is not nil.

func (*ItemUpdateOne) SetNillableRles

func (iuo *ItemUpdateOne) SetNillableRles(se *schema.RLEs) *ItemUpdateOne

SetNillableRles sets the "rles" field if the given value is not nil.

func (*ItemUpdateOne) SetNillableSprite

func (iuo *ItemUpdateOne) SetNillableSprite(s *schema.Sprites) *ItemUpdateOne

SetNillableSprite sets the "sprite" field if the given value is not nil.

func (*ItemUpdateOne) SetNillableSvg

func (iuo *ItemUpdateOne) SetNillableSvg(s *string) *ItemUpdateOne

SetNillableSvg sets the "svg" field if the given value is not nil.

func (*ItemUpdateOne) SetNillableTier

func (iuo *ItemUpdateOne) SetNillableTier(i *item.Tier) *ItemUpdateOne

SetNillableTier sets the "tier" field if the given value is not nil.

func (*ItemUpdateOne) SetRles

func (iuo *ItemUpdateOne) SetRles(se schema.RLEs) *ItemUpdateOne

SetRles sets the "rles" field.

func (*ItemUpdateOne) SetSprite

func (iuo *ItemUpdateOne) SetSprite(s schema.Sprites) *ItemUpdateOne

SetSprite sets the "sprite" field.

func (*ItemUpdateOne) SetSvg

func (iuo *ItemUpdateOne) SetSvg(s string) *ItemUpdateOne

SetSvg sets the "svg" field.

func (*ItemUpdateOne) SetTier

func (iuo *ItemUpdateOne) SetTier(i item.Tier) *ItemUpdateOne

SetTier sets the "tier" field.

type ItemUpsert

type ItemUpsert struct {
	*sql.UpdateSet
}

ItemUpsert is the "OnConflict" setter.

func (*ItemUpsert) AddCount

func (u *ItemUpsert) AddCount(v int) *ItemUpsert

AddCount adds v to the "count" field.

func (*ItemUpsert) AddGreatness

func (u *ItemUpsert) AddGreatness(v int) *ItemUpsert

AddGreatness adds v to the "greatness" field.

func (*ItemUpsert) ClearAugmented

func (u *ItemUpsert) ClearAugmented() *ItemUpsert

ClearAugmented clears the value of the "augmented" field.

func (*ItemUpsert) ClearCount

func (u *ItemUpsert) ClearCount() *ItemUpsert

ClearCount clears the value of the "count" field.

func (*ItemUpsert) ClearGreatness

func (u *ItemUpsert) ClearGreatness() *ItemUpsert

ClearGreatness clears the value of the "greatness" field.

func (*ItemUpsert) ClearNamePrefix

func (u *ItemUpsert) ClearNamePrefix() *ItemUpsert

ClearNamePrefix clears the value of the "name_prefix" field.

func (*ItemUpsert) ClearNameSuffix

func (u *ItemUpsert) ClearNameSuffix() *ItemUpsert

ClearNameSuffix clears the value of the "name_suffix" field.

func (*ItemUpsert) ClearRles

func (u *ItemUpsert) ClearRles() *ItemUpsert

ClearRles clears the value of the "rles" field.

func (*ItemUpsert) ClearSprite

func (u *ItemUpsert) ClearSprite() *ItemUpsert

ClearSprite clears the value of the "sprite" field.

func (*ItemUpsert) ClearSuffix

func (u *ItemUpsert) ClearSuffix() *ItemUpsert

ClearSuffix clears the value of the "suffix" field.

func (*ItemUpsert) ClearSvg

func (u *ItemUpsert) ClearSvg() *ItemUpsert

ClearSvg clears the value of the "svg" field.

func (*ItemUpsert) ClearTier

func (u *ItemUpsert) ClearTier() *ItemUpsert

ClearTier clears the value of the "tier" field.

func (*ItemUpsert) SetAugmented

func (u *ItemUpsert) SetAugmented(v bool) *ItemUpsert

SetAugmented sets the "augmented" field.

func (*ItemUpsert) SetCount

func (u *ItemUpsert) SetCount(v int) *ItemUpsert

SetCount sets the "count" field.

func (*ItemUpsert) SetGreatness

func (u *ItemUpsert) SetGreatness(v int) *ItemUpsert

SetGreatness sets the "greatness" field.

func (*ItemUpsert) SetName

func (u *ItemUpsert) SetName(v string) *ItemUpsert

SetName sets the "name" field.

func (*ItemUpsert) SetNamePrefix

func (u *ItemUpsert) SetNamePrefix(v string) *ItemUpsert

SetNamePrefix sets the "name_prefix" field.

func (*ItemUpsert) SetNameSuffix

func (u *ItemUpsert) SetNameSuffix(v string) *ItemUpsert

SetNameSuffix sets the "name_suffix" field.

func (*ItemUpsert) SetRles

func (u *ItemUpsert) SetRles(v schema.RLEs) *ItemUpsert

SetRles sets the "rles" field.

func (*ItemUpsert) SetSprite

func (u *ItemUpsert) SetSprite(v schema.Sprites) *ItemUpsert

SetSprite sets the "sprite" field.

func (*ItemUpsert) SetSuffix

func (u *ItemUpsert) SetSuffix(v string) *ItemUpsert

SetSuffix sets the "suffix" field.

func (*ItemUpsert) SetSvg

func (u *ItemUpsert) SetSvg(v string) *ItemUpsert

SetSvg sets the "svg" field.

func (*ItemUpsert) SetTier

func (u *ItemUpsert) SetTier(v item.Tier) *ItemUpsert

SetTier sets the "tier" field.

func (*ItemUpsert) SetType

func (u *ItemUpsert) SetType(v item.Type) *ItemUpsert

SetType sets the "type" field.

func (*ItemUpsert) UpdateAugmented

func (u *ItemUpsert) UpdateAugmented() *ItemUpsert

UpdateAugmented sets the "augmented" field to the value that was provided on create.

func (*ItemUpsert) UpdateCount

func (u *ItemUpsert) UpdateCount() *ItemUpsert

UpdateCount sets the "count" field to the value that was provided on create.

func (*ItemUpsert) UpdateGreatness

func (u *ItemUpsert) UpdateGreatness() *ItemUpsert

UpdateGreatness sets the "greatness" field to the value that was provided on create.

func (*ItemUpsert) UpdateName

func (u *ItemUpsert) UpdateName() *ItemUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*ItemUpsert) UpdateNamePrefix

func (u *ItemUpsert) UpdateNamePrefix() *ItemUpsert

UpdateNamePrefix sets the "name_prefix" field to the value that was provided on create.

func (*ItemUpsert) UpdateNameSuffix

func (u *ItemUpsert) UpdateNameSuffix() *ItemUpsert

UpdateNameSuffix sets the "name_suffix" field to the value that was provided on create.

func (*ItemUpsert) UpdateRles

func (u *ItemUpsert) UpdateRles() *ItemUpsert

UpdateRles sets the "rles" field to the value that was provided on create.

func (*ItemUpsert) UpdateSprite

func (u *ItemUpsert) UpdateSprite() *ItemUpsert

UpdateSprite sets the "sprite" field to the value that was provided on create.

func (*ItemUpsert) UpdateSuffix

func (u *ItemUpsert) UpdateSuffix() *ItemUpsert

UpdateSuffix sets the "suffix" field to the value that was provided on create.

func (*ItemUpsert) UpdateSvg

func (u *ItemUpsert) UpdateSvg() *ItemUpsert

UpdateSvg sets the "svg" field to the value that was provided on create.

func (*ItemUpsert) UpdateTier

func (u *ItemUpsert) UpdateTier() *ItemUpsert

UpdateTier sets the "tier" field to the value that was provided on create.

func (*ItemUpsert) UpdateType

func (u *ItemUpsert) UpdateType() *ItemUpsert

UpdateType sets the "type" field to the value that was provided on create.

type ItemUpsertBulk

type ItemUpsertBulk struct {
	// contains filtered or unexported fields
}

ItemUpsertBulk is the builder for "upsert"-ing a bulk of Item nodes.

func (*ItemUpsertBulk) AddCount

func (u *ItemUpsertBulk) AddCount(v int) *ItemUpsertBulk

AddCount adds v to the "count" field.

func (*ItemUpsertBulk) AddGreatness

func (u *ItemUpsertBulk) AddGreatness(v int) *ItemUpsertBulk

AddGreatness adds v to the "greatness" field.

func (*ItemUpsertBulk) ClearAugmented

func (u *ItemUpsertBulk) ClearAugmented() *ItemUpsertBulk

ClearAugmented clears the value of the "augmented" field.

func (*ItemUpsertBulk) ClearCount

func (u *ItemUpsertBulk) ClearCount() *ItemUpsertBulk

ClearCount clears the value of the "count" field.

func (*ItemUpsertBulk) ClearGreatness

func (u *ItemUpsertBulk) ClearGreatness() *ItemUpsertBulk

ClearGreatness clears the value of the "greatness" field.

func (*ItemUpsertBulk) ClearNamePrefix

func (u *ItemUpsertBulk) ClearNamePrefix() *ItemUpsertBulk

ClearNamePrefix clears the value of the "name_prefix" field.

func (*ItemUpsertBulk) ClearNameSuffix

func (u *ItemUpsertBulk) ClearNameSuffix() *ItemUpsertBulk

ClearNameSuffix clears the value of the "name_suffix" field.

func (*ItemUpsertBulk) ClearRles

func (u *ItemUpsertBulk) ClearRles() *ItemUpsertBulk

ClearRles clears the value of the "rles" field.

func (*ItemUpsertBulk) ClearSprite

func (u *ItemUpsertBulk) ClearSprite() *ItemUpsertBulk

ClearSprite clears the value of the "sprite" field.

func (*ItemUpsertBulk) ClearSuffix

func (u *ItemUpsertBulk) ClearSuffix() *ItemUpsertBulk

ClearSuffix clears the value of the "suffix" field.

func (*ItemUpsertBulk) ClearSvg

func (u *ItemUpsertBulk) ClearSvg() *ItemUpsertBulk

ClearSvg clears the value of the "svg" field.

func (*ItemUpsertBulk) ClearTier

func (u *ItemUpsertBulk) ClearTier() *ItemUpsertBulk

ClearTier clears the value of the "tier" field.

func (*ItemUpsertBulk) DoNothing

func (u *ItemUpsertBulk) DoNothing() *ItemUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ItemUpsertBulk) Exec

func (u *ItemUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemUpsertBulk) ExecX

func (u *ItemUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemUpsertBulk) Ignore

func (u *ItemUpsertBulk) Ignore() *ItemUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ItemUpsertBulk) SetAugmented

func (u *ItemUpsertBulk) SetAugmented(v bool) *ItemUpsertBulk

SetAugmented sets the "augmented" field.

func (*ItemUpsertBulk) SetCount

func (u *ItemUpsertBulk) SetCount(v int) *ItemUpsertBulk

SetCount sets the "count" field.

func (*ItemUpsertBulk) SetGreatness

func (u *ItemUpsertBulk) SetGreatness(v int) *ItemUpsertBulk

SetGreatness sets the "greatness" field.

func (*ItemUpsertBulk) SetName

func (u *ItemUpsertBulk) SetName(v string) *ItemUpsertBulk

SetName sets the "name" field.

func (*ItemUpsertBulk) SetNamePrefix

func (u *ItemUpsertBulk) SetNamePrefix(v string) *ItemUpsertBulk

SetNamePrefix sets the "name_prefix" field.

func (*ItemUpsertBulk) SetNameSuffix

func (u *ItemUpsertBulk) SetNameSuffix(v string) *ItemUpsertBulk

SetNameSuffix sets the "name_suffix" field.

func (*ItemUpsertBulk) SetRles

func (u *ItemUpsertBulk) SetRles(v schema.RLEs) *ItemUpsertBulk

SetRles sets the "rles" field.

func (*ItemUpsertBulk) SetSprite

func (u *ItemUpsertBulk) SetSprite(v schema.Sprites) *ItemUpsertBulk

SetSprite sets the "sprite" field.

func (*ItemUpsertBulk) SetSuffix

func (u *ItemUpsertBulk) SetSuffix(v string) *ItemUpsertBulk

SetSuffix sets the "suffix" field.

func (*ItemUpsertBulk) SetSvg

func (u *ItemUpsertBulk) SetSvg(v string) *ItemUpsertBulk

SetSvg sets the "svg" field.

func (*ItemUpsertBulk) SetTier

func (u *ItemUpsertBulk) SetTier(v item.Tier) *ItemUpsertBulk

SetTier sets the "tier" field.

func (*ItemUpsertBulk) SetType

func (u *ItemUpsertBulk) SetType(v item.Type) *ItemUpsertBulk

SetType sets the "type" field.

func (*ItemUpsertBulk) Update

func (u *ItemUpsertBulk) Update(set func(*ItemUpsert)) *ItemUpsertBulk

Update allows overriding fields `UPDATE` values. See the ItemCreateBulk.OnConflict documentation for more info.

func (*ItemUpsertBulk) UpdateAugmented

func (u *ItemUpsertBulk) UpdateAugmented() *ItemUpsertBulk

UpdateAugmented sets the "augmented" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateCount

func (u *ItemUpsertBulk) UpdateCount() *ItemUpsertBulk

UpdateCount sets the "count" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateGreatness

func (u *ItemUpsertBulk) UpdateGreatness() *ItemUpsertBulk

UpdateGreatness sets the "greatness" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateName

func (u *ItemUpsertBulk) UpdateName() *ItemUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateNamePrefix

func (u *ItemUpsertBulk) UpdateNamePrefix() *ItemUpsertBulk

UpdateNamePrefix sets the "name_prefix" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateNameSuffix

func (u *ItemUpsertBulk) UpdateNameSuffix() *ItemUpsertBulk

UpdateNameSuffix sets the "name_suffix" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateNewValues

func (u *ItemUpsertBulk) UpdateNewValues() *ItemUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(item.FieldID)
		}),
	).
	Exec(ctx)

func (*ItemUpsertBulk) UpdateRles

func (u *ItemUpsertBulk) UpdateRles() *ItemUpsertBulk

UpdateRles sets the "rles" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateSprite

func (u *ItemUpsertBulk) UpdateSprite() *ItemUpsertBulk

UpdateSprite sets the "sprite" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateSuffix

func (u *ItemUpsertBulk) UpdateSuffix() *ItemUpsertBulk

UpdateSuffix sets the "suffix" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateSvg

func (u *ItemUpsertBulk) UpdateSvg() *ItemUpsertBulk

UpdateSvg sets the "svg" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateTier

func (u *ItemUpsertBulk) UpdateTier() *ItemUpsertBulk

UpdateTier sets the "tier" field to the value that was provided on create.

func (*ItemUpsertBulk) UpdateType

func (u *ItemUpsertBulk) UpdateType() *ItemUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

type ItemUpsertOne

type ItemUpsertOne struct {
	// contains filtered or unexported fields
}

ItemUpsertOne is the builder for "upsert"-ing

one Item node.

func (*ItemUpsertOne) AddCount

func (u *ItemUpsertOne) AddCount(v int) *ItemUpsertOne

AddCount adds v to the "count" field.

func (*ItemUpsertOne) AddGreatness

func (u *ItemUpsertOne) AddGreatness(v int) *ItemUpsertOne

AddGreatness adds v to the "greatness" field.

func (*ItemUpsertOne) ClearAugmented

func (u *ItemUpsertOne) ClearAugmented() *ItemUpsertOne

ClearAugmented clears the value of the "augmented" field.

func (*ItemUpsertOne) ClearCount

func (u *ItemUpsertOne) ClearCount() *ItemUpsertOne

ClearCount clears the value of the "count" field.

func (*ItemUpsertOne) ClearGreatness

func (u *ItemUpsertOne) ClearGreatness() *ItemUpsertOne

ClearGreatness clears the value of the "greatness" field.

func (*ItemUpsertOne) ClearNamePrefix

func (u *ItemUpsertOne) ClearNamePrefix() *ItemUpsertOne

ClearNamePrefix clears the value of the "name_prefix" field.

func (*ItemUpsertOne) ClearNameSuffix

func (u *ItemUpsertOne) ClearNameSuffix() *ItemUpsertOne

ClearNameSuffix clears the value of the "name_suffix" field.

func (*ItemUpsertOne) ClearRles

func (u *ItemUpsertOne) ClearRles() *ItemUpsertOne

ClearRles clears the value of the "rles" field.

func (*ItemUpsertOne) ClearSprite

func (u *ItemUpsertOne) ClearSprite() *ItemUpsertOne

ClearSprite clears the value of the "sprite" field.

func (*ItemUpsertOne) ClearSuffix

func (u *ItemUpsertOne) ClearSuffix() *ItemUpsertOne

ClearSuffix clears the value of the "suffix" field.

func (*ItemUpsertOne) ClearSvg

func (u *ItemUpsertOne) ClearSvg() *ItemUpsertOne

ClearSvg clears the value of the "svg" field.

func (*ItemUpsertOne) ClearTier

func (u *ItemUpsertOne) ClearTier() *ItemUpsertOne

ClearTier clears the value of the "tier" field.

func (*ItemUpsertOne) DoNothing

func (u *ItemUpsertOne) DoNothing() *ItemUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ItemUpsertOne) Exec

func (u *ItemUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemUpsertOne) ExecX

func (u *ItemUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemUpsertOne) ID

func (u *ItemUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ItemUpsertOne) IDX

func (u *ItemUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*ItemUpsertOne) Ignore

func (u *ItemUpsertOne) Ignore() *ItemUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Item.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ItemUpsertOne) SetAugmented

func (u *ItemUpsertOne) SetAugmented(v bool) *ItemUpsertOne

SetAugmented sets the "augmented" field.

func (*ItemUpsertOne) SetCount

func (u *ItemUpsertOne) SetCount(v int) *ItemUpsertOne

SetCount sets the "count" field.

func (*ItemUpsertOne) SetGreatness

func (u *ItemUpsertOne) SetGreatness(v int) *ItemUpsertOne

SetGreatness sets the "greatness" field.

func (*ItemUpsertOne) SetName

func (u *ItemUpsertOne) SetName(v string) *ItemUpsertOne

SetName sets the "name" field.

func (*ItemUpsertOne) SetNamePrefix

func (u *ItemUpsertOne) SetNamePrefix(v string) *ItemUpsertOne

SetNamePrefix sets the "name_prefix" field.

func (*ItemUpsertOne) SetNameSuffix

func (u *ItemUpsertOne) SetNameSuffix(v string) *ItemUpsertOne

SetNameSuffix sets the "name_suffix" field.

func (*ItemUpsertOne) SetRles

func (u *ItemUpsertOne) SetRles(v schema.RLEs) *ItemUpsertOne

SetRles sets the "rles" field.

func (*ItemUpsertOne) SetSprite

func (u *ItemUpsertOne) SetSprite(v schema.Sprites) *ItemUpsertOne

SetSprite sets the "sprite" field.

func (*ItemUpsertOne) SetSuffix

func (u *ItemUpsertOne) SetSuffix(v string) *ItemUpsertOne

SetSuffix sets the "suffix" field.

func (*ItemUpsertOne) SetSvg

func (u *ItemUpsertOne) SetSvg(v string) *ItemUpsertOne

SetSvg sets the "svg" field.

func (*ItemUpsertOne) SetTier

func (u *ItemUpsertOne) SetTier(v item.Tier) *ItemUpsertOne

SetTier sets the "tier" field.

func (*ItemUpsertOne) SetType

func (u *ItemUpsertOne) SetType(v item.Type) *ItemUpsertOne

SetType sets the "type" field.

func (*ItemUpsertOne) Update

func (u *ItemUpsertOne) Update(set func(*ItemUpsert)) *ItemUpsertOne

Update allows overriding fields `UPDATE` values. See the ItemCreate.OnConflict documentation for more info.

func (*ItemUpsertOne) UpdateAugmented

func (u *ItemUpsertOne) UpdateAugmented() *ItemUpsertOne

UpdateAugmented sets the "augmented" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateCount

func (u *ItemUpsertOne) UpdateCount() *ItemUpsertOne

UpdateCount sets the "count" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateGreatness

func (u *ItemUpsertOne) UpdateGreatness() *ItemUpsertOne

UpdateGreatness sets the "greatness" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateName

func (u *ItemUpsertOne) UpdateName() *ItemUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateNamePrefix

func (u *ItemUpsertOne) UpdateNamePrefix() *ItemUpsertOne

UpdateNamePrefix sets the "name_prefix" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateNameSuffix

func (u *ItemUpsertOne) UpdateNameSuffix() *ItemUpsertOne

UpdateNameSuffix sets the "name_suffix" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateNewValues

func (u *ItemUpsertOne) UpdateNewValues() *ItemUpsertOne

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.Item.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(item.FieldID)
		}),
	).
	Exec(ctx)

func (*ItemUpsertOne) UpdateRles

func (u *ItemUpsertOne) UpdateRles() *ItemUpsertOne

UpdateRles sets the "rles" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateSprite

func (u *ItemUpsertOne) UpdateSprite() *ItemUpsertOne

UpdateSprite sets the "sprite" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateSuffix

func (u *ItemUpsertOne) UpdateSuffix() *ItemUpsertOne

UpdateSuffix sets the "suffix" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateSvg

func (u *ItemUpsertOne) UpdateSvg() *ItemUpsertOne

UpdateSvg sets the "svg" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateTier

func (u *ItemUpsertOne) UpdateTier() *ItemUpsertOne

UpdateTier sets the "tier" field to the value that was provided on create.

func (*ItemUpsertOne) UpdateType

func (u *ItemUpsertOne) UpdateType() *ItemUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type ItemWhereInput

type ItemWhereInput struct {
	Not *ItemWhereInput   `json:"not,omitempty"`
	Or  []*ItemWhereInput `json:"or,omitempty"`
	And []*ItemWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "type" field predicates.
	Type      *item.Type  `json:"type,omitempty"`
	TypeNEQ   *item.Type  `json:"typeNEQ,omitempty"`
	TypeIn    []item.Type `json:"typeIn,omitempty"`
	TypeNotIn []item.Type `json:"typeNotIn,omitempty"`

	// "name_prefix" field predicates.
	NamePrefix             *string  `json:"namePrefix,omitempty"`
	NamePrefixNEQ          *string  `json:"namePrefixNEQ,omitempty"`
	NamePrefixIn           []string `json:"namePrefixIn,omitempty"`
	NamePrefixNotIn        []string `json:"namePrefixNotIn,omitempty"`
	NamePrefixGT           *string  `json:"namePrefixGT,omitempty"`
	NamePrefixGTE          *string  `json:"namePrefixGTE,omitempty"`
	NamePrefixLT           *string  `json:"namePrefixLT,omitempty"`
	NamePrefixLTE          *string  `json:"namePrefixLTE,omitempty"`
	NamePrefixContains     *string  `json:"namePrefixContains,omitempty"`
	NamePrefixHasPrefix    *string  `json:"namePrefixHasPrefix,omitempty"`
	NamePrefixHasSuffix    *string  `json:"namePrefixHasSuffix,omitempty"`
	NamePrefixIsNil        bool     `json:"namePrefixIsNil,omitempty"`
	NamePrefixNotNil       bool     `json:"namePrefixNotNil,omitempty"`
	NamePrefixEqualFold    *string  `json:"namePrefixEqualFold,omitempty"`
	NamePrefixContainsFold *string  `json:"namePrefixContainsFold,omitempty"`

	// "name_suffix" field predicates.
	NameSuffix             *string  `json:"nameSuffix,omitempty"`
	NameSuffixNEQ          *string  `json:"nameSuffixNEQ,omitempty"`
	NameSuffixIn           []string `json:"nameSuffixIn,omitempty"`
	NameSuffixNotIn        []string `json:"nameSuffixNotIn,omitempty"`
	NameSuffixGT           *string  `json:"nameSuffixGT,omitempty"`
	NameSuffixGTE          *string  `json:"nameSuffixGTE,omitempty"`
	NameSuffixLT           *string  `json:"nameSuffixLT,omitempty"`
	NameSuffixLTE          *string  `json:"nameSuffixLTE,omitempty"`
	NameSuffixContains     *string  `json:"nameSuffixContains,omitempty"`
	NameSuffixHasPrefix    *string  `json:"nameSuffixHasPrefix,omitempty"`
	NameSuffixHasSuffix    *string  `json:"nameSuffixHasSuffix,omitempty"`
	NameSuffixIsNil        bool     `json:"nameSuffixIsNil,omitempty"`
	NameSuffixNotNil       bool     `json:"nameSuffixNotNil,omitempty"`
	NameSuffixEqualFold    *string  `json:"nameSuffixEqualFold,omitempty"`
	NameSuffixContainsFold *string  `json:"nameSuffixContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "suffix" field predicates.
	Suffix             *string  `json:"suffix,omitempty"`
	SuffixNEQ          *string  `json:"suffixNEQ,omitempty"`
	SuffixIn           []string `json:"suffixIn,omitempty"`
	SuffixNotIn        []string `json:"suffixNotIn,omitempty"`
	SuffixGT           *string  `json:"suffixGT,omitempty"`
	SuffixGTE          *string  `json:"suffixGTE,omitempty"`
	SuffixLT           *string  `json:"suffixLT,omitempty"`
	SuffixLTE          *string  `json:"suffixLTE,omitempty"`
	SuffixContains     *string  `json:"suffixContains,omitempty"`
	SuffixHasPrefix    *string  `json:"suffixHasPrefix,omitempty"`
	SuffixHasSuffix    *string  `json:"suffixHasSuffix,omitempty"`
	SuffixIsNil        bool     `json:"suffixIsNil,omitempty"`
	SuffixNotNil       bool     `json:"suffixNotNil,omitempty"`
	SuffixEqualFold    *string  `json:"suffixEqualFold,omitempty"`
	SuffixContainsFold *string  `json:"suffixContainsFold,omitempty"`

	// "augmented" field predicates.
	Augmented       *bool `json:"augmented,omitempty"`
	AugmentedNEQ    *bool `json:"augmentedNEQ,omitempty"`
	AugmentedIsNil  bool  `json:"augmentedIsNil,omitempty"`
	AugmentedNotNil bool  `json:"augmentedNotNil,omitempty"`

	// "count" field predicates.
	Count       *int  `json:"count,omitempty"`
	CountNEQ    *int  `json:"countNEQ,omitempty"`
	CountIn     []int `json:"countIn,omitempty"`
	CountNotIn  []int `json:"countNotIn,omitempty"`
	CountGT     *int  `json:"countGT,omitempty"`
	CountGTE    *int  `json:"countGTE,omitempty"`
	CountLT     *int  `json:"countLT,omitempty"`
	CountLTE    *int  `json:"countLTE,omitempty"`
	CountIsNil  bool  `json:"countIsNil,omitempty"`
	CountNotNil bool  `json:"countNotNil,omitempty"`

	// "tier" field predicates.
	Tier       *item.Tier  `json:"tier,omitempty"`
	TierNEQ    *item.Tier  `json:"tierNEQ,omitempty"`
	TierIn     []item.Tier `json:"tierIn,omitempty"`
	TierNotIn  []item.Tier `json:"tierNotIn,omitempty"`
	TierIsNil  bool        `json:"tierIsNil,omitempty"`
	TierNotNil bool        `json:"tierNotNil,omitempty"`

	// "greatness" field predicates.
	Greatness       *int  `json:"greatness,omitempty"`
	GreatnessNEQ    *int  `json:"greatnessNEQ,omitempty"`
	GreatnessIn     []int `json:"greatnessIn,omitempty"`
	GreatnessNotIn  []int `json:"greatnessNotIn,omitempty"`
	GreatnessGT     *int  `json:"greatnessGT,omitempty"`
	GreatnessGTE    *int  `json:"greatnessGTE,omitempty"`
	GreatnessLT     *int  `json:"greatnessLT,omitempty"`
	GreatnessLTE    *int  `json:"greatnessLTE,omitempty"`
	GreatnessIsNil  bool  `json:"greatnessIsNil,omitempty"`
	GreatnessNotNil bool  `json:"greatnessNotNil,omitempty"`

	// "svg" field predicates.
	Svg             *string  `json:"svg,omitempty"`
	SvgNEQ          *string  `json:"svgNEQ,omitempty"`
	SvgIn           []string `json:"svgIn,omitempty"`
	SvgNotIn        []string `json:"svgNotIn,omitempty"`
	SvgGT           *string  `json:"svgGT,omitempty"`
	SvgGTE          *string  `json:"svgGTE,omitempty"`
	SvgLT           *string  `json:"svgLT,omitempty"`
	SvgLTE          *string  `json:"svgLTE,omitempty"`
	SvgContains     *string  `json:"svgContains,omitempty"`
	SvgHasPrefix    *string  `json:"svgHasPrefix,omitempty"`
	SvgHasSuffix    *string  `json:"svgHasSuffix,omitempty"`
	SvgIsNil        bool     `json:"svgIsNil,omitempty"`
	SvgNotNil       bool     `json:"svgNotNil,omitempty"`
	SvgEqualFold    *string  `json:"svgEqualFold,omitempty"`
	SvgContainsFold *string  `json:"svgContainsFold,omitempty"`

	// "wallets" edge predicates.
	HasWallets     *bool                    `json:"hasWallets,omitempty"`
	HasWalletsWith []*WalletItemsWhereInput `json:"hasWalletsWith,omitempty"`

	// "dopes" edge predicates.
	HasDopes     *bool             `json:"hasDopes,omitempty"`
	HasDopesWith []*DopeWhereInput `json:"hasDopesWith,omitempty"`

	// "hustler_weapons" edge predicates.
	HasHustlerWeapons     *bool                `json:"hasHustlerWeapons,omitempty"`
	HasHustlerWeaponsWith []*HustlerWhereInput `json:"hasHustlerWeaponsWith,omitempty"`

	// "hustler_clothes" edge predicates.
	HasHustlerClothes     *bool                `json:"hasHustlerClothes,omitempty"`
	HasHustlerClothesWith []*HustlerWhereInput `json:"hasHustlerClothesWith,omitempty"`

	// "hustler_vehicles" edge predicates.
	HasHustlerVehicles     *bool                `json:"hasHustlerVehicles,omitempty"`
	HasHustlerVehiclesWith []*HustlerWhereInput `json:"hasHustlerVehiclesWith,omitempty"`

	// "hustler_waists" edge predicates.
	HasHustlerWaists     *bool                `json:"hasHustlerWaists,omitempty"`
	HasHustlerWaistsWith []*HustlerWhereInput `json:"hasHustlerWaistsWith,omitempty"`

	// "hustler_feet" edge predicates.
	HasHustlerFeet     *bool                `json:"hasHustlerFeet,omitempty"`
	HasHustlerFeetWith []*HustlerWhereInput `json:"hasHustlerFeetWith,omitempty"`

	// "hustler_hands" edge predicates.
	HasHustlerHands     *bool                `json:"hasHustlerHands,omitempty"`
	HasHustlerHandsWith []*HustlerWhereInput `json:"hasHustlerHandsWith,omitempty"`

	// "hustler_drugs" edge predicates.
	HasHustlerDrugs     *bool                `json:"hasHustlerDrugs,omitempty"`
	HasHustlerDrugsWith []*HustlerWhereInput `json:"hasHustlerDrugsWith,omitempty"`

	// "hustler_necks" edge predicates.
	HasHustlerNecks     *bool                `json:"hasHustlerNecks,omitempty"`
	HasHustlerNecksWith []*HustlerWhereInput `json:"hasHustlerNecksWith,omitempty"`

	// "hustler_rings" edge predicates.
	HasHustlerRings     *bool                `json:"hasHustlerRings,omitempty"`
	HasHustlerRingsWith []*HustlerWhereInput `json:"hasHustlerRingsWith,omitempty"`

	// "hustler_accessories" edge predicates.
	HasHustlerAccessories     *bool                `json:"hasHustlerAccessories,omitempty"`
	HasHustlerAccessoriesWith []*HustlerWhereInput `json:"hasHustlerAccessoriesWith,omitempty"`

	// "base" edge predicates.
	HasBase     *bool             `json:"hasBase,omitempty"`
	HasBaseWith []*ItemWhereInput `json:"hasBaseWith,omitempty"`

	// "derivative" edge predicates.
	HasDerivative     *bool             `json:"hasDerivative,omitempty"`
	HasDerivativeWith []*ItemWhereInput `json:"hasDerivativeWith,omitempty"`

	// "index" edge predicates.
	HasIndex     *bool               `json:"hasIndex,omitempty"`
	HasIndexWith []*SearchWhereInput `json:"hasIndexWith,omitempty"`
}

ItemWhereInput represents a where input for filtering Item queries.

func (*ItemWhereInput) Filter

func (i *ItemWhereInput) Filter(q *ItemQuery) (*ItemQuery, error)

Filter applies the ItemWhereInput filter on the ItemQuery builder.

func (*ItemWhereInput) P

func (i *ItemWhereInput) P() (predicate.Item, error)

P returns a predicate for filtering items. An error is returned if the input is empty or invalid.

type Items

type Items []*Item

Items is a parsable slice of Item.

type Listing

type Listing struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// Source holds the value of the "source" field.
	Source listing.Source `json:"source,omitempty"`
	// WyvernOrder holds the value of the "wyvern_order" field.
	WyvernOrder json.RawMessage `json:"wyvern_order,omitempty"`
	// SeaportOrder holds the value of the "seaport_order" field.
	SeaportOrder json.RawMessage `json:"seaport_order,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ListingQuery when eager-loading is set.
	Edges ListingEdges `json:"edges"`
	// contains filtered or unexported fields
}

Listing is the model entity for the Listing schema.

func (*Listing) Dope

func (l *Listing) Dope(ctx context.Context) (*Dope, error)

func (*Listing) DopeLastsales

func (l *Listing) DopeLastsales(ctx context.Context) (*Dope, error)

func (*Listing) Inputs

func (l *Listing) Inputs(ctx context.Context) ([]*Amount, error)

func (*Listing) Node

func (l *Listing) Node(ctx context.Context) (node *Node, err error)

func (*Listing) Outputs

func (l *Listing) Outputs(ctx context.Context) ([]*Amount, error)

func (*Listing) QueryDope

func (l *Listing) QueryDope() *DopeQuery

QueryDope queries the "dope" edge of the Listing entity.

func (*Listing) QueryDopeLastsales

func (l *Listing) QueryDopeLastsales() *DopeQuery

QueryDopeLastsales queries the "dope_lastsales" edge of the Listing entity.

func (*Listing) QueryInputs

func (l *Listing) QueryInputs() *AmountQuery

QueryInputs queries the "inputs" edge of the Listing entity.

func (*Listing) QueryOutputs

func (l *Listing) QueryOutputs() *AmountQuery

QueryOutputs queries the "outputs" edge of the Listing entity.

func (*Listing) String

func (l *Listing) String() string

String implements the fmt.Stringer.

func (*Listing) ToEdge

func (l *Listing) ToEdge(order *ListingOrder) *ListingEdge

ToEdge converts Listing into ListingEdge.

func (*Listing) Unwrap

func (l *Listing) Unwrap() *Listing

Unwrap unwraps the Listing 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 (*Listing) Update

func (l *Listing) Update() *ListingUpdateOne

Update returns a builder for updating this Listing. Note that you need to call Listing.Unwrap() before calling this method if this Listing was returned from a transaction, and the transaction was committed or rolled back.

type ListingClient

type ListingClient struct {
	// contains filtered or unexported fields
}

ListingClient is a client for the Listing schema.

func NewListingClient

func NewListingClient(c config) *ListingClient

NewListingClient returns a client for the Listing from the given config.

func (*ListingClient) Create

func (c *ListingClient) Create() *ListingCreate

Create returns a create builder for Listing.

func (*ListingClient) CreateBulk

func (c *ListingClient) CreateBulk(builders ...*ListingCreate) *ListingCreateBulk

CreateBulk returns a builder for creating a bulk of Listing entities.

func (*ListingClient) Delete

func (c *ListingClient) Delete() *ListingDelete

Delete returns a delete builder for Listing.

func (*ListingClient) DeleteOne

func (c *ListingClient) DeleteOne(l *Listing) *ListingDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ListingClient) DeleteOneID

func (c *ListingClient) DeleteOneID(id string) *ListingDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ListingClient) Get

func (c *ListingClient) Get(ctx context.Context, id string) (*Listing, error)

Get returns a Listing entity by its id.

func (*ListingClient) GetX

func (c *ListingClient) GetX(ctx context.Context, id string) *Listing

GetX is like Get, but panics if an error occurs.

func (*ListingClient) Hooks

func (c *ListingClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ListingClient) Query

func (c *ListingClient) Query() *ListingQuery

Query returns a query builder for Listing.

func (*ListingClient) QueryDope

func (c *ListingClient) QueryDope(l *Listing) *DopeQuery

QueryDope queries the dope edge of a Listing.

func (*ListingClient) QueryDopeLastsales

func (c *ListingClient) QueryDopeLastsales(l *Listing) *DopeQuery

QueryDopeLastsales queries the dope_lastsales edge of a Listing.

func (*ListingClient) QueryInputs

func (c *ListingClient) QueryInputs(l *Listing) *AmountQuery

QueryInputs queries the inputs edge of a Listing.

func (*ListingClient) QueryOutputs

func (c *ListingClient) QueryOutputs(l *Listing) *AmountQuery

QueryOutputs queries the outputs edge of a Listing.

func (*ListingClient) Update

func (c *ListingClient) Update() *ListingUpdate

Update returns an update builder for Listing.

func (*ListingClient) UpdateOne

func (c *ListingClient) UpdateOne(l *Listing) *ListingUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ListingClient) UpdateOneID

func (c *ListingClient) UpdateOneID(id string) *ListingUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ListingClient) Use

func (c *ListingClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `listing.Hooks(f(g(h())))`.

type ListingConnection

type ListingConnection struct {
	Edges      []*ListingEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

ListingConnection is the connection containing edges to Listing.

type ListingCreate

type ListingCreate struct {
	// contains filtered or unexported fields
}

ListingCreate is the builder for creating a Listing entity.

func (*ListingCreate) AddInputIDs

func (lc *ListingCreate) AddInputIDs(ids ...string) *ListingCreate

AddInputIDs adds the "inputs" edge to the Amount entity by IDs.

func (*ListingCreate) AddInputs

func (lc *ListingCreate) AddInputs(a ...*Amount) *ListingCreate

AddInputs adds the "inputs" edges to the Amount entity.

func (*ListingCreate) AddOutputIDs

func (lc *ListingCreate) AddOutputIDs(ids ...string) *ListingCreate

AddOutputIDs adds the "outputs" edge to the Amount entity by IDs.

func (*ListingCreate) AddOutputs

func (lc *ListingCreate) AddOutputs(a ...*Amount) *ListingCreate

AddOutputs adds the "outputs" edges to the Amount entity.

func (*ListingCreate) Exec

func (lc *ListingCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ListingCreate) ExecX

func (lc *ListingCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ListingCreate) Mutation

func (lc *ListingCreate) Mutation() *ListingMutation

Mutation returns the ListingMutation object of the builder.

func (*ListingCreate) OnConflict

func (lc *ListingCreate) OnConflict(opts ...sql.ConflictOption) *ListingUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Listing.Create().
	SetActive(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.ListingUpsert) {
		SetActive(v+v).
	}).
	Exec(ctx)

func (*ListingCreate) OnConflictColumns

func (lc *ListingCreate) OnConflictColumns(columns ...string) *ListingUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Listing.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ListingCreate) Save

func (lc *ListingCreate) Save(ctx context.Context) (*Listing, error)

Save creates the Listing in the database.

func (*ListingCreate) SaveX

func (lc *ListingCreate) SaveX(ctx context.Context) *Listing

SaveX calls Save and panics if Save returns an error.

func (*ListingCreate) SetActive

func (lc *ListingCreate) SetActive(b bool) *ListingCreate

SetActive sets the "active" field.

func (*ListingCreate) SetDope

func (lc *ListingCreate) SetDope(d *Dope) *ListingCreate

SetDope sets the "dope" edge to the Dope entity.

func (*ListingCreate) SetDopeID

func (lc *ListingCreate) SetDopeID(id string) *ListingCreate

SetDopeID sets the "dope" edge to the Dope entity by ID.

func (*ListingCreate) SetDopeLastsales

func (lc *ListingCreate) SetDopeLastsales(d *Dope) *ListingCreate

SetDopeLastsales sets the "dope_lastsales" edge to the Dope entity.

func (*ListingCreate) SetDopeLastsalesID

func (lc *ListingCreate) SetDopeLastsalesID(id string) *ListingCreate

SetDopeLastsalesID sets the "dope_lastsales" edge to the Dope entity by ID.

func (*ListingCreate) SetID

func (lc *ListingCreate) SetID(s string) *ListingCreate

SetID sets the "id" field.

func (*ListingCreate) SetNillableDopeID

func (lc *ListingCreate) SetNillableDopeID(id *string) *ListingCreate

SetNillableDopeID sets the "dope" edge to the Dope entity by ID if the given value is not nil.

func (*ListingCreate) SetNillableDopeLastsalesID

func (lc *ListingCreate) SetNillableDopeLastsalesID(id *string) *ListingCreate

SetNillableDopeLastsalesID sets the "dope_lastsales" edge to the Dope entity by ID if the given value is not nil.

func (*ListingCreate) SetSeaportOrder

func (lc *ListingCreate) SetSeaportOrder(jm json.RawMessage) *ListingCreate

SetSeaportOrder sets the "seaport_order" field.

func (*ListingCreate) SetSource

func (lc *ListingCreate) SetSource(l listing.Source) *ListingCreate

SetSource sets the "source" field.

func (*ListingCreate) SetWyvernOrder

func (lc *ListingCreate) SetWyvernOrder(jm json.RawMessage) *ListingCreate

SetWyvernOrder sets the "wyvern_order" field.

type ListingCreateBulk

type ListingCreateBulk struct {
	// contains filtered or unexported fields
}

ListingCreateBulk is the builder for creating many Listing entities in bulk.

func (*ListingCreateBulk) Exec

func (lcb *ListingCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ListingCreateBulk) ExecX

func (lcb *ListingCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ListingCreateBulk) OnConflict

func (lcb *ListingCreateBulk) OnConflict(opts ...sql.ConflictOption) *ListingUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Listing.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.ListingUpsert) {
		SetActive(v+v).
	}).
	Exec(ctx)

func (*ListingCreateBulk) OnConflictColumns

func (lcb *ListingCreateBulk) OnConflictColumns(columns ...string) *ListingUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Listing.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ListingCreateBulk) Save

func (lcb *ListingCreateBulk) Save(ctx context.Context) ([]*Listing, error)

Save creates the Listing entities in the database.

func (*ListingCreateBulk) SaveX

func (lcb *ListingCreateBulk) SaveX(ctx context.Context) []*Listing

SaveX is like Save, but panics if an error occurs.

type ListingDelete

type ListingDelete struct {
	// contains filtered or unexported fields
}

ListingDelete is the builder for deleting a Listing entity.

func (*ListingDelete) Exec

func (ld *ListingDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ListingDelete) ExecX

func (ld *ListingDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ListingDelete) Where

func (ld *ListingDelete) Where(ps ...predicate.Listing) *ListingDelete

Where appends a list predicates to the ListingDelete builder.

type ListingDeleteOne

type ListingDeleteOne struct {
	// contains filtered or unexported fields
}

ListingDeleteOne is the builder for deleting a single Listing entity.

func (*ListingDeleteOne) Exec

func (ldo *ListingDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ListingDeleteOne) ExecX

func (ldo *ListingDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ListingEdge

type ListingEdge struct {
	Node   *Listing `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

ListingEdge is the edge representation of Listing.

type ListingEdges

type ListingEdges struct {
	// Dope holds the value of the dope edge.
	Dope *Dope `json:"dope,omitempty"`
	// DopeLastsales holds the value of the dope_lastsales edge.
	DopeLastsales *Dope `json:"dope_lastsales,omitempty"`
	// Inputs holds the value of the inputs edge.
	Inputs []*Amount `json:"inputs,omitempty"`
	// Outputs holds the value of the outputs edge.
	Outputs []*Amount `json:"outputs,omitempty"`
	// contains filtered or unexported fields
}

ListingEdges holds the relations/edges for other nodes in the graph.

func (ListingEdges) DopeLastsalesOrErr

func (e ListingEdges) DopeLastsalesOrErr() (*Dope, error)

DopeLastsalesOrErr returns the DopeLastsales value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ListingEdges) DopeOrErr

func (e ListingEdges) DopeOrErr() (*Dope, error)

DopeOrErr returns the Dope value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ListingEdges) InputsOrErr

func (e ListingEdges) InputsOrErr() ([]*Amount, error)

InputsOrErr returns the Inputs value or an error if the edge was not loaded in eager-loading.

func (ListingEdges) OutputsOrErr

func (e ListingEdges) OutputsOrErr() ([]*Amount, error)

OutputsOrErr returns the Outputs value or an error if the edge was not loaded in eager-loading.

type ListingGroupBy

type ListingGroupBy struct {
	// contains filtered or unexported fields
}

ListingGroupBy is the group-by builder for Listing entities.

func (*ListingGroupBy) Aggregate

func (lgb *ListingGroupBy) Aggregate(fns ...AggregateFunc) *ListingGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ListingGroupBy) Bool

func (lgb *ListingGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ListingGroupBy) BoolX

func (lgb *ListingGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ListingGroupBy) Bools

func (lgb *ListingGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*ListingGroupBy) BoolsX

func (lgb *ListingGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ListingGroupBy) Float64

func (lgb *ListingGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ListingGroupBy) Float64X

func (lgb *ListingGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ListingGroupBy) Float64s

func (lgb *ListingGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*ListingGroupBy) Float64sX

func (lgb *ListingGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ListingGroupBy) Int

func (lgb *ListingGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ListingGroupBy) IntX

func (lgb *ListingGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ListingGroupBy) Ints

func (lgb *ListingGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*ListingGroupBy) IntsX

func (lgb *ListingGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ListingGroupBy) Scan

func (lgb *ListingGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*ListingGroupBy) ScanX

func (lgb *ListingGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ListingGroupBy) String

func (lgb *ListingGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ListingGroupBy) StringX

func (lgb *ListingGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ListingGroupBy) Strings

func (lgb *ListingGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*ListingGroupBy) StringsX

func (lgb *ListingGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ListingMutation

type ListingMutation struct {
	// contains filtered or unexported fields
}

ListingMutation represents an operation that mutates the Listing nodes in the graph.

func (*ListingMutation) Active

func (m *ListingMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*ListingMutation) AddField

func (m *ListingMutation) 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 (*ListingMutation) AddInputIDs

func (m *ListingMutation) AddInputIDs(ids ...string)

AddInputIDs adds the "inputs" edge to the Amount entity by ids.

func (*ListingMutation) AddOutputIDs

func (m *ListingMutation) AddOutputIDs(ids ...string)

AddOutputIDs adds the "outputs" edge to the Amount entity by ids.

func (*ListingMutation) AddedEdges

func (m *ListingMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ListingMutation) AddedField

func (m *ListingMutation) 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 (*ListingMutation) AddedFields

func (m *ListingMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ListingMutation) AddedIDs

func (m *ListingMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ListingMutation) ClearDope

func (m *ListingMutation) ClearDope()

ClearDope clears the "dope" edge to the Dope entity.

func (*ListingMutation) ClearDopeLastsales

func (m *ListingMutation) ClearDopeLastsales()

ClearDopeLastsales clears the "dope_lastsales" edge to the Dope entity.

func (*ListingMutation) ClearEdge

func (m *ListingMutation) 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 (*ListingMutation) ClearField

func (m *ListingMutation) 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 (*ListingMutation) ClearInputs

func (m *ListingMutation) ClearInputs()

ClearInputs clears the "inputs" edge to the Amount entity.

func (*ListingMutation) ClearOutputs

func (m *ListingMutation) ClearOutputs()

ClearOutputs clears the "outputs" edge to the Amount entity.

func (*ListingMutation) ClearSeaportOrder

func (m *ListingMutation) ClearSeaportOrder()

ClearSeaportOrder clears the value of the "seaport_order" field.

func (*ListingMutation) ClearWyvernOrder

func (m *ListingMutation) ClearWyvernOrder()

ClearWyvernOrder clears the value of the "wyvern_order" field.

func (*ListingMutation) ClearedEdges

func (m *ListingMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ListingMutation) ClearedFields

func (m *ListingMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ListingMutation) Client

func (m ListingMutation) 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 (*ListingMutation) DopeCleared

func (m *ListingMutation) DopeCleared() bool

DopeCleared reports if the "dope" edge to the Dope entity was cleared.

func (*ListingMutation) DopeID

func (m *ListingMutation) DopeID() (id string, exists bool)

DopeID returns the "dope" edge ID in the mutation.

func (*ListingMutation) DopeIDs

func (m *ListingMutation) DopeIDs() (ids []string)

DopeIDs returns the "dope" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DopeID instead. It exists only for internal usage by the builders.

func (*ListingMutation) DopeLastsalesCleared

func (m *ListingMutation) DopeLastsalesCleared() bool

DopeLastsalesCleared reports if the "dope_lastsales" edge to the Dope entity was cleared.

func (*ListingMutation) DopeLastsalesID

func (m *ListingMutation) DopeLastsalesID() (id string, exists bool)

DopeLastsalesID returns the "dope_lastsales" edge ID in the mutation.

func (*ListingMutation) DopeLastsalesIDs

func (m *ListingMutation) DopeLastsalesIDs() (ids []string)

DopeLastsalesIDs returns the "dope_lastsales" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DopeLastsalesID instead. It exists only for internal usage by the builders.

func (*ListingMutation) EdgeCleared

func (m *ListingMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ListingMutation) Field

func (m *ListingMutation) 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 (*ListingMutation) FieldCleared

func (m *ListingMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ListingMutation) Fields

func (m *ListingMutation) 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 (*ListingMutation) ID

func (m *ListingMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ListingMutation) IDs

func (m *ListingMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ListingMutation) InputsCleared

func (m *ListingMutation) InputsCleared() bool

InputsCleared reports if the "inputs" edge to the Amount entity was cleared.

func (*ListingMutation) InputsIDs

func (m *ListingMutation) InputsIDs() (ids []string)

InputsIDs returns the "inputs" edge IDs in the mutation.

func (*ListingMutation) OldActive

func (m *ListingMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the Listing entity. If the Listing 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 (*ListingMutation) OldField

func (m *ListingMutation) 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 (*ListingMutation) OldSeaportOrder

func (m *ListingMutation) OldSeaportOrder(ctx context.Context) (v json.RawMessage, err error)

OldSeaportOrder returns the old "seaport_order" field's value of the Listing entity. If the Listing 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 (*ListingMutation) OldSource

func (m *ListingMutation) OldSource(ctx context.Context) (v listing.Source, err error)

OldSource returns the old "source" field's value of the Listing entity. If the Listing 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 (*ListingMutation) OldWyvernOrder

func (m *ListingMutation) OldWyvernOrder(ctx context.Context) (v json.RawMessage, err error)

OldWyvernOrder returns the old "wyvern_order" field's value of the Listing entity. If the Listing 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 (*ListingMutation) Op

func (m *ListingMutation) Op() Op

Op returns the operation name.

func (*ListingMutation) OutputsCleared

func (m *ListingMutation) OutputsCleared() bool

OutputsCleared reports if the "outputs" edge to the Amount entity was cleared.

func (*ListingMutation) OutputsIDs

func (m *ListingMutation) OutputsIDs() (ids []string)

OutputsIDs returns the "outputs" edge IDs in the mutation.

func (*ListingMutation) RemoveInputIDs

func (m *ListingMutation) RemoveInputIDs(ids ...string)

RemoveInputIDs removes the "inputs" edge to the Amount entity by IDs.

func (*ListingMutation) RemoveOutputIDs

func (m *ListingMutation) RemoveOutputIDs(ids ...string)

RemoveOutputIDs removes the "outputs" edge to the Amount entity by IDs.

func (*ListingMutation) RemovedEdges

func (m *ListingMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ListingMutation) RemovedIDs

func (m *ListingMutation) 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 (*ListingMutation) RemovedInputsIDs

func (m *ListingMutation) RemovedInputsIDs() (ids []string)

RemovedInputs returns the removed IDs of the "inputs" edge to the Amount entity.

func (*ListingMutation) RemovedOutputsIDs

func (m *ListingMutation) RemovedOutputsIDs() (ids []string)

RemovedOutputs returns the removed IDs of the "outputs" edge to the Amount entity.

func (*ListingMutation) ResetActive

func (m *ListingMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*ListingMutation) ResetDope

func (m *ListingMutation) ResetDope()

ResetDope resets all changes to the "dope" edge.

func (*ListingMutation) ResetDopeLastsales

func (m *ListingMutation) ResetDopeLastsales()

ResetDopeLastsales resets all changes to the "dope_lastsales" edge.

func (*ListingMutation) ResetEdge

func (m *ListingMutation) 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 (*ListingMutation) ResetField

func (m *ListingMutation) 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 (*ListingMutation) ResetInputs

func (m *ListingMutation) ResetInputs()

ResetInputs resets all changes to the "inputs" edge.

func (*ListingMutation) ResetOutputs

func (m *ListingMutation) ResetOutputs()

ResetOutputs resets all changes to the "outputs" edge.

func (*ListingMutation) ResetSeaportOrder

func (m *ListingMutation) ResetSeaportOrder()

ResetSeaportOrder resets all changes to the "seaport_order" field.

func (*ListingMutation) ResetSource

func (m *ListingMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*ListingMutation) ResetWyvernOrder

func (m *ListingMutation) ResetWyvernOrder()

ResetWyvernOrder resets all changes to the "wyvern_order" field.

func (*ListingMutation) SeaportOrder

func (m *ListingMutation) SeaportOrder() (r json.RawMessage, exists bool)

SeaportOrder returns the value of the "seaport_order" field in the mutation.

func (*ListingMutation) SeaportOrderCleared

func (m *ListingMutation) SeaportOrderCleared() bool

SeaportOrderCleared returns if the "seaport_order" field was cleared in this mutation.

func (*ListingMutation) SetActive

func (m *ListingMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*ListingMutation) SetDopeID

func (m *ListingMutation) SetDopeID(id string)

SetDopeID sets the "dope" edge to the Dope entity by id.

func (*ListingMutation) SetDopeLastsalesID

func (m *ListingMutation) SetDopeLastsalesID(id string)

SetDopeLastsalesID sets the "dope_lastsales" edge to the Dope entity by id.

func (*ListingMutation) SetField

func (m *ListingMutation) 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 (*ListingMutation) SetID

func (m *ListingMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Listing entities.

func (*ListingMutation) SetSeaportOrder

func (m *ListingMutation) SetSeaportOrder(jm json.RawMessage)

SetSeaportOrder sets the "seaport_order" field.

func (*ListingMutation) SetSource

func (m *ListingMutation) SetSource(l listing.Source)

SetSource sets the "source" field.

func (*ListingMutation) SetWyvernOrder

func (m *ListingMutation) SetWyvernOrder(jm json.RawMessage)

SetWyvernOrder sets the "wyvern_order" field.

func (*ListingMutation) Source

func (m *ListingMutation) Source() (r listing.Source, exists bool)

Source returns the value of the "source" field in the mutation.

func (ListingMutation) Tx

func (m ListingMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ListingMutation) Type

func (m *ListingMutation) Type() string

Type returns the node type of this mutation (Listing).

func (*ListingMutation) Where

func (m *ListingMutation) Where(ps ...predicate.Listing)

Where appends a list predicates to the ListingMutation builder.

func (*ListingMutation) WyvernOrder

func (m *ListingMutation) WyvernOrder() (r json.RawMessage, exists bool)

WyvernOrder returns the value of the "wyvern_order" field in the mutation.

func (*ListingMutation) WyvernOrderCleared

func (m *ListingMutation) WyvernOrderCleared() bool

WyvernOrderCleared returns if the "wyvern_order" field was cleared in this mutation.

type ListingOrder

type ListingOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *ListingOrderField `json:"field"`
}

ListingOrder defines the ordering of Listing.

type ListingOrderField

type ListingOrderField struct {
	// contains filtered or unexported fields
}

ListingOrderField defines the ordering field of Listing.

type ListingPaginateOption

type ListingPaginateOption func(*listingPager) error

ListingPaginateOption enables pagination customization.

func WithListingFilter

func WithListingFilter(filter func(*ListingQuery) (*ListingQuery, error)) ListingPaginateOption

WithListingFilter configures pagination filter.

func WithListingOrder

func WithListingOrder(order *ListingOrder) ListingPaginateOption

WithListingOrder configures pagination ordering.

type ListingQuery

type ListingQuery struct {
	// contains filtered or unexported fields
}

ListingQuery is the builder for querying Listing entities.

func (*ListingQuery) All

func (lq *ListingQuery) All(ctx context.Context) ([]*Listing, error)

All executes the query and returns a list of Listings.

func (*ListingQuery) AllX

func (lq *ListingQuery) AllX(ctx context.Context) []*Listing

AllX is like All, but panics if an error occurs.

func (*ListingQuery) Clone

func (lq *ListingQuery) Clone() *ListingQuery

Clone returns a duplicate of the ListingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ListingQuery) CollectFields

func (l *ListingQuery) CollectFields(ctx context.Context, satisfies ...string) *ListingQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ListingQuery) Count

func (lq *ListingQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ListingQuery) CountX

func (lq *ListingQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ListingQuery) Exist

func (lq *ListingQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ListingQuery) ExistX

func (lq *ListingQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ListingQuery) First

func (lq *ListingQuery) First(ctx context.Context) (*Listing, error)

First returns the first Listing entity from the query. Returns a *NotFoundError when no Listing was found.

func (*ListingQuery) FirstID

func (lq *ListingQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Listing ID from the query. Returns a *NotFoundError when no Listing ID was found.

func (*ListingQuery) FirstIDX

func (lq *ListingQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*ListingQuery) FirstX

func (lq *ListingQuery) FirstX(ctx context.Context) *Listing

FirstX is like First, but panics if an error occurs.

func (*ListingQuery) GroupBy

func (lq *ListingQuery) GroupBy(field string, fields ...string) *ListingGroupBy

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 {
	Active bool `json:"active,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Listing.Query().
	GroupBy(listing.FieldActive).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ListingQuery) IDs

func (lq *ListingQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Listing IDs.

func (*ListingQuery) IDsX

func (lq *ListingQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*ListingQuery) Limit

func (lq *ListingQuery) Limit(limit int) *ListingQuery

Limit adds a limit step to the query.

func (*ListingQuery) Offset

func (lq *ListingQuery) Offset(offset int) *ListingQuery

Offset adds an offset step to the query.

func (*ListingQuery) Only

func (lq *ListingQuery) Only(ctx context.Context) (*Listing, error)

Only returns a single Listing entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Listing entity is found. Returns a *NotFoundError when no Listing entities are found.

func (*ListingQuery) OnlyID

func (lq *ListingQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Listing ID in the query. Returns a *NotSingularError when more than one Listing ID is found. Returns a *NotFoundError when no entities are found.

func (*ListingQuery) OnlyIDX

func (lq *ListingQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ListingQuery) OnlyX

func (lq *ListingQuery) OnlyX(ctx context.Context) *Listing

OnlyX is like Only, but panics if an error occurs.

func (*ListingQuery) Order

func (lq *ListingQuery) Order(o ...OrderFunc) *ListingQuery

Order adds an order step to the query.

func (*ListingQuery) Paginate

func (l *ListingQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ListingPaginateOption,
) (*ListingConnection, error)

Paginate executes the query and returns a relay based cursor connection to Listing.

func (*ListingQuery) QueryDope

func (lq *ListingQuery) QueryDope() *DopeQuery

QueryDope chains the current query on the "dope" edge.

func (*ListingQuery) QueryDopeLastsales

func (lq *ListingQuery) QueryDopeLastsales() *DopeQuery

QueryDopeLastsales chains the current query on the "dope_lastsales" edge.

func (*ListingQuery) QueryInputs

func (lq *ListingQuery) QueryInputs() *AmountQuery

QueryInputs chains the current query on the "inputs" edge.

func (*ListingQuery) QueryOutputs

func (lq *ListingQuery) QueryOutputs() *AmountQuery

QueryOutputs chains the current query on the "outputs" edge.

func (*ListingQuery) Select

func (lq *ListingQuery) Select(fields ...string) *ListingSelect

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 {
	Active bool `json:"active,omitempty"`
}

client.Listing.Query().
	Select(listing.FieldActive).
	Scan(ctx, &v)

func (*ListingQuery) Unique

func (lq *ListingQuery) Unique(unique bool) *ListingQuery

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 (*ListingQuery) Where

func (lq *ListingQuery) Where(ps ...predicate.Listing) *ListingQuery

Where adds a new predicate for the ListingQuery builder.

func (*ListingQuery) WithDope

func (lq *ListingQuery) WithDope(opts ...func(*DopeQuery)) *ListingQuery

WithDope tells the query-builder to eager-load the nodes that are connected to the "dope" edge. The optional arguments are used to configure the query builder of the edge.

func (*ListingQuery) WithDopeLastsales

func (lq *ListingQuery) WithDopeLastsales(opts ...func(*DopeQuery)) *ListingQuery

WithDopeLastsales tells the query-builder to eager-load the nodes that are connected to the "dope_lastsales" edge. The optional arguments are used to configure the query builder of the edge.

func (*ListingQuery) WithInputs

func (lq *ListingQuery) WithInputs(opts ...func(*AmountQuery)) *ListingQuery

WithInputs tells the query-builder to eager-load the nodes that are connected to the "inputs" edge. The optional arguments are used to configure the query builder of the edge.

func (*ListingQuery) WithOutputs

func (lq *ListingQuery) WithOutputs(opts ...func(*AmountQuery)) *ListingQuery

WithOutputs tells the query-builder to eager-load the nodes that are connected to the "outputs" edge. The optional arguments are used to configure the query builder of the edge.

type ListingSelect

type ListingSelect struct {
	*ListingQuery
	// contains filtered or unexported fields
}

ListingSelect is the builder for selecting fields of Listing entities.

func (*ListingSelect) Bool

func (ls *ListingSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ListingSelect) BoolX

func (ls *ListingSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ListingSelect) Bools

func (ls *ListingSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ListingSelect) BoolsX

func (ls *ListingSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ListingSelect) Float64

func (ls *ListingSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ListingSelect) Float64X

func (ls *ListingSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ListingSelect) Float64s

func (ls *ListingSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ListingSelect) Float64sX

func (ls *ListingSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ListingSelect) Int

func (ls *ListingSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ListingSelect) IntX

func (ls *ListingSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ListingSelect) Ints

func (ls *ListingSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ListingSelect) IntsX

func (ls *ListingSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ListingSelect) Scan

func (ls *ListingSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*ListingSelect) ScanX

func (ls *ListingSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ListingSelect) String

func (ls *ListingSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ListingSelect) StringX

func (ls *ListingSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ListingSelect) Strings

func (ls *ListingSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ListingSelect) StringsX

func (ls *ListingSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ListingUpdate

type ListingUpdate struct {
	// contains filtered or unexported fields
}

ListingUpdate is the builder for updating Listing entities.

func (*ListingUpdate) AddInputIDs

func (lu *ListingUpdate) AddInputIDs(ids ...string) *ListingUpdate

AddInputIDs adds the "inputs" edge to the Amount entity by IDs.

func (*ListingUpdate) AddInputs

func (lu *ListingUpdate) AddInputs(a ...*Amount) *ListingUpdate

AddInputs adds the "inputs" edges to the Amount entity.

func (*ListingUpdate) AddOutputIDs

func (lu *ListingUpdate) AddOutputIDs(ids ...string) *ListingUpdate

AddOutputIDs adds the "outputs" edge to the Amount entity by IDs.

func (*ListingUpdate) AddOutputs

func (lu *ListingUpdate) AddOutputs(a ...*Amount) *ListingUpdate

AddOutputs adds the "outputs" edges to the Amount entity.

func (*ListingUpdate) ClearDope

func (lu *ListingUpdate) ClearDope() *ListingUpdate

ClearDope clears the "dope" edge to the Dope entity.

func (*ListingUpdate) ClearDopeLastsales

func (lu *ListingUpdate) ClearDopeLastsales() *ListingUpdate

ClearDopeLastsales clears the "dope_lastsales" edge to the Dope entity.

func (*ListingUpdate) ClearInputs

func (lu *ListingUpdate) ClearInputs() *ListingUpdate

ClearInputs clears all "inputs" edges to the Amount entity.

func (*ListingUpdate) ClearOutputs

func (lu *ListingUpdate) ClearOutputs() *ListingUpdate

ClearOutputs clears all "outputs" edges to the Amount entity.

func (*ListingUpdate) ClearSeaportOrder

func (lu *ListingUpdate) ClearSeaportOrder() *ListingUpdate

ClearSeaportOrder clears the value of the "seaport_order" field.

func (*ListingUpdate) ClearWyvernOrder

func (lu *ListingUpdate) ClearWyvernOrder() *ListingUpdate

ClearWyvernOrder clears the value of the "wyvern_order" field.

func (*ListingUpdate) Exec

func (lu *ListingUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ListingUpdate) ExecX

func (lu *ListingUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ListingUpdate) Mutation

func (lu *ListingUpdate) Mutation() *ListingMutation

Mutation returns the ListingMutation object of the builder.

func (*ListingUpdate) RemoveInputIDs

func (lu *ListingUpdate) RemoveInputIDs(ids ...string) *ListingUpdate

RemoveInputIDs removes the "inputs" edge to Amount entities by IDs.

func (*ListingUpdate) RemoveInputs

func (lu *ListingUpdate) RemoveInputs(a ...*Amount) *ListingUpdate

RemoveInputs removes "inputs" edges to Amount entities.

func (*ListingUpdate) RemoveOutputIDs

func (lu *ListingUpdate) RemoveOutputIDs(ids ...string) *ListingUpdate

RemoveOutputIDs removes the "outputs" edge to Amount entities by IDs.

func (*ListingUpdate) RemoveOutputs

func (lu *ListingUpdate) RemoveOutputs(a ...*Amount) *ListingUpdate

RemoveOutputs removes "outputs" edges to Amount entities.

func (*ListingUpdate) Save

func (lu *ListingUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ListingUpdate) SaveX

func (lu *ListingUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ListingUpdate) SetActive

func (lu *ListingUpdate) SetActive(b bool) *ListingUpdate

SetActive sets the "active" field.

func (*ListingUpdate) SetDope

func (lu *ListingUpdate) SetDope(d *Dope) *ListingUpdate

SetDope sets the "dope" edge to the Dope entity.

func (*ListingUpdate) SetDopeID

func (lu *ListingUpdate) SetDopeID(id string) *ListingUpdate

SetDopeID sets the "dope" edge to the Dope entity by ID.

func (*ListingUpdate) SetDopeLastsales

func (lu *ListingUpdate) SetDopeLastsales(d *Dope) *ListingUpdate

SetDopeLastsales sets the "dope_lastsales" edge to the Dope entity.

func (*ListingUpdate) SetDopeLastsalesID

func (lu *ListingUpdate) SetDopeLastsalesID(id string) *ListingUpdate

SetDopeLastsalesID sets the "dope_lastsales" edge to the Dope entity by ID.

func (*ListingUpdate) SetNillableDopeID

func (lu *ListingUpdate) SetNillableDopeID(id *string) *ListingUpdate

SetNillableDopeID sets the "dope" edge to the Dope entity by ID if the given value is not nil.

func (*ListingUpdate) SetNillableDopeLastsalesID

func (lu *ListingUpdate) SetNillableDopeLastsalesID(id *string) *ListingUpdate

SetNillableDopeLastsalesID sets the "dope_lastsales" edge to the Dope entity by ID if the given value is not nil.

func (*ListingUpdate) SetSeaportOrder

func (lu *ListingUpdate) SetSeaportOrder(jm json.RawMessage) *ListingUpdate

SetSeaportOrder sets the "seaport_order" field.

func (*ListingUpdate) SetWyvernOrder

func (lu *ListingUpdate) SetWyvernOrder(jm json.RawMessage) *ListingUpdate

SetWyvernOrder sets the "wyvern_order" field.

func (*ListingUpdate) Where

func (lu *ListingUpdate) Where(ps ...predicate.Listing) *ListingUpdate

Where appends a list predicates to the ListingUpdate builder.

type ListingUpdateOne

type ListingUpdateOne struct {
	// contains filtered or unexported fields
}

ListingUpdateOne is the builder for updating a single Listing entity.

func (*ListingUpdateOne) AddInputIDs

func (luo *ListingUpdateOne) AddInputIDs(ids ...string) *ListingUpdateOne

AddInputIDs adds the "inputs" edge to the Amount entity by IDs.

func (*ListingUpdateOne) AddInputs

func (luo *ListingUpdateOne) AddInputs(a ...*Amount) *ListingUpdateOne

AddInputs adds the "inputs" edges to the Amount entity.

func (*ListingUpdateOne) AddOutputIDs

func (luo *ListingUpdateOne) AddOutputIDs(ids ...string) *ListingUpdateOne

AddOutputIDs adds the "outputs" edge to the Amount entity by IDs.

func (*ListingUpdateOne) AddOutputs

func (luo *ListingUpdateOne) AddOutputs(a ...*Amount) *ListingUpdateOne

AddOutputs adds the "outputs" edges to the Amount entity.

func (*ListingUpdateOne) ClearDope

func (luo *ListingUpdateOne) ClearDope() *ListingUpdateOne

ClearDope clears the "dope" edge to the Dope entity.

func (*ListingUpdateOne) ClearDopeLastsales

func (luo *ListingUpdateOne) ClearDopeLastsales() *ListingUpdateOne

ClearDopeLastsales clears the "dope_lastsales" edge to the Dope entity.

func (*ListingUpdateOne) ClearInputs

func (luo *ListingUpdateOne) ClearInputs() *ListingUpdateOne

ClearInputs clears all "inputs" edges to the Amount entity.

func (*ListingUpdateOne) ClearOutputs

func (luo *ListingUpdateOne) ClearOutputs() *ListingUpdateOne

ClearOutputs clears all "outputs" edges to the Amount entity.

func (*ListingUpdateOne) ClearSeaportOrder

func (luo *ListingUpdateOne) ClearSeaportOrder() *ListingUpdateOne

ClearSeaportOrder clears the value of the "seaport_order" field.

func (*ListingUpdateOne) ClearWyvernOrder

func (luo *ListingUpdateOne) ClearWyvernOrder() *ListingUpdateOne

ClearWyvernOrder clears the value of the "wyvern_order" field.

func (*ListingUpdateOne) Exec

func (luo *ListingUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ListingUpdateOne) ExecX

func (luo *ListingUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ListingUpdateOne) Mutation

func (luo *ListingUpdateOne) Mutation() *ListingMutation

Mutation returns the ListingMutation object of the builder.

func (*ListingUpdateOne) RemoveInputIDs

func (luo *ListingUpdateOne) RemoveInputIDs(ids ...string) *ListingUpdateOne

RemoveInputIDs removes the "inputs" edge to Amount entities by IDs.

func (*ListingUpdateOne) RemoveInputs

func (luo *ListingUpdateOne) RemoveInputs(a ...*Amount) *ListingUpdateOne

RemoveInputs removes "inputs" edges to Amount entities.

func (*ListingUpdateOne) RemoveOutputIDs

func (luo *ListingUpdateOne) RemoveOutputIDs(ids ...string) *ListingUpdateOne

RemoveOutputIDs removes the "outputs" edge to Amount entities by IDs.

func (*ListingUpdateOne) RemoveOutputs

func (luo *ListingUpdateOne) RemoveOutputs(a ...*Amount) *ListingUpdateOne

RemoveOutputs removes "outputs" edges to Amount entities.

func (*ListingUpdateOne) Save

func (luo *ListingUpdateOne) Save(ctx context.Context) (*Listing, error)

Save executes the query and returns the updated Listing entity.

func (*ListingUpdateOne) SaveX

func (luo *ListingUpdateOne) SaveX(ctx context.Context) *Listing

SaveX is like Save, but panics if an error occurs.

func (*ListingUpdateOne) Select

func (luo *ListingUpdateOne) Select(field string, fields ...string) *ListingUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ListingUpdateOne) SetActive

func (luo *ListingUpdateOne) SetActive(b bool) *ListingUpdateOne

SetActive sets the "active" field.

func (*ListingUpdateOne) SetDope

func (luo *ListingUpdateOne) SetDope(d *Dope) *ListingUpdateOne

SetDope sets the "dope" edge to the Dope entity.

func (*ListingUpdateOne) SetDopeID

func (luo *ListingUpdateOne) SetDopeID(id string) *ListingUpdateOne

SetDopeID sets the "dope" edge to the Dope entity by ID.

func (*ListingUpdateOne) SetDopeLastsales

func (luo *ListingUpdateOne) SetDopeLastsales(d *Dope) *ListingUpdateOne

SetDopeLastsales sets the "dope_lastsales" edge to the Dope entity.

func (*ListingUpdateOne) SetDopeLastsalesID

func (luo *ListingUpdateOne) SetDopeLastsalesID(id string) *ListingUpdateOne

SetDopeLastsalesID sets the "dope_lastsales" edge to the Dope entity by ID.

func (*ListingUpdateOne) SetNillableDopeID

func (luo *ListingUpdateOne) SetNillableDopeID(id *string) *ListingUpdateOne

SetNillableDopeID sets the "dope" edge to the Dope entity by ID if the given value is not nil.

func (*ListingUpdateOne) SetNillableDopeLastsalesID

func (luo *ListingUpdateOne) SetNillableDopeLastsalesID(id *string) *ListingUpdateOne

SetNillableDopeLastsalesID sets the "dope_lastsales" edge to the Dope entity by ID if the given value is not nil.

func (*ListingUpdateOne) SetSeaportOrder

func (luo *ListingUpdateOne) SetSeaportOrder(jm json.RawMessage) *ListingUpdateOne

SetSeaportOrder sets the "seaport_order" field.

func (*ListingUpdateOne) SetWyvernOrder

func (luo *ListingUpdateOne) SetWyvernOrder(jm json.RawMessage) *ListingUpdateOne

SetWyvernOrder sets the "wyvern_order" field.

type ListingUpsert

type ListingUpsert struct {
	*sql.UpdateSet
}

ListingUpsert is the "OnConflict" setter.

func (*ListingUpsert) ClearSeaportOrder

func (u *ListingUpsert) ClearSeaportOrder() *ListingUpsert

ClearSeaportOrder clears the value of the "seaport_order" field.

func (*ListingUpsert) ClearWyvernOrder

func (u *ListingUpsert) ClearWyvernOrder() *ListingUpsert

ClearWyvernOrder clears the value of the "wyvern_order" field.

func (*ListingUpsert) SetActive

func (u *ListingUpsert) SetActive(v bool) *ListingUpsert

SetActive sets the "active" field.

func (*ListingUpsert) SetSeaportOrder

func (u *ListingUpsert) SetSeaportOrder(v json.RawMessage) *ListingUpsert

SetSeaportOrder sets the "seaport_order" field.

func (*ListingUpsert) SetSource

func (u *ListingUpsert) SetSource(v listing.Source) *ListingUpsert

SetSource sets the "source" field.

func (*ListingUpsert) SetWyvernOrder

func (u *ListingUpsert) SetWyvernOrder(v json.RawMessage) *ListingUpsert

SetWyvernOrder sets the "wyvern_order" field.

func (*ListingUpsert) UpdateActive

func (u *ListingUpsert) UpdateActive() *ListingUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*ListingUpsert) UpdateSeaportOrder

func (u *ListingUpsert) UpdateSeaportOrder() *ListingUpsert

UpdateSeaportOrder sets the "seaport_order" field to the value that was provided on create.

func (*ListingUpsert) UpdateSource

func (u *ListingUpsert) UpdateSource() *ListingUpsert

UpdateSource sets the "source" field to the value that was provided on create.

func (*ListingUpsert) UpdateWyvernOrder

func (u *ListingUpsert) UpdateWyvernOrder() *ListingUpsert

UpdateWyvernOrder sets the "wyvern_order" field to the value that was provided on create.

type ListingUpsertBulk

type ListingUpsertBulk struct {
	// contains filtered or unexported fields
}

ListingUpsertBulk is the builder for "upsert"-ing a bulk of Listing nodes.

func (*ListingUpsertBulk) ClearSeaportOrder

func (u *ListingUpsertBulk) ClearSeaportOrder() *ListingUpsertBulk

ClearSeaportOrder clears the value of the "seaport_order" field.

func (*ListingUpsertBulk) ClearWyvernOrder

func (u *ListingUpsertBulk) ClearWyvernOrder() *ListingUpsertBulk

ClearWyvernOrder clears the value of the "wyvern_order" field.

func (*ListingUpsertBulk) DoNothing

func (u *ListingUpsertBulk) DoNothing() *ListingUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ListingUpsertBulk) Exec

func (u *ListingUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ListingUpsertBulk) ExecX

func (u *ListingUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ListingUpsertBulk) Ignore

func (u *ListingUpsertBulk) Ignore() *ListingUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Listing.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ListingUpsertBulk) SetActive

func (u *ListingUpsertBulk) SetActive(v bool) *ListingUpsertBulk

SetActive sets the "active" field.

func (*ListingUpsertBulk) SetSeaportOrder

func (u *ListingUpsertBulk) SetSeaportOrder(v json.RawMessage) *ListingUpsertBulk

SetSeaportOrder sets the "seaport_order" field.

func (*ListingUpsertBulk) SetSource

SetSource sets the "source" field.

func (*ListingUpsertBulk) SetWyvernOrder

func (u *ListingUpsertBulk) SetWyvernOrder(v json.RawMessage) *ListingUpsertBulk

SetWyvernOrder sets the "wyvern_order" field.

func (*ListingUpsertBulk) Update

func (u *ListingUpsertBulk) Update(set func(*ListingUpsert)) *ListingUpsertBulk

Update allows overriding fields `UPDATE` values. See the ListingCreateBulk.OnConflict documentation for more info.

func (*ListingUpsertBulk) UpdateActive

func (u *ListingUpsertBulk) UpdateActive() *ListingUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*ListingUpsertBulk) UpdateNewValues

func (u *ListingUpsertBulk) UpdateNewValues() *ListingUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Listing.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(listing.FieldID)
		}),
	).
	Exec(ctx)

func (*ListingUpsertBulk) UpdateSeaportOrder

func (u *ListingUpsertBulk) UpdateSeaportOrder() *ListingUpsertBulk

UpdateSeaportOrder sets the "seaport_order" field to the value that was provided on create.

func (*ListingUpsertBulk) UpdateSource

func (u *ListingUpsertBulk) UpdateSource() *ListingUpsertBulk

UpdateSource sets the "source" field to the value that was provided on create.

func (*ListingUpsertBulk) UpdateWyvernOrder

func (u *ListingUpsertBulk) UpdateWyvernOrder() *ListingUpsertBulk

UpdateWyvernOrder sets the "wyvern_order" field to the value that was provided on create.

type ListingUpsertOne

type ListingUpsertOne struct {
	// contains filtered or unexported fields
}

ListingUpsertOne is the builder for "upsert"-ing

one Listing node.

func (*ListingUpsertOne) ClearSeaportOrder

func (u *ListingUpsertOne) ClearSeaportOrder() *ListingUpsertOne

ClearSeaportOrder clears the value of the "seaport_order" field.

func (*ListingUpsertOne) ClearWyvernOrder

func (u *ListingUpsertOne) ClearWyvernOrder() *ListingUpsertOne

ClearWyvernOrder clears the value of the "wyvern_order" field.

func (*ListingUpsertOne) DoNothing

func (u *ListingUpsertOne) DoNothing() *ListingUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ListingUpsertOne) Exec

func (u *ListingUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ListingUpsertOne) ExecX

func (u *ListingUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ListingUpsertOne) ID

func (u *ListingUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ListingUpsertOne) IDX

func (u *ListingUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*ListingUpsertOne) Ignore

func (u *ListingUpsertOne) Ignore() *ListingUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Listing.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ListingUpsertOne) SetActive

func (u *ListingUpsertOne) SetActive(v bool) *ListingUpsertOne

SetActive sets the "active" field.

func (*ListingUpsertOne) SetSeaportOrder

func (u *ListingUpsertOne) SetSeaportOrder(v json.RawMessage) *ListingUpsertOne

SetSeaportOrder sets the "seaport_order" field.

func (*ListingUpsertOne) SetSource

SetSource sets the "source" field.

func (*ListingUpsertOne) SetWyvernOrder

func (u *ListingUpsertOne) SetWyvernOrder(v json.RawMessage) *ListingUpsertOne

SetWyvernOrder sets the "wyvern_order" field.

func (*ListingUpsertOne) Update

func (u *ListingUpsertOne) Update(set func(*ListingUpsert)) *ListingUpsertOne

Update allows overriding fields `UPDATE` values. See the ListingCreate.OnConflict documentation for more info.

func (*ListingUpsertOne) UpdateActive

func (u *ListingUpsertOne) UpdateActive() *ListingUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*ListingUpsertOne) UpdateNewValues

func (u *ListingUpsertOne) UpdateNewValues() *ListingUpsertOne

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.Listing.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(listing.FieldID)
		}),
	).
	Exec(ctx)

func (*ListingUpsertOne) UpdateSeaportOrder

func (u *ListingUpsertOne) UpdateSeaportOrder() *ListingUpsertOne

UpdateSeaportOrder sets the "seaport_order" field to the value that was provided on create.

func (*ListingUpsertOne) UpdateSource

func (u *ListingUpsertOne) UpdateSource() *ListingUpsertOne

UpdateSource sets the "source" field to the value that was provided on create.

func (*ListingUpsertOne) UpdateWyvernOrder

func (u *ListingUpsertOne) UpdateWyvernOrder() *ListingUpsertOne

UpdateWyvernOrder sets the "wyvern_order" field to the value that was provided on create.

type ListingWhereInput

type ListingWhereInput struct {
	Not *ListingWhereInput   `json:"not,omitempty"`
	Or  []*ListingWhereInput `json:"or,omitempty"`
	And []*ListingWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "active" field predicates.
	Active    *bool `json:"active,omitempty"`
	ActiveNEQ *bool `json:"activeNEQ,omitempty"`

	// "source" field predicates.
	Source      *listing.Source  `json:"source,omitempty"`
	SourceNEQ   *listing.Source  `json:"sourceNEQ,omitempty"`
	SourceIn    []listing.Source `json:"sourceIn,omitempty"`
	SourceNotIn []listing.Source `json:"sourceNotIn,omitempty"`

	// "dope" edge predicates.
	HasDope     *bool             `json:"hasDope,omitempty"`
	HasDopeWith []*DopeWhereInput `json:"hasDopeWith,omitempty"`

	// "dope_lastsales" edge predicates.
	HasDopeLastsales     *bool             `json:"hasDopeLastsales,omitempty"`
	HasDopeLastsalesWith []*DopeWhereInput `json:"hasDopeLastsalesWith,omitempty"`

	// "inputs" edge predicates.
	HasInputs     *bool               `json:"hasInputs,omitempty"`
	HasInputsWith []*AmountWhereInput `json:"hasInputsWith,omitempty"`

	// "outputs" edge predicates.
	HasOutputs     *bool               `json:"hasOutputs,omitempty"`
	HasOutputsWith []*AmountWhereInput `json:"hasOutputsWith,omitempty"`
}

ListingWhereInput represents a where input for filtering Listing queries.

func (*ListingWhereInput) Filter

Filter applies the ListingWhereInput filter on the ListingQuery builder.

func (*ListingWhereInput) P

P returns a predicate for filtering listings. An error is returned if the input is empty or invalid.

type Listings

type Listings []*Listing

Listings is a parsable slice of Listing.

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 Node

type Node struct {
	ID     string   `json:"id,omitempty"`     // node id.
	Type   string   `json:"type,omitempty"`   // node type.
	Fields []*Field `json:"fields,omitempty"` // node fields.
	Edges  []*Edge  `json:"edges,omitempty"`  // node edges.
}

Node in the graph.

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, string) (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 {
	Node(context.Context) (*Node, error)
}

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(...interface{})) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection string

OrderDirection defines the directions in which to order a list of items.

const (
	// OrderDirectionAsc specifies an ascending order.
	OrderDirectionAsc OrderDirection = "ASC"
	// OrderDirectionDesc specifies a descending order.
	OrderDirectionDesc OrderDirection = "DESC"
)

func (OrderDirection) MarshalGQL

func (o OrderDirection) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (OrderDirection) String

func (o OrderDirection) String() string

String implements fmt.Stringer interface.

func (*OrderDirection) UnmarshalGQL

func (o *OrderDirection) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

func (OrderDirection) Validate

func (o OrderDirection) Validate() error

Validate the order direction value.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type PageInfo

type PageInfo struct {
	HasNextPage     bool    `json:"hasNextPage"`
	HasPreviousPage bool    `json:"hasPreviousPage"`
	StartCursor     *Cursor `json:"startCursor"`
	EndCursor       *Cursor `json:"endCursor"`
}

PageInfo of a connection type.

type Policy

type Policy = ent.Policy

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 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 Search struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type search.Type `json:"type,omitempty"`
	// Greatness holds the value of the "greatness" field.
	Greatness int `json:"greatness,omitempty"`
	// Claimed holds the value of the "claimed" field.
	Claimed bool `json:"claimed,omitempty"`
	// Opened holds the value of the "opened" field.
	Opened bool `json:"opened,omitempty"`
	// SaleActive holds the value of the "sale_active" field.
	SaleActive bool `json:"sale_active,omitempty"`
	// SalePrice holds the value of the "sale_price" field.
	SalePrice schema.BigInt `json:"sale_price,omitempty"`
	// LastSalePrice holds the value of the "last_sale_price" field.
	LastSalePrice schema.BigInt `json:"last_sale_price,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SearchQuery when eager-loading is set.
	Edges SearchEdges `json:"edges"`
	// contains filtered or unexported fields
}

Search is the model entity for the Search schema.

func (*Search) Dope

func (s *Search) Dope(ctx context.Context) (*Dope, error)

func (*Search) Hustler

func (s *Search) Hustler(ctx context.Context) (*Hustler, error)

func (*Search) Item

func (s *Search) Item(ctx context.Context) (*Item, error)

func (*Search) Node

func (s *Search) Node(ctx context.Context) (node *Node, err error)

func (*Search) QueryDope

func (s *Search) QueryDope() *DopeQuery

QueryDope queries the "dope" edge of the Search entity.

func (*Search) QueryHustler

func (s *Search) QueryHustler() *HustlerQuery

QueryHustler queries the "hustler" edge of the Search entity.

func (*Search) QueryItem

func (s *Search) QueryItem() *ItemQuery

QueryItem queries the "item" edge of the Search entity.

func (*Search) String

func (s *Search) String() string

String implements the fmt.Stringer.

func (*Search) ToEdge

func (s *Search) ToEdge(order *SearchOrder) *SearchEdge

ToEdge converts Search into SearchEdge.

func (*Search) Unwrap

func (s *Search) Unwrap() *Search

Unwrap unwraps the Search 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 (*Search) Update

func (s *Search) Update() *SearchUpdateOne

Update returns a builder for updating this Search. Note that you need to call Search.Unwrap() before calling this method if this Search was returned from a transaction, and the transaction was committed or rolled back.

type SearchClient

type SearchClient struct {
	// contains filtered or unexported fields
}

SearchClient is a client for the Search schema.

func NewSearchClient

func NewSearchClient(c config) *SearchClient

NewSearchClient returns a client for the Search from the given config.

func (*SearchClient) Create

func (c *SearchClient) Create() *SearchCreate

Create returns a create builder for Search.

func (*SearchClient) CreateBulk

func (c *SearchClient) CreateBulk(builders ...*SearchCreate) *SearchCreateBulk

CreateBulk returns a builder for creating a bulk of Search entities.

func (*SearchClient) Delete

func (c *SearchClient) Delete() *SearchDelete

Delete returns a delete builder for Search.

func (*SearchClient) DeleteOne

func (c *SearchClient) DeleteOne(s *Search) *SearchDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SearchClient) DeleteOneID

func (c *SearchClient) DeleteOneID(id string) *SearchDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SearchClient) Get

func (c *SearchClient) Get(ctx context.Context, id string) (*Search, error)

Get returns a Search entity by its id.

func (*SearchClient) GetX

func (c *SearchClient) GetX(ctx context.Context, id string) *Search

GetX is like Get, but panics if an error occurs.

func (*SearchClient) Hooks

func (c *SearchClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SearchClient) Query

func (c *SearchClient) Query() *SearchQuery

Query returns a query builder for Search.

func (*SearchClient) QueryDope

func (c *SearchClient) QueryDope(s *Search) *DopeQuery

QueryDope queries the dope edge of a Search.

func (*SearchClient) QueryHustler

func (c *SearchClient) QueryHustler(s *Search) *HustlerQuery

QueryHustler queries the hustler edge of a Search.

func (*SearchClient) QueryItem

func (c *SearchClient) QueryItem(s *Search) *ItemQuery

QueryItem queries the item edge of a Search.

func (*SearchClient) Update

func (c *SearchClient) Update() *SearchUpdate

Update returns an update builder for Search.

func (*SearchClient) UpdateOne

func (c *SearchClient) UpdateOne(s *Search) *SearchUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SearchClient) UpdateOneID

func (c *SearchClient) UpdateOneID(id string) *SearchUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SearchClient) Use

func (c *SearchClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `search.Hooks(f(g(h())))`.

type SearchConnection

type SearchConnection struct {
	Edges      []*SearchEdge `json:"edges"`
	PageInfo   PageInfo      `json:"pageInfo"`
	TotalCount int           `json:"totalCount"`
}

SearchConnection is the connection containing edges to Search.

type SearchCreate

type SearchCreate struct {
	// contains filtered or unexported fields
}

SearchCreate is the builder for creating a Search entity.

func (*SearchCreate) Exec

func (sc *SearchCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SearchCreate) ExecX

func (sc *SearchCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SearchCreate) Mutation

func (sc *SearchCreate) Mutation() *SearchMutation

Mutation returns the SearchMutation object of the builder.

func (*SearchCreate) OnConflict

func (sc *SearchCreate) OnConflict(opts ...sql.ConflictOption) *SearchUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Search.Create().
	SetType(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.SearchUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*SearchCreate) OnConflictColumns

func (sc *SearchCreate) OnConflictColumns(columns ...string) *SearchUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Search.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SearchCreate) Save

func (sc *SearchCreate) Save(ctx context.Context) (*Search, error)

Save creates the Search in the database.

func (*SearchCreate) SaveX

func (sc *SearchCreate) SaveX(ctx context.Context) *Search

SaveX calls Save and panics if Save returns an error.

func (*SearchCreate) SetClaimed

func (sc *SearchCreate) SetClaimed(b bool) *SearchCreate

SetClaimed sets the "claimed" field.

func (*SearchCreate) SetDope

func (sc *SearchCreate) SetDope(d *Dope) *SearchCreate

SetDope sets the "dope" edge to the Dope entity.

func (*SearchCreate) SetDopeID

func (sc *SearchCreate) SetDopeID(id string) *SearchCreate

SetDopeID sets the "dope" edge to the Dope entity by ID.

func (*SearchCreate) SetGreatness

func (sc *SearchCreate) SetGreatness(i int) *SearchCreate

SetGreatness sets the "greatness" field.

func (*SearchCreate) SetHustler

func (sc *SearchCreate) SetHustler(h *Hustler) *SearchCreate

SetHustler sets the "hustler" edge to the Hustler entity.

func (*SearchCreate) SetHustlerID

func (sc *SearchCreate) SetHustlerID(id string) *SearchCreate

SetHustlerID sets the "hustler" edge to the Hustler entity by ID.

func (*SearchCreate) SetID

func (sc *SearchCreate) SetID(s string) *SearchCreate

SetID sets the "id" field.

func (*SearchCreate) SetItem

func (sc *SearchCreate) SetItem(i *Item) *SearchCreate

SetItem sets the "item" edge to the Item entity.

func (*SearchCreate) SetItemID

func (sc *SearchCreate) SetItemID(id string) *SearchCreate

SetItemID sets the "item" edge to the Item entity by ID.

func (*SearchCreate) SetLastSalePrice

func (sc *SearchCreate) SetLastSalePrice(si schema.BigInt) *SearchCreate

SetLastSalePrice sets the "last_sale_price" field.

func (*SearchCreate) SetNillableDopeID

func (sc *SearchCreate) SetNillableDopeID(id *string) *SearchCreate

SetNillableDopeID sets the "dope" edge to the Dope entity by ID if the given value is not nil.

func (*SearchCreate) SetNillableGreatness

func (sc *SearchCreate) SetNillableGreatness(i *int) *SearchCreate

SetNillableGreatness sets the "greatness" field if the given value is not nil.

func (*SearchCreate) SetNillableHustlerID

func (sc *SearchCreate) SetNillableHustlerID(id *string) *SearchCreate

SetNillableHustlerID sets the "hustler" edge to the Hustler entity by ID if the given value is not nil.

func (*SearchCreate) SetNillableItemID

func (sc *SearchCreate) SetNillableItemID(id *string) *SearchCreate

SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.

func (*SearchCreate) SetNillableLastSalePrice

func (sc *SearchCreate) SetNillableLastSalePrice(si *schema.BigInt) *SearchCreate

SetNillableLastSalePrice sets the "last_sale_price" field if the given value is not nil.

func (*SearchCreate) SetNillableSalePrice

func (sc *SearchCreate) SetNillableSalePrice(si *schema.BigInt) *SearchCreate

SetNillableSalePrice sets the "sale_price" field if the given value is not nil.

func (*SearchCreate) SetOpened

func (sc *SearchCreate) SetOpened(b bool) *SearchCreate

SetOpened sets the "opened" field.

func (*SearchCreate) SetSaleActive

func (sc *SearchCreate) SetSaleActive(b bool) *SearchCreate

SetSaleActive sets the "sale_active" field.

func (*SearchCreate) SetSalePrice

func (sc *SearchCreate) SetSalePrice(si schema.BigInt) *SearchCreate

SetSalePrice sets the "sale_price" field.

func (*SearchCreate) SetType

func (sc *SearchCreate) SetType(s search.Type) *SearchCreate

SetType sets the "type" field.

type SearchCreateBulk

type SearchCreateBulk struct {
	// contains filtered or unexported fields
}

SearchCreateBulk is the builder for creating many Search entities in bulk.

func (*SearchCreateBulk) Exec

func (scb *SearchCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SearchCreateBulk) ExecX

func (scb *SearchCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SearchCreateBulk) OnConflict

func (scb *SearchCreateBulk) OnConflict(opts ...sql.ConflictOption) *SearchUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Search.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.SearchUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*SearchCreateBulk) OnConflictColumns

func (scb *SearchCreateBulk) OnConflictColumns(columns ...string) *SearchUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Search.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SearchCreateBulk) Save

func (scb *SearchCreateBulk) Save(ctx context.Context) ([]*Search, error)

Save creates the Search entities in the database.

func (*SearchCreateBulk) SaveX

func (scb *SearchCreateBulk) SaveX(ctx context.Context) []*Search

SaveX is like Save, but panics if an error occurs.

type SearchDelete

type SearchDelete struct {
	// contains filtered or unexported fields
}

SearchDelete is the builder for deleting a Search entity.

func (*SearchDelete) Exec

func (sd *SearchDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SearchDelete) ExecX

func (sd *SearchDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SearchDelete) Where

func (sd *SearchDelete) Where(ps ...predicate.Search) *SearchDelete

Where appends a list predicates to the SearchDelete builder.

type SearchDeleteOne

type SearchDeleteOne struct {
	// contains filtered or unexported fields
}

SearchDeleteOne is the builder for deleting a single Search entity.

func (*SearchDeleteOne) Exec

func (sdo *SearchDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SearchDeleteOne) ExecX

func (sdo *SearchDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SearchEdge

type SearchEdge struct {
	Node   *Search `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

SearchEdge is the edge representation of Search.

type SearchEdges

type SearchEdges struct {
	// Dope holds the value of the dope edge.
	Dope *Dope `json:"dope,omitempty"`
	// Item holds the value of the item edge.
	Item *Item `json:"item,omitempty"`
	// Hustler holds the value of the hustler edge.
	Hustler *Hustler `json:"hustler,omitempty"`
	// contains filtered or unexported fields
}

SearchEdges holds the relations/edges for other nodes in the graph.

func (SearchEdges) DopeOrErr

func (e SearchEdges) DopeOrErr() (*Dope, error)

DopeOrErr returns the Dope value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SearchEdges) HustlerOrErr

func (e SearchEdges) HustlerOrErr() (*Hustler, error)

HustlerOrErr returns the Hustler value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SearchEdges) ItemOrErr

func (e SearchEdges) ItemOrErr() (*Item, error)

ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SearchGroupBy

type SearchGroupBy struct {
	// contains filtered or unexported fields
}

SearchGroupBy is the group-by builder for Search entities.

func (*SearchGroupBy) Aggregate

func (sgb *SearchGroupBy) Aggregate(fns ...AggregateFunc) *SearchGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SearchGroupBy) Bool

func (sgb *SearchGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SearchGroupBy) BoolX

func (sgb *SearchGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SearchGroupBy) Bools

func (sgb *SearchGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SearchGroupBy) BoolsX

func (sgb *SearchGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SearchGroupBy) Float64

func (sgb *SearchGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SearchGroupBy) Float64X

func (sgb *SearchGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SearchGroupBy) Float64s

func (sgb *SearchGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SearchGroupBy) Float64sX

func (sgb *SearchGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SearchGroupBy) Int

func (sgb *SearchGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SearchGroupBy) IntX

func (sgb *SearchGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SearchGroupBy) Ints

func (sgb *SearchGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SearchGroupBy) IntsX

func (sgb *SearchGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SearchGroupBy) Scan

func (sgb *SearchGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SearchGroupBy) ScanX

func (sgb *SearchGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SearchGroupBy) String

func (sgb *SearchGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SearchGroupBy) StringX

func (sgb *SearchGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SearchGroupBy) Strings

func (sgb *SearchGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SearchGroupBy) StringsX

func (sgb *SearchGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SearchMutation

type SearchMutation struct {
	// contains filtered or unexported fields
}

SearchMutation represents an operation that mutates the Search nodes in the graph.

func (*SearchMutation) AddField

func (m *SearchMutation) 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 (*SearchMutation) AddGreatness

func (m *SearchMutation) AddGreatness(i int)

AddGreatness adds i to the "greatness" field.

func (*SearchMutation) AddLastSalePrice

func (m *SearchMutation) AddLastSalePrice(si schema.BigInt)

AddLastSalePrice adds si to the "last_sale_price" field.

func (*SearchMutation) AddSalePrice

func (m *SearchMutation) AddSalePrice(si schema.BigInt)

AddSalePrice adds si to the "sale_price" field.

func (*SearchMutation) AddedEdges

func (m *SearchMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SearchMutation) AddedField

func (m *SearchMutation) 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 (*SearchMutation) AddedFields

func (m *SearchMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SearchMutation) AddedGreatness

func (m *SearchMutation) AddedGreatness() (r int, exists bool)

AddedGreatness returns the value that was added to the "greatness" field in this mutation.

func (*SearchMutation) AddedIDs

func (m *SearchMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SearchMutation) AddedLastSalePrice

func (m *SearchMutation) AddedLastSalePrice() (r schema.BigInt, exists bool)

AddedLastSalePrice returns the value that was added to the "last_sale_price" field in this mutation.

func (*SearchMutation) AddedSalePrice

func (m *SearchMutation) AddedSalePrice() (r schema.BigInt, exists bool)

AddedSalePrice returns the value that was added to the "sale_price" field in this mutation.

func (*SearchMutation) Claimed

func (m *SearchMutation) Claimed() (r bool, exists bool)

Claimed returns the value of the "claimed" field in the mutation.

func (*SearchMutation) ClearDope

func (m *SearchMutation) ClearDope()

ClearDope clears the "dope" edge to the Dope entity.

func (*SearchMutation) ClearEdge

func (m *SearchMutation) 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 (*SearchMutation) ClearField

func (m *SearchMutation) 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 (*SearchMutation) ClearGreatness

func (m *SearchMutation) ClearGreatness()

ClearGreatness clears the value of the "greatness" field.

func (*SearchMutation) ClearHustler

func (m *SearchMutation) ClearHustler()

ClearHustler clears the "hustler" edge to the Hustler entity.

func (*SearchMutation) ClearItem

func (m *SearchMutation) ClearItem()

ClearItem clears the "item" edge to the Item entity.

func (*SearchMutation) ClearedEdges

func (m *SearchMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SearchMutation) ClearedFields

func (m *SearchMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SearchMutation) Client

func (m SearchMutation) 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 (*SearchMutation) DopeCleared

func (m *SearchMutation) DopeCleared() bool

DopeCleared reports if the "dope" edge to the Dope entity was cleared.

func (*SearchMutation) DopeID

func (m *SearchMutation) DopeID() (id string, exists bool)

DopeID returns the "dope" edge ID in the mutation.

func (*SearchMutation) DopeIDs

func (m *SearchMutation) DopeIDs() (ids []string)

DopeIDs returns the "dope" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DopeID instead. It exists only for internal usage by the builders.

func (*SearchMutation) EdgeCleared

func (m *SearchMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SearchMutation) Field

func (m *SearchMutation) 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 (*SearchMutation) FieldCleared

func (m *SearchMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SearchMutation) Fields

func (m *SearchMutation) 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 (*SearchMutation) GetType

func (m *SearchMutation) GetType() (r search.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*SearchMutation) Greatness

func (m *SearchMutation) Greatness() (r int, exists bool)

Greatness returns the value of the "greatness" field in the mutation.

func (*SearchMutation) GreatnessCleared

func (m *SearchMutation) GreatnessCleared() bool

GreatnessCleared returns if the "greatness" field was cleared in this mutation.

func (*SearchMutation) HustlerCleared

func (m *SearchMutation) HustlerCleared() bool

HustlerCleared reports if the "hustler" edge to the Hustler entity was cleared.

func (*SearchMutation) HustlerID

func (m *SearchMutation) HustlerID() (id string, exists bool)

HustlerID returns the "hustler" edge ID in the mutation.

func (*SearchMutation) HustlerIDs

func (m *SearchMutation) HustlerIDs() (ids []string)

HustlerIDs returns the "hustler" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HustlerID instead. It exists only for internal usage by the builders.

func (*SearchMutation) ID

func (m *SearchMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SearchMutation) IDs

func (m *SearchMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SearchMutation) ItemCleared

func (m *SearchMutation) ItemCleared() bool

ItemCleared reports if the "item" edge to the Item entity was cleared.

func (*SearchMutation) ItemID

func (m *SearchMutation) ItemID() (id string, exists bool)

ItemID returns the "item" edge ID in the mutation.

func (*SearchMutation) ItemIDs

func (m *SearchMutation) ItemIDs() (ids []string)

ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.

func (*SearchMutation) LastSalePrice

func (m *SearchMutation) LastSalePrice() (r schema.BigInt, exists bool)

LastSalePrice returns the value of the "last_sale_price" field in the mutation.

func (*SearchMutation) OldClaimed

func (m *SearchMutation) OldClaimed(ctx context.Context) (v bool, err error)

OldClaimed returns the old "claimed" field's value of the Search entity. If the Search 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 (*SearchMutation) OldField

func (m *SearchMutation) 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 (*SearchMutation) OldGreatness

func (m *SearchMutation) OldGreatness(ctx context.Context) (v int, err error)

OldGreatness returns the old "greatness" field's value of the Search entity. If the Search 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 (*SearchMutation) OldLastSalePrice

func (m *SearchMutation) OldLastSalePrice(ctx context.Context) (v schema.BigInt, err error)

OldLastSalePrice returns the old "last_sale_price" field's value of the Search entity. If the Search 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 (*SearchMutation) OldOpened

func (m *SearchMutation) OldOpened(ctx context.Context) (v bool, err error)

OldOpened returns the old "opened" field's value of the Search entity. If the Search 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 (*SearchMutation) OldSaleActive

func (m *SearchMutation) OldSaleActive(ctx context.Context) (v bool, err error)

OldSaleActive returns the old "sale_active" field's value of the Search entity. If the Search 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 (*SearchMutation) OldSalePrice

func (m *SearchMutation) OldSalePrice(ctx context.Context) (v schema.BigInt, err error)

OldSalePrice returns the old "sale_price" field's value of the Search entity. If the Search 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 (*SearchMutation) OldType

func (m *SearchMutation) OldType(ctx context.Context) (v search.Type, err error)

OldType returns the old "type" field's value of the Search entity. If the Search 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 (*SearchMutation) Op

func (m *SearchMutation) Op() Op

Op returns the operation name.

func (*SearchMutation) Opened

func (m *SearchMutation) Opened() (r bool, exists bool)

Opened returns the value of the "opened" field in the mutation.

func (*SearchMutation) RemovedEdges

func (m *SearchMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SearchMutation) RemovedIDs

func (m *SearchMutation) 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 (*SearchMutation) ResetClaimed

func (m *SearchMutation) ResetClaimed()

ResetClaimed resets all changes to the "claimed" field.

func (*SearchMutation) ResetDope

func (m *SearchMutation) ResetDope()

ResetDope resets all changes to the "dope" edge.

func (*SearchMutation) ResetEdge

func (m *SearchMutation) 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 (*SearchMutation) ResetField

func (m *SearchMutation) 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 (*SearchMutation) ResetGreatness

func (m *SearchMutation) ResetGreatness()

ResetGreatness resets all changes to the "greatness" field.

func (*SearchMutation) ResetHustler

func (m *SearchMutation) ResetHustler()

ResetHustler resets all changes to the "hustler" edge.

func (*SearchMutation) ResetItem

func (m *SearchMutation) ResetItem()

ResetItem resets all changes to the "item" edge.

func (*SearchMutation) ResetLastSalePrice

func (m *SearchMutation) ResetLastSalePrice()

ResetLastSalePrice resets all changes to the "last_sale_price" field.

func (*SearchMutation) ResetOpened

func (m *SearchMutation) ResetOpened()

ResetOpened resets all changes to the "opened" field.

func (*SearchMutation) ResetSaleActive

func (m *SearchMutation) ResetSaleActive()

ResetSaleActive resets all changes to the "sale_active" field.

func (*SearchMutation) ResetSalePrice

func (m *SearchMutation) ResetSalePrice()

ResetSalePrice resets all changes to the "sale_price" field.

func (*SearchMutation) ResetType

func (m *SearchMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*SearchMutation) SaleActive

func (m *SearchMutation) SaleActive() (r bool, exists bool)

SaleActive returns the value of the "sale_active" field in the mutation.

func (*SearchMutation) SalePrice

func (m *SearchMutation) SalePrice() (r schema.BigInt, exists bool)

SalePrice returns the value of the "sale_price" field in the mutation.

func (*SearchMutation) SetClaimed

func (m *SearchMutation) SetClaimed(b bool)

SetClaimed sets the "claimed" field.

func (*SearchMutation) SetDopeID

func (m *SearchMutation) SetDopeID(id string)

SetDopeID sets the "dope" edge to the Dope entity by id.

func (*SearchMutation) SetField

func (m *SearchMutation) 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 (*SearchMutation) SetGreatness

func (m *SearchMutation) SetGreatness(i int)

SetGreatness sets the "greatness" field.

func (*SearchMutation) SetHustlerID

func (m *SearchMutation) SetHustlerID(id string)

SetHustlerID sets the "hustler" edge to the Hustler entity by id.

func (*SearchMutation) SetID

func (m *SearchMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Search entities.

func (*SearchMutation) SetItemID

func (m *SearchMutation) SetItemID(id string)

SetItemID sets the "item" edge to the Item entity by id.

func (*SearchMutation) SetLastSalePrice

func (m *SearchMutation) SetLastSalePrice(si schema.BigInt)

SetLastSalePrice sets the "last_sale_price" field.

func (*SearchMutation) SetOpened

func (m *SearchMutation) SetOpened(b bool)

SetOpened sets the "opened" field.

func (*SearchMutation) SetSaleActive

func (m *SearchMutation) SetSaleActive(b bool)

SetSaleActive sets the "sale_active" field.

func (*SearchMutation) SetSalePrice

func (m *SearchMutation) SetSalePrice(si schema.BigInt)

SetSalePrice sets the "sale_price" field.

func (*SearchMutation) SetType

func (m *SearchMutation) SetType(s search.Type)

SetType sets the "type" field.

func (SearchMutation) Tx

func (m SearchMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SearchMutation) Type

func (m *SearchMutation) Type() string

Type returns the node type of this mutation (Search).

func (*SearchMutation) Where

func (m *SearchMutation) Where(ps ...predicate.Search)

Where appends a list predicates to the SearchMutation builder.

type SearchOrder

type SearchOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *SearchOrderField `json:"field"`
}

SearchOrder defines the ordering of Search.

type SearchOrderField

type SearchOrderField struct {
	// contains filtered or unexported fields
}

SearchOrderField defines the ordering field of Search.

func (SearchOrderField) MarshalGQL

func (f SearchOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (SearchOrderField) String

func (f SearchOrderField) String() string

String implement fmt.Stringer interface.

func (*SearchOrderField) UnmarshalGQL

func (f *SearchOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type SearchPaginateOption

type SearchPaginateOption func(*searchPager) error

SearchPaginateOption enables pagination customization.

func WithSearchFilter

func WithSearchFilter(filter func(*SearchQuery) (*SearchQuery, error)) SearchPaginateOption

WithSearchFilter configures pagination filter.

func WithSearchOrder

func WithSearchOrder(order *SearchOrder) SearchPaginateOption

WithSearchOrder configures pagination ordering.

type SearchQuery

type SearchQuery struct {
	// contains filtered or unexported fields
}

SearchQuery is the builder for querying Search entities.

func (*SearchQuery) All

func (sq *SearchQuery) All(ctx context.Context) ([]*Search, error)

All executes the query and returns a list of Searches.

func (*SearchQuery) AllX

func (sq *SearchQuery) AllX(ctx context.Context) []*Search

AllX is like All, but panics if an error occurs.

func (*SearchQuery) Clone

func (sq *SearchQuery) Clone() *SearchQuery

Clone returns a duplicate of the SearchQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SearchQuery) CollectFields

func (s *SearchQuery) CollectFields(ctx context.Context, satisfies ...string) *SearchQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SearchQuery) Count

func (sq *SearchQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SearchQuery) CountX

func (sq *SearchQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SearchQuery) Exist

func (sq *SearchQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SearchQuery) ExistX

func (sq *SearchQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SearchQuery) First

func (sq *SearchQuery) First(ctx context.Context) (*Search, error)

First returns the first Search entity from the query. Returns a *NotFoundError when no Search was found.

func (*SearchQuery) FirstID

func (sq *SearchQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Search ID from the query. Returns a *NotFoundError when no Search ID was found.

func (*SearchQuery) FirstIDX

func (sq *SearchQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SearchQuery) FirstX

func (sq *SearchQuery) FirstX(ctx context.Context) *Search

FirstX is like First, but panics if an error occurs.

func (*SearchQuery) GroupBy

func (sq *SearchQuery) GroupBy(field string, fields ...string) *SearchGroupBy

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 {
	Type search.Type `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Search.Query().
	GroupBy(search.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SearchQuery) IDs

func (sq *SearchQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Search IDs.

func (*SearchQuery) IDsX

func (sq *SearchQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SearchQuery) Limit

func (sq *SearchQuery) Limit(limit int) *SearchQuery

Limit adds a limit step to the query.

func (*SearchQuery) Offset

func (sq *SearchQuery) Offset(offset int) *SearchQuery

Offset adds an offset step to the query.

func (*SearchQuery) Only

func (sq *SearchQuery) Only(ctx context.Context) (*Search, error)

Only returns a single Search entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Search entity is found. Returns a *NotFoundError when no Search entities are found.

func (*SearchQuery) OnlyID

func (sq *SearchQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Search ID in the query. Returns a *NotSingularError when more than one Search ID is found. Returns a *NotFoundError when no entities are found.

func (*SearchQuery) OnlyIDX

func (sq *SearchQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SearchQuery) OnlyX

func (sq *SearchQuery) OnlyX(ctx context.Context) *Search

OnlyX is like Only, but panics if an error occurs.

func (*SearchQuery) Order

func (sq *SearchQuery) Order(o ...OrderFunc) *SearchQuery

Order adds an order step to the query.

func (*SearchQuery) Paginate

func (s *SearchQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SearchPaginateOption,
) (*SearchConnection, error)

Paginate executes the query and returns a relay based cursor connection to Search.

func (*SearchQuery) QueryDope

func (sq *SearchQuery) QueryDope() *DopeQuery

QueryDope chains the current query on the "dope" edge.

func (*SearchQuery) QueryHustler

func (sq *SearchQuery) QueryHustler() *HustlerQuery

QueryHustler chains the current query on the "hustler" edge.

func (*SearchQuery) QueryItem

func (sq *SearchQuery) QueryItem() *ItemQuery

QueryItem chains the current query on the "item" edge.

func (*SearchQuery) Select

func (sq *SearchQuery) Select(fields ...string) *SearchSelect

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 {
	Type search.Type `json:"type,omitempty"`
}

client.Search.Query().
	Select(search.FieldType).
	Scan(ctx, &v)

func (*SearchQuery) Unique

func (sq *SearchQuery) Unique(unique bool) *SearchQuery

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 (*SearchQuery) Where

func (sq *SearchQuery) Where(ps ...predicate.Search) *SearchQuery

Where adds a new predicate for the SearchQuery builder.

func (*SearchQuery) WithDope

func (sq *SearchQuery) WithDope(opts ...func(*DopeQuery)) *SearchQuery

WithDope tells the query-builder to eager-load the nodes that are connected to the "dope" edge. The optional arguments are used to configure the query builder of the edge.

func (*SearchQuery) WithHustler

func (sq *SearchQuery) WithHustler(opts ...func(*HustlerQuery)) *SearchQuery

WithHustler tells the query-builder to eager-load the nodes that are connected to the "hustler" edge. The optional arguments are used to configure the query builder of the edge.

func (*SearchQuery) WithItem

func (sq *SearchQuery) WithItem(opts ...func(*ItemQuery)) *SearchQuery

WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.

type SearchSelect

type SearchSelect struct {
	*SearchQuery
	// contains filtered or unexported fields
}

SearchSelect is the builder for selecting fields of Search entities.

func (*SearchSelect) Bool

func (ss *SearchSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SearchSelect) BoolX

func (ss *SearchSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SearchSelect) Bools

func (ss *SearchSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SearchSelect) BoolsX

func (ss *SearchSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SearchSelect) Float64

func (ss *SearchSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SearchSelect) Float64X

func (ss *SearchSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SearchSelect) Float64s

func (ss *SearchSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SearchSelect) Float64sX

func (ss *SearchSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SearchSelect) Int

func (ss *SearchSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SearchSelect) IntX

func (ss *SearchSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SearchSelect) Ints

func (ss *SearchSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SearchSelect) IntsX

func (ss *SearchSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SearchSelect) Scan

func (ss *SearchSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SearchSelect) ScanX

func (ss *SearchSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SearchSelect) String

func (ss *SearchSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SearchSelect) StringX

func (ss *SearchSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SearchSelect) Strings

func (ss *SearchSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SearchSelect) StringsX

func (ss *SearchSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SearchUpdate

type SearchUpdate struct {
	// contains filtered or unexported fields
}

SearchUpdate is the builder for updating Search entities.

func (*SearchUpdate) AddGreatness

func (su *SearchUpdate) AddGreatness(i int) *SearchUpdate

AddGreatness adds i to the "greatness" field.

func (*SearchUpdate) AddLastSalePrice

func (su *SearchUpdate) AddLastSalePrice(si schema.BigInt) *SearchUpdate

AddLastSalePrice adds si to the "last_sale_price" field.

func (*SearchUpdate) AddSalePrice

func (su *SearchUpdate) AddSalePrice(si schema.BigInt) *SearchUpdate

AddSalePrice adds si to the "sale_price" field.

func (*SearchUpdate) ClearDope

func (su *SearchUpdate) ClearDope() *SearchUpdate

ClearDope clears the "dope" edge to the Dope entity.

func (*SearchUpdate) ClearGreatness

func (su *SearchUpdate) ClearGreatness() *SearchUpdate

ClearGreatness clears the value of the "greatness" field.

func (*SearchUpdate) ClearHustler

func (su *SearchUpdate) ClearHustler() *SearchUpdate

ClearHustler clears the "hustler" edge to the Hustler entity.

func (*SearchUpdate) ClearItem

func (su *SearchUpdate) ClearItem() *SearchUpdate

ClearItem clears the "item" edge to the Item entity.

func (*SearchUpdate) Exec

func (su *SearchUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SearchUpdate) ExecX

func (su *SearchUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SearchUpdate) Mutation

func (su *SearchUpdate) Mutation() *SearchMutation

Mutation returns the SearchMutation object of the builder.

func (*SearchUpdate) Save

func (su *SearchUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SearchUpdate) SaveX

func (su *SearchUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SearchUpdate) SetClaimed

func (su *SearchUpdate) SetClaimed(b bool) *SearchUpdate

SetClaimed sets the "claimed" field.

func (*SearchUpdate) SetDope

func (su *SearchUpdate) SetDope(d *Dope) *SearchUpdate

SetDope sets the "dope" edge to the Dope entity.

func (*SearchUpdate) SetDopeID

func (su *SearchUpdate) SetDopeID(id string) *SearchUpdate

SetDopeID sets the "dope" edge to the Dope entity by ID.

func (*SearchUpdate) SetGreatness

func (su *SearchUpdate) SetGreatness(i int) *SearchUpdate

SetGreatness sets the "greatness" field.

func (*SearchUpdate) SetHustler

func (su *SearchUpdate) SetHustler(h *Hustler) *SearchUpdate

SetHustler sets the "hustler" edge to the Hustler entity.

func (*SearchUpdate) SetHustlerID

func (su *SearchUpdate) SetHustlerID(id string) *SearchUpdate

SetHustlerID sets the "hustler" edge to the Hustler entity by ID.

func (*SearchUpdate) SetItem

func (su *SearchUpdate) SetItem(i *Item) *SearchUpdate

SetItem sets the "item" edge to the Item entity.

func (*SearchUpdate) SetItemID

func (su *SearchUpdate) SetItemID(id string) *SearchUpdate

SetItemID sets the "item" edge to the Item entity by ID.

func (*SearchUpdate) SetLastSalePrice

func (su *SearchUpdate) SetLastSalePrice(si schema.BigInt) *SearchUpdate

SetLastSalePrice sets the "last_sale_price" field.

func (*SearchUpdate) SetNillableDopeID

func (su *SearchUpdate) SetNillableDopeID(id *string) *SearchUpdate

SetNillableDopeID sets the "dope" edge to the Dope entity by ID if the given value is not nil.

func (*SearchUpdate) SetNillableGreatness

func (su *SearchUpdate) SetNillableGreatness(i *int) *SearchUpdate

SetNillableGreatness sets the "greatness" field if the given value is not nil.

func (*SearchUpdate) SetNillableHustlerID

func (su *SearchUpdate) SetNillableHustlerID(id *string) *SearchUpdate

SetNillableHustlerID sets the "hustler" edge to the Hustler entity by ID if the given value is not nil.

func (*SearchUpdate) SetNillableItemID

func (su *SearchUpdate) SetNillableItemID(id *string) *SearchUpdate

SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.

func (*SearchUpdate) SetNillableLastSalePrice

func (su *SearchUpdate) SetNillableLastSalePrice(si *schema.BigInt) *SearchUpdate

SetNillableLastSalePrice sets the "last_sale_price" field if the given value is not nil.

func (*SearchUpdate) SetNillableSalePrice

func (su *SearchUpdate) SetNillableSalePrice(si *schema.BigInt) *SearchUpdate

SetNillableSalePrice sets the "sale_price" field if the given value is not nil.

func (*SearchUpdate) SetOpened

func (su *SearchUpdate) SetOpened(b bool) *SearchUpdate

SetOpened sets the "opened" field.

func (*SearchUpdate) SetSaleActive

func (su *SearchUpdate) SetSaleActive(b bool) *SearchUpdate

SetSaleActive sets the "sale_active" field.

func (*SearchUpdate) SetSalePrice

func (su *SearchUpdate) SetSalePrice(si schema.BigInt) *SearchUpdate

SetSalePrice sets the "sale_price" field.

func (*SearchUpdate) Where

func (su *SearchUpdate) Where(ps ...predicate.Search) *SearchUpdate

Where appends a list predicates to the SearchUpdate builder.

type SearchUpdateOne

type SearchUpdateOne struct {
	// contains filtered or unexported fields
}

SearchUpdateOne is the builder for updating a single Search entity.

func (*SearchUpdateOne) AddGreatness

func (suo *SearchUpdateOne) AddGreatness(i int) *SearchUpdateOne

AddGreatness adds i to the "greatness" field.

func (*SearchUpdateOne) AddLastSalePrice

func (suo *SearchUpdateOne) AddLastSalePrice(si schema.BigInt) *SearchUpdateOne

AddLastSalePrice adds si to the "last_sale_price" field.

func (*SearchUpdateOne) AddSalePrice

func (suo *SearchUpdateOne) AddSalePrice(si schema.BigInt) *SearchUpdateOne

AddSalePrice adds si to the "sale_price" field.

func (*SearchUpdateOne) ClearDope

func (suo *SearchUpdateOne) ClearDope() *SearchUpdateOne

ClearDope clears the "dope" edge to the Dope entity.

func (*SearchUpdateOne) ClearGreatness

func (suo *SearchUpdateOne) ClearGreatness() *SearchUpdateOne

ClearGreatness clears the value of the "greatness" field.

func (*SearchUpdateOne) ClearHustler

func (suo *SearchUpdateOne) ClearHustler() *SearchUpdateOne

ClearHustler clears the "hustler" edge to the Hustler entity.

func (*SearchUpdateOne) ClearItem

func (suo *SearchUpdateOne) ClearItem() *SearchUpdateOne

ClearItem clears the "item" edge to the Item entity.

func (*SearchUpdateOne) Exec

func (suo *SearchUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SearchUpdateOne) ExecX

func (suo *SearchUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SearchUpdateOne) Mutation

func (suo *SearchUpdateOne) Mutation() *SearchMutation

Mutation returns the SearchMutation object of the builder.

func (*SearchUpdateOne) Save

func (suo *SearchUpdateOne) Save(ctx context.Context) (*Search, error)

Save executes the query and returns the updated Search entity.

func (*SearchUpdateOne) SaveX

func (suo *SearchUpdateOne) SaveX(ctx context.Context) *Search

SaveX is like Save, but panics if an error occurs.

func (*SearchUpdateOne) Select

func (suo *SearchUpdateOne) Select(field string, fields ...string) *SearchUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SearchUpdateOne) SetClaimed

func (suo *SearchUpdateOne) SetClaimed(b bool) *SearchUpdateOne

SetClaimed sets the "claimed" field.

func (*SearchUpdateOne) SetDope

func (suo *SearchUpdateOne) SetDope(d *Dope) *SearchUpdateOne

SetDope sets the "dope" edge to the Dope entity.

func (*SearchUpdateOne) SetDopeID

func (suo *SearchUpdateOne) SetDopeID(id string) *SearchUpdateOne

SetDopeID sets the "dope" edge to the Dope entity by ID.

func (*SearchUpdateOne) SetGreatness

func (suo *SearchUpdateOne) SetGreatness(i int) *SearchUpdateOne

SetGreatness sets the "greatness" field.

func (*SearchUpdateOne) SetHustler

func (suo *SearchUpdateOne) SetHustler(h *Hustler) *SearchUpdateOne

SetHustler sets the "hustler" edge to the Hustler entity.

func (*SearchUpdateOne) SetHustlerID

func (suo *SearchUpdateOne) SetHustlerID(id string) *SearchUpdateOne

SetHustlerID sets the "hustler" edge to the Hustler entity by ID.

func (*SearchUpdateOne) SetItem

func (suo *SearchUpdateOne) SetItem(i *Item) *SearchUpdateOne

SetItem sets the "item" edge to the Item entity.

func (*SearchUpdateOne) SetItemID

func (suo *SearchUpdateOne) SetItemID(id string) *SearchUpdateOne

SetItemID sets the "item" edge to the Item entity by ID.

func (*SearchUpdateOne) SetLastSalePrice

func (suo *SearchUpdateOne) SetLastSalePrice(si schema.BigInt) *SearchUpdateOne

SetLastSalePrice sets the "last_sale_price" field.

func (*SearchUpdateOne) SetNillableDopeID

func (suo *SearchUpdateOne) SetNillableDopeID(id *string) *SearchUpdateOne

SetNillableDopeID sets the "dope" edge to the Dope entity by ID if the given value is not nil.

func (*SearchUpdateOne) SetNillableGreatness

func (suo *SearchUpdateOne) SetNillableGreatness(i *int) *SearchUpdateOne

SetNillableGreatness sets the "greatness" field if the given value is not nil.

func (*SearchUpdateOne) SetNillableHustlerID

func (suo *SearchUpdateOne) SetNillableHustlerID(id *string) *SearchUpdateOne

SetNillableHustlerID sets the "hustler" edge to the Hustler entity by ID if the given value is not nil.

func (*SearchUpdateOne) SetNillableItemID

func (suo *SearchUpdateOne) SetNillableItemID(id *string) *SearchUpdateOne

SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.

func (*SearchUpdateOne) SetNillableLastSalePrice

func (suo *SearchUpdateOne) SetNillableLastSalePrice(si *schema.BigInt) *SearchUpdateOne

SetNillableLastSalePrice sets the "last_sale_price" field if the given value is not nil.

func (*SearchUpdateOne) SetNillableSalePrice

func (suo *SearchUpdateOne) SetNillableSalePrice(si *schema.BigInt) *SearchUpdateOne

SetNillableSalePrice sets the "sale_price" field if the given value is not nil.

func (*SearchUpdateOne) SetOpened

func (suo *SearchUpdateOne) SetOpened(b bool) *SearchUpdateOne

SetOpened sets the "opened" field.

func (*SearchUpdateOne) SetSaleActive

func (suo *SearchUpdateOne) SetSaleActive(b bool) *SearchUpdateOne

SetSaleActive sets the "sale_active" field.

func (*SearchUpdateOne) SetSalePrice

func (suo *SearchUpdateOne) SetSalePrice(si schema.BigInt) *SearchUpdateOne

SetSalePrice sets the "sale_price" field.

type SearchUpsert

type SearchUpsert struct {
	*sql.UpdateSet
}

SearchUpsert is the "OnConflict" setter.

func (*SearchUpsert) AddGreatness

func (u *SearchUpsert) AddGreatness(v int) *SearchUpsert

AddGreatness adds v to the "greatness" field.

func (*SearchUpsert) AddLastSalePrice

func (u *SearchUpsert) AddLastSalePrice(v schema.BigInt) *SearchUpsert

AddLastSalePrice adds v to the "last_sale_price" field.

func (*SearchUpsert) AddSalePrice

func (u *SearchUpsert) AddSalePrice(v schema.BigInt) *SearchUpsert

AddSalePrice adds v to the "sale_price" field.

func (*SearchUpsert) ClearGreatness

func (u *SearchUpsert) ClearGreatness() *SearchUpsert

ClearGreatness clears the value of the "greatness" field.

func (*SearchUpsert) SetClaimed

func (u *SearchUpsert) SetClaimed(v bool) *SearchUpsert

SetClaimed sets the "claimed" field.

func (*SearchUpsert) SetGreatness

func (u *SearchUpsert) SetGreatness(v int) *SearchUpsert

SetGreatness sets the "greatness" field.

func (*SearchUpsert) SetLastSalePrice

func (u *SearchUpsert) SetLastSalePrice(v schema.BigInt) *SearchUpsert

SetLastSalePrice sets the "last_sale_price" field.

func (*SearchUpsert) SetOpened

func (u *SearchUpsert) SetOpened(v bool) *SearchUpsert

SetOpened sets the "opened" field.

func (*SearchUpsert) SetSaleActive

func (u *SearchUpsert) SetSaleActive(v bool) *SearchUpsert

SetSaleActive sets the "sale_active" field.

func (*SearchUpsert) SetSalePrice

func (u *SearchUpsert) SetSalePrice(v schema.BigInt) *SearchUpsert

SetSalePrice sets the "sale_price" field.

func (*SearchUpsert) SetType

func (u *SearchUpsert) SetType(v search.Type) *SearchUpsert

SetType sets the "type" field.

func (*SearchUpsert) UpdateClaimed

func (u *SearchUpsert) UpdateClaimed() *SearchUpsert

UpdateClaimed sets the "claimed" field to the value that was provided on create.

func (*SearchUpsert) UpdateGreatness

func (u *SearchUpsert) UpdateGreatness() *SearchUpsert

UpdateGreatness sets the "greatness" field to the value that was provided on create.

func (*SearchUpsert) UpdateLastSalePrice

func (u *SearchUpsert) UpdateLastSalePrice() *SearchUpsert

UpdateLastSalePrice sets the "last_sale_price" field to the value that was provided on create.

func (*SearchUpsert) UpdateOpened

func (u *SearchUpsert) UpdateOpened() *SearchUpsert

UpdateOpened sets the "opened" field to the value that was provided on create.

func (*SearchUpsert) UpdateSaleActive

func (u *SearchUpsert) UpdateSaleActive() *SearchUpsert

UpdateSaleActive sets the "sale_active" field to the value that was provided on create.

func (*SearchUpsert) UpdateSalePrice

func (u *SearchUpsert) UpdateSalePrice() *SearchUpsert

UpdateSalePrice sets the "sale_price" field to the value that was provided on create.

func (*SearchUpsert) UpdateType

func (u *SearchUpsert) UpdateType() *SearchUpsert

UpdateType sets the "type" field to the value that was provided on create.

type SearchUpsertBulk

type SearchUpsertBulk struct {
	// contains filtered or unexported fields
}

SearchUpsertBulk is the builder for "upsert"-ing a bulk of Search nodes.

func (*SearchUpsertBulk) AddGreatness

func (u *SearchUpsertBulk) AddGreatness(v int) *SearchUpsertBulk

AddGreatness adds v to the "greatness" field.

func (*SearchUpsertBulk) AddLastSalePrice

func (u *SearchUpsertBulk) AddLastSalePrice(v schema.BigInt) *SearchUpsertBulk

AddLastSalePrice adds v to the "last_sale_price" field.

func (*SearchUpsertBulk) AddSalePrice

func (u *SearchUpsertBulk) AddSalePrice(v schema.BigInt) *SearchUpsertBulk

AddSalePrice adds v to the "sale_price" field.

func (*SearchUpsertBulk) ClearGreatness

func (u *SearchUpsertBulk) ClearGreatness() *SearchUpsertBulk

ClearGreatness clears the value of the "greatness" field.

func (*SearchUpsertBulk) DoNothing

func (u *SearchUpsertBulk) DoNothing() *SearchUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SearchUpsertBulk) Exec

func (u *SearchUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SearchUpsertBulk) ExecX

func (u *SearchUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SearchUpsertBulk) Ignore

func (u *SearchUpsertBulk) Ignore() *SearchUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Search.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SearchUpsertBulk) SetClaimed

func (u *SearchUpsertBulk) SetClaimed(v bool) *SearchUpsertBulk

SetClaimed sets the "claimed" field.

func (*SearchUpsertBulk) SetGreatness

func (u *SearchUpsertBulk) SetGreatness(v int) *SearchUpsertBulk

SetGreatness sets the "greatness" field.

func (*SearchUpsertBulk) SetLastSalePrice

func (u *SearchUpsertBulk) SetLastSalePrice(v schema.BigInt) *SearchUpsertBulk

SetLastSalePrice sets the "last_sale_price" field.

func (*SearchUpsertBulk) SetOpened

func (u *SearchUpsertBulk) SetOpened(v bool) *SearchUpsertBulk

SetOpened sets the "opened" field.

func (*SearchUpsertBulk) SetSaleActive

func (u *SearchUpsertBulk) SetSaleActive(v bool) *SearchUpsertBulk

SetSaleActive sets the "sale_active" field.

func (*SearchUpsertBulk) SetSalePrice

func (u *SearchUpsertBulk) SetSalePrice(v schema.BigInt) *SearchUpsertBulk

SetSalePrice sets the "sale_price" field.

func (*SearchUpsertBulk) SetType

SetType sets the "type" field.

func (*SearchUpsertBulk) Update

func (u *SearchUpsertBulk) Update(set func(*SearchUpsert)) *SearchUpsertBulk

Update allows overriding fields `UPDATE` values. See the SearchCreateBulk.OnConflict documentation for more info.

func (*SearchUpsertBulk) UpdateClaimed

func (u *SearchUpsertBulk) UpdateClaimed() *SearchUpsertBulk

UpdateClaimed sets the "claimed" field to the value that was provided on create.

func (*SearchUpsertBulk) UpdateGreatness

func (u *SearchUpsertBulk) UpdateGreatness() *SearchUpsertBulk

UpdateGreatness sets the "greatness" field to the value that was provided on create.

func (*SearchUpsertBulk) UpdateLastSalePrice

func (u *SearchUpsertBulk) UpdateLastSalePrice() *SearchUpsertBulk

UpdateLastSalePrice sets the "last_sale_price" field to the value that was provided on create.

func (*SearchUpsertBulk) UpdateNewValues

func (u *SearchUpsertBulk) UpdateNewValues() *SearchUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Search.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(search.FieldID)
		}),
	).
	Exec(ctx)

func (*SearchUpsertBulk) UpdateOpened

func (u *SearchUpsertBulk) UpdateOpened() *SearchUpsertBulk

UpdateOpened sets the "opened" field to the value that was provided on create.

func (*SearchUpsertBulk) UpdateSaleActive

func (u *SearchUpsertBulk) UpdateSaleActive() *SearchUpsertBulk

UpdateSaleActive sets the "sale_active" field to the value that was provided on create.

func (*SearchUpsertBulk) UpdateSalePrice

func (u *SearchUpsertBulk) UpdateSalePrice() *SearchUpsertBulk

UpdateSalePrice sets the "sale_price" field to the value that was provided on create.

func (*SearchUpsertBulk) UpdateType

func (u *SearchUpsertBulk) UpdateType() *SearchUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

type SearchUpsertOne

type SearchUpsertOne struct {
	// contains filtered or unexported fields
}

SearchUpsertOne is the builder for "upsert"-ing

one Search node.

func (*SearchUpsertOne) AddGreatness

func (u *SearchUpsertOne) AddGreatness(v int) *SearchUpsertOne

AddGreatness adds v to the "greatness" field.

func (*SearchUpsertOne) AddLastSalePrice

func (u *SearchUpsertOne) AddLastSalePrice(v schema.BigInt) *SearchUpsertOne

AddLastSalePrice adds v to the "last_sale_price" field.

func (*SearchUpsertOne) AddSalePrice

func (u *SearchUpsertOne) AddSalePrice(v schema.BigInt) *SearchUpsertOne

AddSalePrice adds v to the "sale_price" field.

func (*SearchUpsertOne) ClearGreatness

func (u *SearchUpsertOne) ClearGreatness() *SearchUpsertOne

ClearGreatness clears the value of the "greatness" field.

func (*SearchUpsertOne) DoNothing

func (u *SearchUpsertOne) DoNothing() *SearchUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SearchUpsertOne) Exec

func (u *SearchUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SearchUpsertOne) ExecX

func (u *SearchUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SearchUpsertOne) ID

func (u *SearchUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SearchUpsertOne) IDX

func (u *SearchUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*SearchUpsertOne) Ignore

func (u *SearchUpsertOne) Ignore() *SearchUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Search.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SearchUpsertOne) SetClaimed

func (u *SearchUpsertOne) SetClaimed(v bool) *SearchUpsertOne

SetClaimed sets the "claimed" field.

func (*SearchUpsertOne) SetGreatness

func (u *SearchUpsertOne) SetGreatness(v int) *SearchUpsertOne

SetGreatness sets the "greatness" field.

func (*SearchUpsertOne) SetLastSalePrice

func (u *SearchUpsertOne) SetLastSalePrice(v schema.BigInt) *SearchUpsertOne

SetLastSalePrice sets the "last_sale_price" field.

func (*SearchUpsertOne) SetOpened

func (u *SearchUpsertOne) SetOpened(v bool) *SearchUpsertOne

SetOpened sets the "opened" field.

func (*SearchUpsertOne) SetSaleActive

func (u *SearchUpsertOne) SetSaleActive(v bool) *SearchUpsertOne

SetSaleActive sets the "sale_active" field.

func (*SearchUpsertOne) SetSalePrice

func (u *SearchUpsertOne) SetSalePrice(v schema.BigInt) *SearchUpsertOne

SetSalePrice sets the "sale_price" field.

func (*SearchUpsertOne) SetType

func (u *SearchUpsertOne) SetType(v search.Type) *SearchUpsertOne

SetType sets the "type" field.

func (*SearchUpsertOne) Update

func (u *SearchUpsertOne) Update(set func(*SearchUpsert)) *SearchUpsertOne

Update allows overriding fields `UPDATE` values. See the SearchCreate.OnConflict documentation for more info.

func (*SearchUpsertOne) UpdateClaimed

func (u *SearchUpsertOne) UpdateClaimed() *SearchUpsertOne

UpdateClaimed sets the "claimed" field to the value that was provided on create.

func (*SearchUpsertOne) UpdateGreatness

func (u *SearchUpsertOne) UpdateGreatness() *SearchUpsertOne

UpdateGreatness sets the "greatness" field to the value that was provided on create.

func (*SearchUpsertOne) UpdateLastSalePrice

func (u *SearchUpsertOne) UpdateLastSalePrice() *SearchUpsertOne

UpdateLastSalePrice sets the "last_sale_price" field to the value that was provided on create.

func (*SearchUpsertOne) UpdateNewValues

func (u *SearchUpsertOne) UpdateNewValues() *SearchUpsertOne

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.Search.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(search.FieldID)
		}),
	).
	Exec(ctx)

func (*SearchUpsertOne) UpdateOpened

func (u *SearchUpsertOne) UpdateOpened() *SearchUpsertOne

UpdateOpened sets the "opened" field to the value that was provided on create.

func (*SearchUpsertOne) UpdateSaleActive

func (u *SearchUpsertOne) UpdateSaleActive() *SearchUpsertOne

UpdateSaleActive sets the "sale_active" field to the value that was provided on create.

func (*SearchUpsertOne) UpdateSalePrice

func (u *SearchUpsertOne) UpdateSalePrice() *SearchUpsertOne

UpdateSalePrice sets the "sale_price" field to the value that was provided on create.

func (*SearchUpsertOne) UpdateType

func (u *SearchUpsertOne) UpdateType() *SearchUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type SearchWhereInput

type SearchWhereInput struct {
	Not *SearchWhereInput   `json:"not,omitempty"`
	Or  []*SearchWhereInput `json:"or,omitempty"`
	And []*SearchWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "type" field predicates.
	Type      *search.Type  `json:"type,omitempty"`
	TypeNEQ   *search.Type  `json:"typeNEQ,omitempty"`
	TypeIn    []search.Type `json:"typeIn,omitempty"`
	TypeNotIn []search.Type `json:"typeNotIn,omitempty"`

	// "greatness" field predicates.
	Greatness       *int  `json:"greatness,omitempty"`
	GreatnessNEQ    *int  `json:"greatnessNEQ,omitempty"`
	GreatnessIn     []int `json:"greatnessIn,omitempty"`
	GreatnessNotIn  []int `json:"greatnessNotIn,omitempty"`
	GreatnessGT     *int  `json:"greatnessGT,omitempty"`
	GreatnessGTE    *int  `json:"greatnessGTE,omitempty"`
	GreatnessLT     *int  `json:"greatnessLT,omitempty"`
	GreatnessLTE    *int  `json:"greatnessLTE,omitempty"`
	GreatnessIsNil  bool  `json:"greatnessIsNil,omitempty"`
	GreatnessNotNil bool  `json:"greatnessNotNil,omitempty"`

	// "claimed" field predicates.
	Claimed    *bool `json:"claimed,omitempty"`
	ClaimedNEQ *bool `json:"claimedNEQ,omitempty"`

	// "opened" field predicates.
	Opened    *bool `json:"opened,omitempty"`
	OpenedNEQ *bool `json:"openedNEQ,omitempty"`

	// "sale_active" field predicates.
	SaleActive    *bool `json:"saleActive,omitempty"`
	SaleActiveNEQ *bool `json:"saleActiveNEQ,omitempty"`

	// "sale_price" field predicates.
	SalePrice      *schema.BigInt  `json:"salePrice,omitempty"`
	SalePriceNEQ   *schema.BigInt  `json:"salePriceNEQ,omitempty"`
	SalePriceIn    []schema.BigInt `json:"salePriceIn,omitempty"`
	SalePriceNotIn []schema.BigInt `json:"salePriceNotIn,omitempty"`
	SalePriceGT    *schema.BigInt  `json:"salePriceGT,omitempty"`
	SalePriceGTE   *schema.BigInt  `json:"salePriceGTE,omitempty"`
	SalePriceLT    *schema.BigInt  `json:"salePriceLT,omitempty"`
	SalePriceLTE   *schema.BigInt  `json:"salePriceLTE,omitempty"`

	// "last_sale_price" field predicates.
	LastSalePrice      *schema.BigInt  `json:"lastSalePrice,omitempty"`
	LastSalePriceNEQ   *schema.BigInt  `json:"lastSalePriceNEQ,omitempty"`
	LastSalePriceIn    []schema.BigInt `json:"lastSalePriceIn,omitempty"`
	LastSalePriceNotIn []schema.BigInt `json:"lastSalePriceNotIn,omitempty"`
	LastSalePriceGT    *schema.BigInt  `json:"lastSalePriceGT,omitempty"`
	LastSalePriceGTE   *schema.BigInt  `json:"lastSalePriceGTE,omitempty"`
	LastSalePriceLT    *schema.BigInt  `json:"lastSalePriceLT,omitempty"`
	LastSalePriceLTE   *schema.BigInt  `json:"lastSalePriceLTE,omitempty"`

	// "dope" edge predicates.
	HasDope     *bool             `json:"hasDope,omitempty"`
	HasDopeWith []*DopeWhereInput `json:"hasDopeWith,omitempty"`

	// "item" edge predicates.
	HasItem     *bool             `json:"hasItem,omitempty"`
	HasItemWith []*ItemWhereInput `json:"hasItemWith,omitempty"`

	// "hustler" edge predicates.
	HasHustler     *bool                `json:"hasHustler,omitempty"`
	HasHustlerWith []*HustlerWhereInput `json:"hasHustlerWith,omitempty"`
}

SearchWhereInput represents a where input for filtering Search queries.

func (*SearchWhereInput) Filter

func (i *SearchWhereInput) Filter(q *SearchQuery) (*SearchQuery, error)

Filter applies the SearchWhereInput filter on the SearchQuery builder.

func (*SearchWhereInput) P

P returns a predicate for filtering searches. An error is returned if the input is empty or invalid.

type Searches

type Searches []*Search

Searches is a parsable slice of Search.

type SyncState

type SyncState struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// StartBlock holds the value of the "start_block" field.
	StartBlock uint64 `json:"start_block,omitempty"`
	// contains filtered or unexported fields
}

SyncState is the model entity for the SyncState schema.

func (*SyncState) Node

func (ss *SyncState) Node(ctx context.Context) (node *Node, err error)

func (*SyncState) String

func (ss *SyncState) String() string

String implements the fmt.Stringer.

func (*SyncState) ToEdge

func (ss *SyncState) ToEdge(order *SyncStateOrder) *SyncStateEdge

ToEdge converts SyncState into SyncStateEdge.

func (*SyncState) Unwrap

func (ss *SyncState) Unwrap() *SyncState

Unwrap unwraps the SyncState 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 (*SyncState) Update

func (ss *SyncState) Update() *SyncStateUpdateOne

Update returns a builder for updating this SyncState. Note that you need to call SyncState.Unwrap() before calling this method if this SyncState was returned from a transaction, and the transaction was committed or rolled back.

type SyncStateClient

type SyncStateClient struct {
	// contains filtered or unexported fields
}

SyncStateClient is a client for the SyncState schema.

func NewSyncStateClient

func NewSyncStateClient(c config) *SyncStateClient

NewSyncStateClient returns a client for the SyncState from the given config.

func (*SyncStateClient) Create

func (c *SyncStateClient) Create() *SyncStateCreate

Create returns a create builder for SyncState.

func (*SyncStateClient) CreateBulk

func (c *SyncStateClient) CreateBulk(builders ...*SyncStateCreate) *SyncStateCreateBulk

CreateBulk returns a builder for creating a bulk of SyncState entities.

func (*SyncStateClient) Delete

func (c *SyncStateClient) Delete() *SyncStateDelete

Delete returns a delete builder for SyncState.

func (*SyncStateClient) DeleteOne

func (c *SyncStateClient) DeleteOne(ss *SyncState) *SyncStateDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SyncStateClient) DeleteOneID

func (c *SyncStateClient) DeleteOneID(id string) *SyncStateDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SyncStateClient) Get

func (c *SyncStateClient) Get(ctx context.Context, id string) (*SyncState, error)

Get returns a SyncState entity by its id.

func (*SyncStateClient) GetX

func (c *SyncStateClient) GetX(ctx context.Context, id string) *SyncState

GetX is like Get, but panics if an error occurs.

func (*SyncStateClient) Hooks

func (c *SyncStateClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SyncStateClient) Query

func (c *SyncStateClient) Query() *SyncStateQuery

Query returns a query builder for SyncState.

func (*SyncStateClient) Update

func (c *SyncStateClient) Update() *SyncStateUpdate

Update returns an update builder for SyncState.

func (*SyncStateClient) UpdateOne

func (c *SyncStateClient) UpdateOne(ss *SyncState) *SyncStateUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SyncStateClient) UpdateOneID

func (c *SyncStateClient) UpdateOneID(id string) *SyncStateUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SyncStateClient) Use

func (c *SyncStateClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `syncstate.Hooks(f(g(h())))`.

type SyncStateConnection

type SyncStateConnection struct {
	Edges      []*SyncStateEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

SyncStateConnection is the connection containing edges to SyncState.

type SyncStateCreate

type SyncStateCreate struct {
	// contains filtered or unexported fields
}

SyncStateCreate is the builder for creating a SyncState entity.

func (*SyncStateCreate) Exec

func (ssc *SyncStateCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncStateCreate) ExecX

func (ssc *SyncStateCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncStateCreate) Mutation

func (ssc *SyncStateCreate) Mutation() *SyncStateMutation

Mutation returns the SyncStateMutation object of the builder.

func (*SyncStateCreate) OnConflict

func (ssc *SyncStateCreate) OnConflict(opts ...sql.ConflictOption) *SyncStateUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SyncState.Create().
	SetStartBlock(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.SyncStateUpsert) {
		SetStartBlock(v+v).
	}).
	Exec(ctx)

func (*SyncStateCreate) OnConflictColumns

func (ssc *SyncStateCreate) OnConflictColumns(columns ...string) *SyncStateUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SyncState.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SyncStateCreate) Save

func (ssc *SyncStateCreate) Save(ctx context.Context) (*SyncState, error)

Save creates the SyncState in the database.

func (*SyncStateCreate) SaveX

func (ssc *SyncStateCreate) SaveX(ctx context.Context) *SyncState

SaveX calls Save and panics if Save returns an error.

func (*SyncStateCreate) SetID

func (ssc *SyncStateCreate) SetID(s string) *SyncStateCreate

SetID sets the "id" field.

func (*SyncStateCreate) SetStartBlock

func (ssc *SyncStateCreate) SetStartBlock(u uint64) *SyncStateCreate

SetStartBlock sets the "start_block" field.

type SyncStateCreateBulk

type SyncStateCreateBulk struct {
	// contains filtered or unexported fields
}

SyncStateCreateBulk is the builder for creating many SyncState entities in bulk.

func (*SyncStateCreateBulk) Exec

func (sscb *SyncStateCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncStateCreateBulk) ExecX

func (sscb *SyncStateCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncStateCreateBulk) OnConflict

func (sscb *SyncStateCreateBulk) OnConflict(opts ...sql.ConflictOption) *SyncStateUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SyncState.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.SyncStateUpsert) {
		SetStartBlock(v+v).
	}).
	Exec(ctx)

func (*SyncStateCreateBulk) OnConflictColumns

func (sscb *SyncStateCreateBulk) OnConflictColumns(columns ...string) *SyncStateUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SyncState.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SyncStateCreateBulk) Save

func (sscb *SyncStateCreateBulk) Save(ctx context.Context) ([]*SyncState, error)

Save creates the SyncState entities in the database.

func (*SyncStateCreateBulk) SaveX

func (sscb *SyncStateCreateBulk) SaveX(ctx context.Context) []*SyncState

SaveX is like Save, but panics if an error occurs.

type SyncStateDelete

type SyncStateDelete struct {
	// contains filtered or unexported fields
}

SyncStateDelete is the builder for deleting a SyncState entity.

func (*SyncStateDelete) Exec

func (ssd *SyncStateDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SyncStateDelete) ExecX

func (ssd *SyncStateDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SyncStateDelete) Where

Where appends a list predicates to the SyncStateDelete builder.

type SyncStateDeleteOne

type SyncStateDeleteOne struct {
	// contains filtered or unexported fields
}

SyncStateDeleteOne is the builder for deleting a single SyncState entity.

func (*SyncStateDeleteOne) Exec

func (ssdo *SyncStateDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SyncStateDeleteOne) ExecX

func (ssdo *SyncStateDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SyncStateEdge

type SyncStateEdge struct {
	Node   *SyncState `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

SyncStateEdge is the edge representation of SyncState.

type SyncStateGroupBy

type SyncStateGroupBy struct {
	// contains filtered or unexported fields
}

SyncStateGroupBy is the group-by builder for SyncState entities.

func (*SyncStateGroupBy) Aggregate

func (ssgb *SyncStateGroupBy) Aggregate(fns ...AggregateFunc) *SyncStateGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SyncStateGroupBy) Bool

func (ssgb *SyncStateGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SyncStateGroupBy) BoolX

func (ssgb *SyncStateGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SyncStateGroupBy) Bools

func (ssgb *SyncStateGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SyncStateGroupBy) BoolsX

func (ssgb *SyncStateGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SyncStateGroupBy) Float64

func (ssgb *SyncStateGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SyncStateGroupBy) Float64X

func (ssgb *SyncStateGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SyncStateGroupBy) Float64s

func (ssgb *SyncStateGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SyncStateGroupBy) Float64sX

func (ssgb *SyncStateGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SyncStateGroupBy) Int

func (ssgb *SyncStateGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SyncStateGroupBy) IntX

func (ssgb *SyncStateGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SyncStateGroupBy) Ints

func (ssgb *SyncStateGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SyncStateGroupBy) IntsX

func (ssgb *SyncStateGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SyncStateGroupBy) Scan

func (ssgb *SyncStateGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SyncStateGroupBy) ScanX

func (ssgb *SyncStateGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SyncStateGroupBy) String

func (ssgb *SyncStateGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SyncStateGroupBy) StringX

func (ssgb *SyncStateGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SyncStateGroupBy) Strings

func (ssgb *SyncStateGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SyncStateGroupBy) StringsX

func (ssgb *SyncStateGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SyncStateMutation

type SyncStateMutation struct {
	// contains filtered or unexported fields
}

SyncStateMutation represents an operation that mutates the SyncState nodes in the graph.

func (*SyncStateMutation) AddField

func (m *SyncStateMutation) 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 (*SyncStateMutation) AddStartBlock

func (m *SyncStateMutation) AddStartBlock(u int64)

AddStartBlock adds u to the "start_block" field.

func (*SyncStateMutation) AddedEdges

func (m *SyncStateMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SyncStateMutation) AddedField

func (m *SyncStateMutation) 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 (*SyncStateMutation) AddedFields

func (m *SyncStateMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SyncStateMutation) AddedIDs

func (m *SyncStateMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SyncStateMutation) AddedStartBlock

func (m *SyncStateMutation) AddedStartBlock() (r int64, exists bool)

AddedStartBlock returns the value that was added to the "start_block" field in this mutation.

func (*SyncStateMutation) ClearEdge

func (m *SyncStateMutation) 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 (*SyncStateMutation) ClearField

func (m *SyncStateMutation) 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 (*SyncStateMutation) ClearedEdges

func (m *SyncStateMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SyncStateMutation) ClearedFields

func (m *SyncStateMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SyncStateMutation) Client

func (m SyncStateMutation) 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 (*SyncStateMutation) EdgeCleared

func (m *SyncStateMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SyncStateMutation) Field

func (m *SyncStateMutation) 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 (*SyncStateMutation) FieldCleared

func (m *SyncStateMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SyncStateMutation) Fields

func (m *SyncStateMutation) 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 (*SyncStateMutation) ID

func (m *SyncStateMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SyncStateMutation) IDs

func (m *SyncStateMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SyncStateMutation) OldField

func (m *SyncStateMutation) 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 (*SyncStateMutation) OldStartBlock

func (m *SyncStateMutation) OldStartBlock(ctx context.Context) (v uint64, err error)

OldStartBlock returns the old "start_block" field's value of the SyncState entity. If the SyncState 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 (*SyncStateMutation) Op

func (m *SyncStateMutation) Op() Op

Op returns the operation name.

func (*SyncStateMutation) RemovedEdges

func (m *SyncStateMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SyncStateMutation) RemovedIDs

func (m *SyncStateMutation) 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 (*SyncStateMutation) ResetEdge

func (m *SyncStateMutation) 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 (*SyncStateMutation) ResetField

func (m *SyncStateMutation) 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 (*SyncStateMutation) ResetStartBlock

func (m *SyncStateMutation) ResetStartBlock()

ResetStartBlock resets all changes to the "start_block" field.

func (*SyncStateMutation) SetField

func (m *SyncStateMutation) 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 (*SyncStateMutation) SetID

func (m *SyncStateMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SyncState entities.

func (*SyncStateMutation) SetStartBlock

func (m *SyncStateMutation) SetStartBlock(u uint64)

SetStartBlock sets the "start_block" field.

func (*SyncStateMutation) StartBlock

func (m *SyncStateMutation) StartBlock() (r uint64, exists bool)

StartBlock returns the value of the "start_block" field in the mutation.

func (SyncStateMutation) Tx

func (m SyncStateMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SyncStateMutation) Type

func (m *SyncStateMutation) Type() string

Type returns the node type of this mutation (SyncState).

func (*SyncStateMutation) Where

func (m *SyncStateMutation) Where(ps ...predicate.SyncState)

Where appends a list predicates to the SyncStateMutation builder.

type SyncStateOrder

type SyncStateOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *SyncStateOrderField `json:"field"`
}

SyncStateOrder defines the ordering of SyncState.

type SyncStateOrderField

type SyncStateOrderField struct {
	// contains filtered or unexported fields
}

SyncStateOrderField defines the ordering field of SyncState.

type SyncStatePaginateOption

type SyncStatePaginateOption func(*syncStatePager) error

SyncStatePaginateOption enables pagination customization.

func WithSyncStateFilter

func WithSyncStateFilter(filter func(*SyncStateQuery) (*SyncStateQuery, error)) SyncStatePaginateOption

WithSyncStateFilter configures pagination filter.

func WithSyncStateOrder

func WithSyncStateOrder(order *SyncStateOrder) SyncStatePaginateOption

WithSyncStateOrder configures pagination ordering.

type SyncStateQuery

type SyncStateQuery struct {
	// contains filtered or unexported fields
}

SyncStateQuery is the builder for querying SyncState entities.

func (*SyncStateQuery) All

func (ssq *SyncStateQuery) All(ctx context.Context) ([]*SyncState, error)

All executes the query and returns a list of SyncStates.

func (*SyncStateQuery) AllX

func (ssq *SyncStateQuery) AllX(ctx context.Context) []*SyncState

AllX is like All, but panics if an error occurs.

func (*SyncStateQuery) Clone

func (ssq *SyncStateQuery) Clone() *SyncStateQuery

Clone returns a duplicate of the SyncStateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SyncStateQuery) CollectFields

func (ss *SyncStateQuery) CollectFields(ctx context.Context, satisfies ...string) *SyncStateQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SyncStateQuery) Count

func (ssq *SyncStateQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SyncStateQuery) CountX

func (ssq *SyncStateQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SyncStateQuery) Exist

func (ssq *SyncStateQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SyncStateQuery) ExistX

func (ssq *SyncStateQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SyncStateQuery) First

func (ssq *SyncStateQuery) First(ctx context.Context) (*SyncState, error)

First returns the first SyncState entity from the query. Returns a *NotFoundError when no SyncState was found.

func (*SyncStateQuery) FirstID

func (ssq *SyncStateQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first SyncState ID from the query. Returns a *NotFoundError when no SyncState ID was found.

func (*SyncStateQuery) FirstIDX

func (ssq *SyncStateQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SyncStateQuery) FirstX

func (ssq *SyncStateQuery) FirstX(ctx context.Context) *SyncState

FirstX is like First, but panics if an error occurs.

func (*SyncStateQuery) GroupBy

func (ssq *SyncStateQuery) GroupBy(field string, fields ...string) *SyncStateGroupBy

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 {
	StartBlock uint64 `json:"start_block,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SyncState.Query().
	GroupBy(syncstate.FieldStartBlock).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SyncStateQuery) IDs

func (ssq *SyncStateQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of SyncState IDs.

func (*SyncStateQuery) IDsX

func (ssq *SyncStateQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SyncStateQuery) Limit

func (ssq *SyncStateQuery) Limit(limit int) *SyncStateQuery

Limit adds a limit step to the query.

func (*SyncStateQuery) Offset

func (ssq *SyncStateQuery) Offset(offset int) *SyncStateQuery

Offset adds an offset step to the query.

func (*SyncStateQuery) Only

func (ssq *SyncStateQuery) Only(ctx context.Context) (*SyncState, error)

Only returns a single SyncState entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SyncState entity is found. Returns a *NotFoundError when no SyncState entities are found.

func (*SyncStateQuery) OnlyID

func (ssq *SyncStateQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only SyncState ID in the query. Returns a *NotSingularError when more than one SyncState ID is found. Returns a *NotFoundError when no entities are found.

func (*SyncStateQuery) OnlyIDX

func (ssq *SyncStateQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SyncStateQuery) OnlyX

func (ssq *SyncStateQuery) OnlyX(ctx context.Context) *SyncState

OnlyX is like Only, but panics if an error occurs.

func (*SyncStateQuery) Order

func (ssq *SyncStateQuery) Order(o ...OrderFunc) *SyncStateQuery

Order adds an order step to the query.

func (*SyncStateQuery) Paginate

func (ss *SyncStateQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SyncStatePaginateOption,
) (*SyncStateConnection, error)

Paginate executes the query and returns a relay based cursor connection to SyncState.

func (*SyncStateQuery) Select

func (ssq *SyncStateQuery) Select(fields ...string) *SyncStateSelect

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 {
	StartBlock uint64 `json:"start_block,omitempty"`
}

client.SyncState.Query().
	Select(syncstate.FieldStartBlock).
	Scan(ctx, &v)

func (*SyncStateQuery) Unique

func (ssq *SyncStateQuery) Unique(unique bool) *SyncStateQuery

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 (*SyncStateQuery) Where

func (ssq *SyncStateQuery) Where(ps ...predicate.SyncState) *SyncStateQuery

Where adds a new predicate for the SyncStateQuery builder.

type SyncStateSelect

type SyncStateSelect struct {
	*SyncStateQuery
	// contains filtered or unexported fields
}

SyncStateSelect is the builder for selecting fields of SyncState entities.

func (*SyncStateSelect) Bool

func (sss *SyncStateSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SyncStateSelect) BoolX

func (sss *SyncStateSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SyncStateSelect) Bools

func (sss *SyncStateSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SyncStateSelect) BoolsX

func (sss *SyncStateSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SyncStateSelect) Float64

func (sss *SyncStateSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SyncStateSelect) Float64X

func (sss *SyncStateSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SyncStateSelect) Float64s

func (sss *SyncStateSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SyncStateSelect) Float64sX

func (sss *SyncStateSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SyncStateSelect) Int

func (sss *SyncStateSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SyncStateSelect) IntX

func (sss *SyncStateSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SyncStateSelect) Ints

func (sss *SyncStateSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SyncStateSelect) IntsX

func (sss *SyncStateSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SyncStateSelect) Scan

func (sss *SyncStateSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SyncStateSelect) ScanX

func (sss *SyncStateSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SyncStateSelect) String

func (sss *SyncStateSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SyncStateSelect) StringX

func (sss *SyncStateSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SyncStateSelect) Strings

func (sss *SyncStateSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SyncStateSelect) StringsX

func (sss *SyncStateSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SyncStateUpdate

type SyncStateUpdate struct {
	// contains filtered or unexported fields
}

SyncStateUpdate is the builder for updating SyncState entities.

func (*SyncStateUpdate) AddStartBlock

func (ssu *SyncStateUpdate) AddStartBlock(u int64) *SyncStateUpdate

AddStartBlock adds u to the "start_block" field.

func (*SyncStateUpdate) Exec

func (ssu *SyncStateUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncStateUpdate) ExecX

func (ssu *SyncStateUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncStateUpdate) Mutation

func (ssu *SyncStateUpdate) Mutation() *SyncStateMutation

Mutation returns the SyncStateMutation object of the builder.

func (*SyncStateUpdate) Save

func (ssu *SyncStateUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SyncStateUpdate) SaveX

func (ssu *SyncStateUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SyncStateUpdate) SetStartBlock

func (ssu *SyncStateUpdate) SetStartBlock(u uint64) *SyncStateUpdate

SetStartBlock sets the "start_block" field.

func (*SyncStateUpdate) Where

Where appends a list predicates to the SyncStateUpdate builder.

type SyncStateUpdateOne

type SyncStateUpdateOne struct {
	// contains filtered or unexported fields
}

SyncStateUpdateOne is the builder for updating a single SyncState entity.

func (*SyncStateUpdateOne) AddStartBlock

func (ssuo *SyncStateUpdateOne) AddStartBlock(u int64) *SyncStateUpdateOne

AddStartBlock adds u to the "start_block" field.

func (*SyncStateUpdateOne) Exec

func (ssuo *SyncStateUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SyncStateUpdateOne) ExecX

func (ssuo *SyncStateUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncStateUpdateOne) Mutation

func (ssuo *SyncStateUpdateOne) Mutation() *SyncStateMutation

Mutation returns the SyncStateMutation object of the builder.

func (*SyncStateUpdateOne) Save

func (ssuo *SyncStateUpdateOne) Save(ctx context.Context) (*SyncState, error)

Save executes the query and returns the updated SyncState entity.

func (*SyncStateUpdateOne) SaveX

func (ssuo *SyncStateUpdateOne) SaveX(ctx context.Context) *SyncState

SaveX is like Save, but panics if an error occurs.

func (*SyncStateUpdateOne) Select

func (ssuo *SyncStateUpdateOne) Select(field string, fields ...string) *SyncStateUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SyncStateUpdateOne) SetStartBlock

func (ssuo *SyncStateUpdateOne) SetStartBlock(u uint64) *SyncStateUpdateOne

SetStartBlock sets the "start_block" field.

type SyncStateUpsert

type SyncStateUpsert struct {
	*sql.UpdateSet
}

SyncStateUpsert is the "OnConflict" setter.

func (*SyncStateUpsert) AddStartBlock

func (u *SyncStateUpsert) AddStartBlock(v uint64) *SyncStateUpsert

AddStartBlock adds v to the "start_block" field.

func (*SyncStateUpsert) SetStartBlock

func (u *SyncStateUpsert) SetStartBlock(v uint64) *SyncStateUpsert

SetStartBlock sets the "start_block" field.

func (*SyncStateUpsert) UpdateStartBlock

func (u *SyncStateUpsert) UpdateStartBlock() *SyncStateUpsert

UpdateStartBlock sets the "start_block" field to the value that was provided on create.

type SyncStateUpsertBulk

type SyncStateUpsertBulk struct {
	// contains filtered or unexported fields
}

SyncStateUpsertBulk is the builder for "upsert"-ing a bulk of SyncState nodes.

func (*SyncStateUpsertBulk) AddStartBlock

func (u *SyncStateUpsertBulk) AddStartBlock(v uint64) *SyncStateUpsertBulk

AddStartBlock adds v to the "start_block" field.

func (*SyncStateUpsertBulk) DoNothing

func (u *SyncStateUpsertBulk) DoNothing() *SyncStateUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SyncStateUpsertBulk) Exec

Exec executes the query.

func (*SyncStateUpsertBulk) ExecX

func (u *SyncStateUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncStateUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SyncState.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SyncStateUpsertBulk) SetStartBlock

func (u *SyncStateUpsertBulk) SetStartBlock(v uint64) *SyncStateUpsertBulk

SetStartBlock sets the "start_block" field.

func (*SyncStateUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SyncStateCreateBulk.OnConflict documentation for more info.

func (*SyncStateUpsertBulk) UpdateNewValues

func (u *SyncStateUpsertBulk) UpdateNewValues() *SyncStateUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SyncState.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(syncstate.FieldID)
		}),
	).
	Exec(ctx)

func (*SyncStateUpsertBulk) UpdateStartBlock

func (u *SyncStateUpsertBulk) UpdateStartBlock() *SyncStateUpsertBulk

UpdateStartBlock sets the "start_block" field to the value that was provided on create.

type SyncStateUpsertOne

type SyncStateUpsertOne struct {
	// contains filtered or unexported fields
}

SyncStateUpsertOne is the builder for "upsert"-ing

one SyncState node.

func (*SyncStateUpsertOne) AddStartBlock

func (u *SyncStateUpsertOne) AddStartBlock(v uint64) *SyncStateUpsertOne

AddStartBlock adds v to the "start_block" field.

func (*SyncStateUpsertOne) DoNothing

func (u *SyncStateUpsertOne) DoNothing() *SyncStateUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SyncStateUpsertOne) Exec

func (u *SyncStateUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SyncStateUpsertOne) ExecX

func (u *SyncStateUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SyncStateUpsertOne) ID

func (u *SyncStateUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SyncStateUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SyncStateUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SyncState.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SyncStateUpsertOne) SetStartBlock

func (u *SyncStateUpsertOne) SetStartBlock(v uint64) *SyncStateUpsertOne

SetStartBlock sets the "start_block" field.

func (*SyncStateUpsertOne) Update

func (u *SyncStateUpsertOne) Update(set func(*SyncStateUpsert)) *SyncStateUpsertOne

Update allows overriding fields `UPDATE` values. See the SyncStateCreate.OnConflict documentation for more info.

func (*SyncStateUpsertOne) UpdateNewValues

func (u *SyncStateUpsertOne) UpdateNewValues() *SyncStateUpsertOne

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.SyncState.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(syncstate.FieldID)
		}),
	).
	Exec(ctx)

func (*SyncStateUpsertOne) UpdateStartBlock

func (u *SyncStateUpsertOne) UpdateStartBlock() *SyncStateUpsertOne

UpdateStartBlock sets the "start_block" field to the value that was provided on create.

type SyncStateWhereInput

type SyncStateWhereInput struct {
	Not *SyncStateWhereInput   `json:"not,omitempty"`
	Or  []*SyncStateWhereInput `json:"or,omitempty"`
	And []*SyncStateWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "start_block" field predicates.
	StartBlock      *uint64  `json:"startBlock,omitempty"`
	StartBlockNEQ   *uint64  `json:"startBlockNEQ,omitempty"`
	StartBlockIn    []uint64 `json:"startBlockIn,omitempty"`
	StartBlockNotIn []uint64 `json:"startBlockNotIn,omitempty"`
	StartBlockGT    *uint64  `json:"startBlockGT,omitempty"`
	StartBlockGTE   *uint64  `json:"startBlockGTE,omitempty"`
	StartBlockLT    *uint64  `json:"startBlockLT,omitempty"`
	StartBlockLTE   *uint64  `json:"startBlockLTE,omitempty"`
}

SyncStateWhereInput represents a where input for filtering SyncState queries.

func (*SyncStateWhereInput) Filter

Filter applies the SyncStateWhereInput filter on the SyncStateQuery builder.

func (*SyncStateWhereInput) P

P returns a predicate for filtering syncstates. An error is returned if the input is empty or invalid.

type SyncStates

type SyncStates []*SyncState

SyncStates is a parsable slice of SyncState.

type Tx

type Tx struct {

	// Amount is the client for interacting with the Amount builders.
	Amount *AmountClient
	// BodyPart is the client for interacting with the BodyPart builders.
	BodyPart *BodyPartClient
	// Dope is the client for interacting with the Dope builders.
	Dope *DopeClient
	// Event is the client for interacting with the Event builders.
	Event *EventClient
	// GameHustler is the client for interacting with the GameHustler builders.
	GameHustler *GameHustlerClient
	// GameHustlerItem is the client for interacting with the GameHustlerItem builders.
	GameHustlerItem *GameHustlerItemClient
	// GameHustlerQuest is the client for interacting with the GameHustlerQuest builders.
	GameHustlerQuest *GameHustlerQuestClient
	// GameHustlerRelation is the client for interacting with the GameHustlerRelation builders.
	GameHustlerRelation *GameHustlerRelationClient
	// Hustler is the client for interacting with the Hustler builders.
	Hustler *HustlerClient
	// Item is the client for interacting with the Item builders.
	Item *ItemClient
	// Listing is the client for interacting with the Listing builders.
	Listing *ListingClient
	// Search is the client for interacting with the Search builders.
	Search *SearchClient
	// SyncState is the client for interacting with the SyncState builders.
	SyncState *SyncStateClient
	// Wallet is the client for interacting with the Wallet builders.
	Wallet *WalletClient
	// WalletItems is the client for interacting with the WalletItems builders.
	WalletItems *WalletItemsClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

type Wallet

type Wallet struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Paper holds the value of the "paper" field.
	Paper schema.BigInt `json:"paper,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WalletQuery when eager-loading is set.
	Edges WalletEdges `json:"edges"`
	// contains filtered or unexported fields
}

Wallet is the model entity for the Wallet schema.

func (*Wallet) Dopes

func (w *Wallet) Dopes(ctx context.Context) ([]*Dope, error)

func (*Wallet) Hustlers

func (w *Wallet) Hustlers(ctx context.Context) ([]*Hustler, error)

func (*Wallet) Items

func (w *Wallet) Items(ctx context.Context) ([]*WalletItems, error)

func (*Wallet) Node

func (w *Wallet) Node(ctx context.Context) (node *Node, err error)

func (*Wallet) QueryDopes

func (w *Wallet) QueryDopes() *DopeQuery

QueryDopes queries the "dopes" edge of the Wallet entity.

func (*Wallet) QueryHustlers

func (w *Wallet) QueryHustlers() *HustlerQuery

QueryHustlers queries the "hustlers" edge of the Wallet entity.

func (*Wallet) QueryItems

func (w *Wallet) QueryItems() *WalletItemsQuery

QueryItems queries the "items" edge of the Wallet entity.

func (*Wallet) String

func (w *Wallet) String() string

String implements the fmt.Stringer.

func (*Wallet) ToEdge

func (w *Wallet) ToEdge(order *WalletOrder) *WalletEdge

ToEdge converts Wallet into WalletEdge.

func (*Wallet) Unwrap

func (w *Wallet) Unwrap() *Wallet

Unwrap unwraps the Wallet 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 (*Wallet) Update

func (w *Wallet) Update() *WalletUpdateOne

Update returns a builder for updating this Wallet. Note that you need to call Wallet.Unwrap() before calling this method if this Wallet was returned from a transaction, and the transaction was committed or rolled back.

type WalletClient

type WalletClient struct {
	// contains filtered or unexported fields
}

WalletClient is a client for the Wallet schema.

func NewWalletClient

func NewWalletClient(c config) *WalletClient

NewWalletClient returns a client for the Wallet from the given config.

func (*WalletClient) Create

func (c *WalletClient) Create() *WalletCreate

Create returns a create builder for Wallet.

func (*WalletClient) CreateBulk

func (c *WalletClient) CreateBulk(builders ...*WalletCreate) *WalletCreateBulk

CreateBulk returns a builder for creating a bulk of Wallet entities.

func (*WalletClient) Delete

func (c *WalletClient) Delete() *WalletDelete

Delete returns a delete builder for Wallet.

func (*WalletClient) DeleteOne

func (c *WalletClient) DeleteOne(w *Wallet) *WalletDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*WalletClient) DeleteOneID

func (c *WalletClient) DeleteOneID(id string) *WalletDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*WalletClient) Get

func (c *WalletClient) Get(ctx context.Context, id string) (*Wallet, error)

Get returns a Wallet entity by its id.

func (*WalletClient) GetX

func (c *WalletClient) GetX(ctx context.Context, id string) *Wallet

GetX is like Get, but panics if an error occurs.

func (*WalletClient) Hooks

func (c *WalletClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WalletClient) Query

func (c *WalletClient) Query() *WalletQuery

Query returns a query builder for Wallet.

func (*WalletClient) QueryDopes

func (c *WalletClient) QueryDopes(w *Wallet) *DopeQuery

QueryDopes queries the dopes edge of a Wallet.

func (*WalletClient) QueryHustlers

func (c *WalletClient) QueryHustlers(w *Wallet) *HustlerQuery

QueryHustlers queries the hustlers edge of a Wallet.

func (*WalletClient) QueryItems

func (c *WalletClient) QueryItems(w *Wallet) *WalletItemsQuery

QueryItems queries the items edge of a Wallet.

func (*WalletClient) Update

func (c *WalletClient) Update() *WalletUpdate

Update returns an update builder for Wallet.

func (*WalletClient) UpdateOne

func (c *WalletClient) UpdateOne(w *Wallet) *WalletUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WalletClient) UpdateOneID

func (c *WalletClient) UpdateOneID(id string) *WalletUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WalletClient) Use

func (c *WalletClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `wallet.Hooks(f(g(h())))`.

type WalletConnection

type WalletConnection struct {
	Edges      []*WalletEdge `json:"edges"`
	PageInfo   PageInfo      `json:"pageInfo"`
	TotalCount int           `json:"totalCount"`
}

WalletConnection is the connection containing edges to Wallet.

type WalletCreate

type WalletCreate struct {
	// contains filtered or unexported fields
}

WalletCreate is the builder for creating a Wallet entity.

func (*WalletCreate) AddDopeIDs

func (wc *WalletCreate) AddDopeIDs(ids ...string) *WalletCreate

AddDopeIDs adds the "dopes" edge to the Dope entity by IDs.

func (*WalletCreate) AddDopes

func (wc *WalletCreate) AddDopes(d ...*Dope) *WalletCreate

AddDopes adds the "dopes" edges to the Dope entity.

func (*WalletCreate) AddHustlerIDs

func (wc *WalletCreate) AddHustlerIDs(ids ...string) *WalletCreate

AddHustlerIDs adds the "hustlers" edge to the Hustler entity by IDs.

func (*WalletCreate) AddHustlers

func (wc *WalletCreate) AddHustlers(h ...*Hustler) *WalletCreate

AddHustlers adds the "hustlers" edges to the Hustler entity.

func (*WalletCreate) AddItemIDs

func (wc *WalletCreate) AddItemIDs(ids ...string) *WalletCreate

AddItemIDs adds the "items" edge to the WalletItems entity by IDs.

func (*WalletCreate) AddItems

func (wc *WalletCreate) AddItems(w ...*WalletItems) *WalletCreate

AddItems adds the "items" edges to the WalletItems entity.

func (*WalletCreate) Exec

func (wc *WalletCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WalletCreate) ExecX

func (wc *WalletCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletCreate) Mutation

func (wc *WalletCreate) Mutation() *WalletMutation

Mutation returns the WalletMutation object of the builder.

func (*WalletCreate) OnConflict

func (wc *WalletCreate) OnConflict(opts ...sql.ConflictOption) *WalletUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Wallet.Create().
	SetPaper(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.WalletUpsert) {
		SetPaper(v+v).
	}).
	Exec(ctx)

func (*WalletCreate) OnConflictColumns

func (wc *WalletCreate) OnConflictColumns(columns ...string) *WalletUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Wallet.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WalletCreate) Save

func (wc *WalletCreate) Save(ctx context.Context) (*Wallet, error)

Save creates the Wallet in the database.

func (*WalletCreate) SaveX

func (wc *WalletCreate) SaveX(ctx context.Context) *Wallet

SaveX calls Save and panics if Save returns an error.

func (*WalletCreate) SetCreatedAt

func (wc *WalletCreate) SetCreatedAt(t time.Time) *WalletCreate

SetCreatedAt sets the "created_at" field.

func (*WalletCreate) SetID

func (wc *WalletCreate) SetID(s string) *WalletCreate

SetID sets the "id" field.

func (*WalletCreate) SetNillableCreatedAt

func (wc *WalletCreate) SetNillableCreatedAt(t *time.Time) *WalletCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*WalletCreate) SetNillablePaper

func (wc *WalletCreate) SetNillablePaper(si *schema.BigInt) *WalletCreate

SetNillablePaper sets the "paper" field if the given value is not nil.

func (*WalletCreate) SetPaper

func (wc *WalletCreate) SetPaper(si schema.BigInt) *WalletCreate

SetPaper sets the "paper" field.

type WalletCreateBulk

type WalletCreateBulk struct {
	// contains filtered or unexported fields
}

WalletCreateBulk is the builder for creating many Wallet entities in bulk.

func (*WalletCreateBulk) Exec

func (wcb *WalletCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WalletCreateBulk) ExecX

func (wcb *WalletCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletCreateBulk) OnConflict

func (wcb *WalletCreateBulk) OnConflict(opts ...sql.ConflictOption) *WalletUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Wallet.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.WalletUpsert) {
		SetPaper(v+v).
	}).
	Exec(ctx)

func (*WalletCreateBulk) OnConflictColumns

func (wcb *WalletCreateBulk) OnConflictColumns(columns ...string) *WalletUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Wallet.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WalletCreateBulk) Save

func (wcb *WalletCreateBulk) Save(ctx context.Context) ([]*Wallet, error)

Save creates the Wallet entities in the database.

func (*WalletCreateBulk) SaveX

func (wcb *WalletCreateBulk) SaveX(ctx context.Context) []*Wallet

SaveX is like Save, but panics if an error occurs.

type WalletDelete

type WalletDelete struct {
	// contains filtered or unexported fields
}

WalletDelete is the builder for deleting a Wallet entity.

func (*WalletDelete) Exec

func (wd *WalletDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WalletDelete) ExecX

func (wd *WalletDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WalletDelete) Where

func (wd *WalletDelete) Where(ps ...predicate.Wallet) *WalletDelete

Where appends a list predicates to the WalletDelete builder.

type WalletDeleteOne

type WalletDeleteOne struct {
	// contains filtered or unexported fields
}

WalletDeleteOne is the builder for deleting a single Wallet entity.

func (*WalletDeleteOne) Exec

func (wdo *WalletDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WalletDeleteOne) ExecX

func (wdo *WalletDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type WalletEdge

type WalletEdge struct {
	Node   *Wallet `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

WalletEdge is the edge representation of Wallet.

type WalletEdges

type WalletEdges struct {
	// Dopes holds the value of the dopes edge.
	Dopes []*Dope `json:"dopes,omitempty"`
	// Items holds the value of the items edge.
	Items []*WalletItems `json:"items,omitempty"`
	// Hustlers holds the value of the hustlers edge.
	Hustlers []*Hustler `json:"hustlers,omitempty"`
	// contains filtered or unexported fields
}

WalletEdges holds the relations/edges for other nodes in the graph.

func (WalletEdges) DopesOrErr

func (e WalletEdges) DopesOrErr() ([]*Dope, error)

DopesOrErr returns the Dopes value or an error if the edge was not loaded in eager-loading.

func (WalletEdges) HustlersOrErr

func (e WalletEdges) HustlersOrErr() ([]*Hustler, error)

HustlersOrErr returns the Hustlers value or an error if the edge was not loaded in eager-loading.

func (WalletEdges) ItemsOrErr

func (e WalletEdges) ItemsOrErr() ([]*WalletItems, error)

ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.

type WalletGroupBy

type WalletGroupBy struct {
	// contains filtered or unexported fields
}

WalletGroupBy is the group-by builder for Wallet entities.

func (*WalletGroupBy) Aggregate

func (wgb *WalletGroupBy) Aggregate(fns ...AggregateFunc) *WalletGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WalletGroupBy) Bool

func (wgb *WalletGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*WalletGroupBy) BoolX

func (wgb *WalletGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WalletGroupBy) Bools

func (wgb *WalletGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*WalletGroupBy) BoolsX

func (wgb *WalletGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WalletGroupBy) Float64

func (wgb *WalletGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*WalletGroupBy) Float64X

func (wgb *WalletGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WalletGroupBy) Float64s

func (wgb *WalletGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*WalletGroupBy) Float64sX

func (wgb *WalletGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WalletGroupBy) Int

func (wgb *WalletGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*WalletGroupBy) IntX

func (wgb *WalletGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WalletGroupBy) Ints

func (wgb *WalletGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*WalletGroupBy) IntsX

func (wgb *WalletGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WalletGroupBy) Scan

func (wgb *WalletGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*WalletGroupBy) ScanX

func (wgb *WalletGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*WalletGroupBy) String

func (wgb *WalletGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*WalletGroupBy) StringX

func (wgb *WalletGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WalletGroupBy) Strings

func (wgb *WalletGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*WalletGroupBy) StringsX

func (wgb *WalletGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WalletItems

type WalletItems struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Balance holds the value of the "balance" field.
	Balance schema.BigInt `json:"balance,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WalletItemsQuery when eager-loading is set.
	Edges WalletItemsEdges `json:"edges"`
	// contains filtered or unexported fields
}

WalletItems is the model entity for the WalletItems schema.

func (*WalletItems) Item

func (wi *WalletItems) Item(ctx context.Context) (*Item, error)

func (*WalletItems) Node

func (wi *WalletItems) Node(ctx context.Context) (node *Node, err error)

func (*WalletItems) QueryItem

func (wi *WalletItems) QueryItem() *ItemQuery

QueryItem queries the "item" edge of the WalletItems entity.

func (*WalletItems) QueryWallet

func (wi *WalletItems) QueryWallet() *WalletQuery

QueryWallet queries the "wallet" edge of the WalletItems entity.

func (*WalletItems) String

func (wi *WalletItems) String() string

String implements the fmt.Stringer.

func (*WalletItems) ToEdge

func (wi *WalletItems) ToEdge(order *WalletItemsOrder) *WalletItemsEdge

ToEdge converts WalletItems into WalletItemsEdge.

func (*WalletItems) Unwrap

func (wi *WalletItems) Unwrap() *WalletItems

Unwrap unwraps the WalletItems 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 (*WalletItems) Update

func (wi *WalletItems) Update() *WalletItemsUpdateOne

Update returns a builder for updating this WalletItems. Note that you need to call WalletItems.Unwrap() before calling this method if this WalletItems was returned from a transaction, and the transaction was committed or rolled back.

func (*WalletItems) Wallet

func (wi *WalletItems) Wallet(ctx context.Context) (*Wallet, error)

type WalletItemsClient

type WalletItemsClient struct {
	// contains filtered or unexported fields
}

WalletItemsClient is a client for the WalletItems schema.

func NewWalletItemsClient

func NewWalletItemsClient(c config) *WalletItemsClient

NewWalletItemsClient returns a client for the WalletItems from the given config.

func (*WalletItemsClient) Create

func (c *WalletItemsClient) Create() *WalletItemsCreate

Create returns a create builder for WalletItems.

func (*WalletItemsClient) CreateBulk

func (c *WalletItemsClient) CreateBulk(builders ...*WalletItemsCreate) *WalletItemsCreateBulk

CreateBulk returns a builder for creating a bulk of WalletItems entities.

func (*WalletItemsClient) Delete

func (c *WalletItemsClient) Delete() *WalletItemsDelete

Delete returns a delete builder for WalletItems.

func (*WalletItemsClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*WalletItemsClient) DeleteOneID

func (c *WalletItemsClient) DeleteOneID(id string) *WalletItemsDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*WalletItemsClient) Get

Get returns a WalletItems entity by its id.

func (*WalletItemsClient) GetX

GetX is like Get, but panics if an error occurs.

func (*WalletItemsClient) Hooks

func (c *WalletItemsClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WalletItemsClient) Query

func (c *WalletItemsClient) Query() *WalletItemsQuery

Query returns a query builder for WalletItems.

func (*WalletItemsClient) QueryItem

func (c *WalletItemsClient) QueryItem(wi *WalletItems) *ItemQuery

QueryItem queries the item edge of a WalletItems.

func (*WalletItemsClient) QueryWallet

func (c *WalletItemsClient) QueryWallet(wi *WalletItems) *WalletQuery

QueryWallet queries the wallet edge of a WalletItems.

func (*WalletItemsClient) Update

func (c *WalletItemsClient) Update() *WalletItemsUpdate

Update returns an update builder for WalletItems.

func (*WalletItemsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WalletItemsClient) UpdateOneID

func (c *WalletItemsClient) UpdateOneID(id string) *WalletItemsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WalletItemsClient) Use

func (c *WalletItemsClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `walletitems.Hooks(f(g(h())))`.

type WalletItemsConnection

type WalletItemsConnection struct {
	Edges      []*WalletItemsEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

WalletItemsConnection is the connection containing edges to WalletItems.

type WalletItemsCreate

type WalletItemsCreate struct {
	// contains filtered or unexported fields
}

WalletItemsCreate is the builder for creating a WalletItems entity.

func (*WalletItemsCreate) Exec

func (wic *WalletItemsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WalletItemsCreate) ExecX

func (wic *WalletItemsCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletItemsCreate) Mutation

func (wic *WalletItemsCreate) Mutation() *WalletItemsMutation

Mutation returns the WalletItemsMutation object of the builder.

func (*WalletItemsCreate) OnConflict

func (wic *WalletItemsCreate) OnConflict(opts ...sql.ConflictOption) *WalletItemsUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WalletItems.Create().
	SetBalance(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.WalletItemsUpsert) {
		SetBalance(v+v).
	}).
	Exec(ctx)

func (*WalletItemsCreate) OnConflictColumns

func (wic *WalletItemsCreate) OnConflictColumns(columns ...string) *WalletItemsUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WalletItems.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WalletItemsCreate) Save

func (wic *WalletItemsCreate) Save(ctx context.Context) (*WalletItems, error)

Save creates the WalletItems in the database.

func (*WalletItemsCreate) SaveX

func (wic *WalletItemsCreate) SaveX(ctx context.Context) *WalletItems

SaveX calls Save and panics if Save returns an error.

func (*WalletItemsCreate) SetBalance

func (wic *WalletItemsCreate) SetBalance(si schema.BigInt) *WalletItemsCreate

SetBalance sets the "balance" field.

func (*WalletItemsCreate) SetID

SetID sets the "id" field.

func (*WalletItemsCreate) SetItem

func (wic *WalletItemsCreate) SetItem(i *Item) *WalletItemsCreate

SetItem sets the "item" edge to the Item entity.

func (*WalletItemsCreate) SetItemID

func (wic *WalletItemsCreate) SetItemID(id string) *WalletItemsCreate

SetItemID sets the "item" edge to the Item entity by ID.

func (*WalletItemsCreate) SetNillableBalance

func (wic *WalletItemsCreate) SetNillableBalance(si *schema.BigInt) *WalletItemsCreate

SetNillableBalance sets the "balance" field if the given value is not nil.

func (*WalletItemsCreate) SetNillableItemID

func (wic *WalletItemsCreate) SetNillableItemID(id *string) *WalletItemsCreate

SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.

func (*WalletItemsCreate) SetNillableWalletID

func (wic *WalletItemsCreate) SetNillableWalletID(id *string) *WalletItemsCreate

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*WalletItemsCreate) SetWallet

func (wic *WalletItemsCreate) SetWallet(w *Wallet) *WalletItemsCreate

SetWallet sets the "wallet" edge to the Wallet entity.

func (*WalletItemsCreate) SetWalletID

func (wic *WalletItemsCreate) SetWalletID(id string) *WalletItemsCreate

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

type WalletItemsCreateBulk

type WalletItemsCreateBulk struct {
	// contains filtered or unexported fields
}

WalletItemsCreateBulk is the builder for creating many WalletItems entities in bulk.

func (*WalletItemsCreateBulk) Exec

func (wicb *WalletItemsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WalletItemsCreateBulk) ExecX

func (wicb *WalletItemsCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletItemsCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WalletItems.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.WalletItemsUpsert) {
		SetBalance(v+v).
	}).
	Exec(ctx)

func (*WalletItemsCreateBulk) OnConflictColumns

func (wicb *WalletItemsCreateBulk) OnConflictColumns(columns ...string) *WalletItemsUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WalletItems.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WalletItemsCreateBulk) Save

func (wicb *WalletItemsCreateBulk) Save(ctx context.Context) ([]*WalletItems, error)

Save creates the WalletItems entities in the database.

func (*WalletItemsCreateBulk) SaveX

func (wicb *WalletItemsCreateBulk) SaveX(ctx context.Context) []*WalletItems

SaveX is like Save, but panics if an error occurs.

type WalletItemsDelete

type WalletItemsDelete struct {
	// contains filtered or unexported fields
}

WalletItemsDelete is the builder for deleting a WalletItems entity.

func (*WalletItemsDelete) Exec

func (wid *WalletItemsDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WalletItemsDelete) ExecX

func (wid *WalletItemsDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WalletItemsDelete) Where

Where appends a list predicates to the WalletItemsDelete builder.

type WalletItemsDeleteOne

type WalletItemsDeleteOne struct {
	// contains filtered or unexported fields
}

WalletItemsDeleteOne is the builder for deleting a single WalletItems entity.

func (*WalletItemsDeleteOne) Exec

func (wido *WalletItemsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WalletItemsDeleteOne) ExecX

func (wido *WalletItemsDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type WalletItemsEdge

type WalletItemsEdge struct {
	Node   *WalletItems `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

WalletItemsEdge is the edge representation of WalletItems.

type WalletItemsEdges

type WalletItemsEdges struct {
	// Wallet holds the value of the wallet edge.
	Wallet *Wallet `json:"wallet,omitempty"`
	// Item holds the value of the item edge.
	Item *Item `json:"item,omitempty"`
	// contains filtered or unexported fields
}

WalletItemsEdges holds the relations/edges for other nodes in the graph.

func (WalletItemsEdges) ItemOrErr

func (e WalletItemsEdges) ItemOrErr() (*Item, error)

ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WalletItemsEdges) WalletOrErr

func (e WalletItemsEdges) WalletOrErr() (*Wallet, error)

WalletOrErr returns the Wallet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WalletItemsGroupBy

type WalletItemsGroupBy struct {
	// contains filtered or unexported fields
}

WalletItemsGroupBy is the group-by builder for WalletItems entities.

func (*WalletItemsGroupBy) Aggregate

func (wigb *WalletItemsGroupBy) Aggregate(fns ...AggregateFunc) *WalletItemsGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WalletItemsGroupBy) Bool

func (wigb *WalletItemsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*WalletItemsGroupBy) BoolX

func (wigb *WalletItemsGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WalletItemsGroupBy) Bools

func (wigb *WalletItemsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*WalletItemsGroupBy) BoolsX

func (wigb *WalletItemsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WalletItemsGroupBy) Float64

func (wigb *WalletItemsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*WalletItemsGroupBy) Float64X

func (wigb *WalletItemsGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WalletItemsGroupBy) Float64s

func (wigb *WalletItemsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*WalletItemsGroupBy) Float64sX

func (wigb *WalletItemsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WalletItemsGroupBy) Int

func (wigb *WalletItemsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*WalletItemsGroupBy) IntX

func (wigb *WalletItemsGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WalletItemsGroupBy) Ints

func (wigb *WalletItemsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*WalletItemsGroupBy) IntsX

func (wigb *WalletItemsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WalletItemsGroupBy) Scan

func (wigb *WalletItemsGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*WalletItemsGroupBy) ScanX

func (wigb *WalletItemsGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*WalletItemsGroupBy) String

func (wigb *WalletItemsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*WalletItemsGroupBy) StringX

func (wigb *WalletItemsGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WalletItemsGroupBy) Strings

func (wigb *WalletItemsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*WalletItemsGroupBy) StringsX

func (wigb *WalletItemsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WalletItemsMutation

type WalletItemsMutation struct {
	// contains filtered or unexported fields
}

WalletItemsMutation represents an operation that mutates the WalletItems nodes in the graph.

func (*WalletItemsMutation) AddBalance

func (m *WalletItemsMutation) AddBalance(si schema.BigInt)

AddBalance adds si to the "balance" field.

func (*WalletItemsMutation) AddField

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) AddedBalance

func (m *WalletItemsMutation) AddedBalance() (r schema.BigInt, exists bool)

AddedBalance returns the value that was added to the "balance" field in this mutation.

func (*WalletItemsMutation) AddedEdges

func (m *WalletItemsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WalletItemsMutation) AddedField

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) AddedFields

func (m *WalletItemsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WalletItemsMutation) AddedIDs

func (m *WalletItemsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WalletItemsMutation) Balance

func (m *WalletItemsMutation) Balance() (r schema.BigInt, exists bool)

Balance returns the value of the "balance" field in the mutation.

func (*WalletItemsMutation) ClearEdge

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) ClearField

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) ClearItem

func (m *WalletItemsMutation) ClearItem()

ClearItem clears the "item" edge to the Item entity.

func (*WalletItemsMutation) ClearWallet

func (m *WalletItemsMutation) ClearWallet()

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*WalletItemsMutation) ClearedEdges

func (m *WalletItemsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WalletItemsMutation) ClearedFields

func (m *WalletItemsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WalletItemsMutation) Client

func (m WalletItemsMutation) 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 (*WalletItemsMutation) EdgeCleared

func (m *WalletItemsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WalletItemsMutation) Field

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) FieldCleared

func (m *WalletItemsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WalletItemsMutation) Fields

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) ID

func (m *WalletItemsMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WalletItemsMutation) IDs

func (m *WalletItemsMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*WalletItemsMutation) ItemCleared

func (m *WalletItemsMutation) ItemCleared() bool

ItemCleared reports if the "item" edge to the Item entity was cleared.

func (*WalletItemsMutation) ItemID

func (m *WalletItemsMutation) ItemID() (id string, exists bool)

ItemID returns the "item" edge ID in the mutation.

func (*WalletItemsMutation) ItemIDs

func (m *WalletItemsMutation) ItemIDs() (ids []string)

ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.

func (*WalletItemsMutation) OldBalance

func (m *WalletItemsMutation) OldBalance(ctx context.Context) (v schema.BigInt, err error)

OldBalance returns the old "balance" field's value of the WalletItems entity. If the WalletItems 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 (*WalletItemsMutation) OldField

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) Op

func (m *WalletItemsMutation) Op() Op

Op returns the operation name.

func (*WalletItemsMutation) RemovedEdges

func (m *WalletItemsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WalletItemsMutation) RemovedIDs

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) ResetBalance

func (m *WalletItemsMutation) ResetBalance()

ResetBalance resets all changes to the "balance" field.

func (*WalletItemsMutation) ResetEdge

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) ResetField

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) ResetItem

func (m *WalletItemsMutation) ResetItem()

ResetItem resets all changes to the "item" edge.

func (*WalletItemsMutation) ResetWallet

func (m *WalletItemsMutation) ResetWallet()

ResetWallet resets all changes to the "wallet" edge.

func (*WalletItemsMutation) SetBalance

func (m *WalletItemsMutation) SetBalance(si schema.BigInt)

SetBalance sets the "balance" field.

func (*WalletItemsMutation) SetField

func (m *WalletItemsMutation) 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 (*WalletItemsMutation) SetID

func (m *WalletItemsMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of WalletItems entities.

func (*WalletItemsMutation) SetItemID

func (m *WalletItemsMutation) SetItemID(id string)

SetItemID sets the "item" edge to the Item entity by id.

func (*WalletItemsMutation) SetWalletID

func (m *WalletItemsMutation) SetWalletID(id string)

SetWalletID sets the "wallet" edge to the Wallet entity by id.

func (WalletItemsMutation) Tx

func (m WalletItemsMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WalletItemsMutation) Type

func (m *WalletItemsMutation) Type() string

Type returns the node type of this mutation (WalletItems).

func (*WalletItemsMutation) WalletCleared

func (m *WalletItemsMutation) WalletCleared() bool

WalletCleared reports if the "wallet" edge to the Wallet entity was cleared.

func (*WalletItemsMutation) WalletID

func (m *WalletItemsMutation) WalletID() (id string, exists bool)

WalletID returns the "wallet" edge ID in the mutation.

func (*WalletItemsMutation) WalletIDs

func (m *WalletItemsMutation) WalletIDs() (ids []string)

WalletIDs returns the "wallet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WalletID instead. It exists only for internal usage by the builders.

func (*WalletItemsMutation) Where

func (m *WalletItemsMutation) Where(ps ...predicate.WalletItems)

Where appends a list predicates to the WalletItemsMutation builder.

type WalletItemsOrder

type WalletItemsOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *WalletItemsOrderField `json:"field"`
}

WalletItemsOrder defines the ordering of WalletItems.

type WalletItemsOrderField

type WalletItemsOrderField struct {
	// contains filtered or unexported fields
}

WalletItemsOrderField defines the ordering field of WalletItems.

type WalletItemsPaginateOption

type WalletItemsPaginateOption func(*walletItemsPager) error

WalletItemsPaginateOption enables pagination customization.

func WithWalletItemsFilter

func WithWalletItemsFilter(filter func(*WalletItemsQuery) (*WalletItemsQuery, error)) WalletItemsPaginateOption

WithWalletItemsFilter configures pagination filter.

func WithWalletItemsOrder

func WithWalletItemsOrder(order *WalletItemsOrder) WalletItemsPaginateOption

WithWalletItemsOrder configures pagination ordering.

type WalletItemsQuery

type WalletItemsQuery struct {
	// contains filtered or unexported fields
}

WalletItemsQuery is the builder for querying WalletItems entities.

func (*WalletItemsQuery) All

func (wiq *WalletItemsQuery) All(ctx context.Context) ([]*WalletItems, error)

All executes the query and returns a list of WalletItemsSlice.

func (*WalletItemsQuery) AllX

func (wiq *WalletItemsQuery) AllX(ctx context.Context) []*WalletItems

AllX is like All, but panics if an error occurs.

func (*WalletItemsQuery) Clone

func (wiq *WalletItemsQuery) Clone() *WalletItemsQuery

Clone returns a duplicate of the WalletItemsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WalletItemsQuery) CollectFields

func (wi *WalletItemsQuery) CollectFields(ctx context.Context, satisfies ...string) *WalletItemsQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*WalletItemsQuery) Count

func (wiq *WalletItemsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WalletItemsQuery) CountX

func (wiq *WalletItemsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WalletItemsQuery) Exist

func (wiq *WalletItemsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WalletItemsQuery) ExistX

func (wiq *WalletItemsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WalletItemsQuery) First

func (wiq *WalletItemsQuery) First(ctx context.Context) (*WalletItems, error)

First returns the first WalletItems entity from the query. Returns a *NotFoundError when no WalletItems was found.

func (*WalletItemsQuery) FirstID

func (wiq *WalletItemsQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first WalletItems ID from the query. Returns a *NotFoundError when no WalletItems ID was found.

func (*WalletItemsQuery) FirstIDX

func (wiq *WalletItemsQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*WalletItemsQuery) FirstX

func (wiq *WalletItemsQuery) FirstX(ctx context.Context) *WalletItems

FirstX is like First, but panics if an error occurs.

func (*WalletItemsQuery) GroupBy

func (wiq *WalletItemsQuery) GroupBy(field string, fields ...string) *WalletItemsGroupBy

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 {
	Balance schema.BigInt `json:"balance,omitempty"`
	Count int `json:"count,omitempty"`
}

client.WalletItems.Query().
	GroupBy(walletitems.FieldBalance).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WalletItemsQuery) IDs

func (wiq *WalletItemsQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of WalletItems IDs.

func (*WalletItemsQuery) IDsX

func (wiq *WalletItemsQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*WalletItemsQuery) Limit

func (wiq *WalletItemsQuery) Limit(limit int) *WalletItemsQuery

Limit adds a limit step to the query.

func (*WalletItemsQuery) Offset

func (wiq *WalletItemsQuery) Offset(offset int) *WalletItemsQuery

Offset adds an offset step to the query.

func (*WalletItemsQuery) Only

func (wiq *WalletItemsQuery) Only(ctx context.Context) (*WalletItems, error)

Only returns a single WalletItems entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WalletItems entity is found. Returns a *NotFoundError when no WalletItems entities are found.

func (*WalletItemsQuery) OnlyID

func (wiq *WalletItemsQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only WalletItems ID in the query. Returns a *NotSingularError when more than one WalletItems ID is found. Returns a *NotFoundError when no entities are found.

func (*WalletItemsQuery) OnlyIDX

func (wiq *WalletItemsQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WalletItemsQuery) OnlyX

func (wiq *WalletItemsQuery) OnlyX(ctx context.Context) *WalletItems

OnlyX is like Only, but panics if an error occurs.

func (*WalletItemsQuery) Order

func (wiq *WalletItemsQuery) Order(o ...OrderFunc) *WalletItemsQuery

Order adds an order step to the query.

func (*WalletItemsQuery) Paginate

func (wi *WalletItemsQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...WalletItemsPaginateOption,
) (*WalletItemsConnection, error)

Paginate executes the query and returns a relay based cursor connection to WalletItems.

func (*WalletItemsQuery) QueryItem

func (wiq *WalletItemsQuery) QueryItem() *ItemQuery

QueryItem chains the current query on the "item" edge.

func (*WalletItemsQuery) QueryWallet

func (wiq *WalletItemsQuery) QueryWallet() *WalletQuery

QueryWallet chains the current query on the "wallet" edge.

func (*WalletItemsQuery) Select

func (wiq *WalletItemsQuery) Select(fields ...string) *WalletItemsSelect

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 {
	Balance schema.BigInt `json:"balance,omitempty"`
}

client.WalletItems.Query().
	Select(walletitems.FieldBalance).
	Scan(ctx, &v)

func (*WalletItemsQuery) Unique

func (wiq *WalletItemsQuery) Unique(unique bool) *WalletItemsQuery

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 (*WalletItemsQuery) Where

Where adds a new predicate for the WalletItemsQuery builder.

func (*WalletItemsQuery) WithItem

func (wiq *WalletItemsQuery) WithItem(opts ...func(*ItemQuery)) *WalletItemsQuery

WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.

func (*WalletItemsQuery) WithWallet

func (wiq *WalletItemsQuery) WithWallet(opts ...func(*WalletQuery)) *WalletItemsQuery

WithWallet tells the query-builder to eager-load the nodes that are connected to the "wallet" edge. The optional arguments are used to configure the query builder of the edge.

type WalletItemsSelect

type WalletItemsSelect struct {
	*WalletItemsQuery
	// contains filtered or unexported fields
}

WalletItemsSelect is the builder for selecting fields of WalletItems entities.

func (*WalletItemsSelect) Bool

func (wis *WalletItemsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WalletItemsSelect) BoolX

func (wis *WalletItemsSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WalletItemsSelect) Bools

func (wis *WalletItemsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WalletItemsSelect) BoolsX

func (wis *WalletItemsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WalletItemsSelect) Float64

func (wis *WalletItemsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WalletItemsSelect) Float64X

func (wis *WalletItemsSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WalletItemsSelect) Float64s

func (wis *WalletItemsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WalletItemsSelect) Float64sX

func (wis *WalletItemsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WalletItemsSelect) Int

func (wis *WalletItemsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WalletItemsSelect) IntX

func (wis *WalletItemsSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WalletItemsSelect) Ints

func (wis *WalletItemsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WalletItemsSelect) IntsX

func (wis *WalletItemsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WalletItemsSelect) Scan

func (wis *WalletItemsSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*WalletItemsSelect) ScanX

func (wis *WalletItemsSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*WalletItemsSelect) String

func (wis *WalletItemsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WalletItemsSelect) StringX

func (wis *WalletItemsSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WalletItemsSelect) Strings

func (wis *WalletItemsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WalletItemsSelect) StringsX

func (wis *WalletItemsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WalletItemsSlice

type WalletItemsSlice []*WalletItems

WalletItemsSlice is a parsable slice of WalletItems.

type WalletItemsUpdate

type WalletItemsUpdate struct {
	// contains filtered or unexported fields
}

WalletItemsUpdate is the builder for updating WalletItems entities.

func (*WalletItemsUpdate) AddBalance

func (wiu *WalletItemsUpdate) AddBalance(si schema.BigInt) *WalletItemsUpdate

AddBalance adds si to the "balance" field.

func (*WalletItemsUpdate) ClearItem

func (wiu *WalletItemsUpdate) ClearItem() *WalletItemsUpdate

ClearItem clears the "item" edge to the Item entity.

func (*WalletItemsUpdate) ClearWallet

func (wiu *WalletItemsUpdate) ClearWallet() *WalletItemsUpdate

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*WalletItemsUpdate) Exec

func (wiu *WalletItemsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WalletItemsUpdate) ExecX

func (wiu *WalletItemsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletItemsUpdate) Mutation

func (wiu *WalletItemsUpdate) Mutation() *WalletItemsMutation

Mutation returns the WalletItemsMutation object of the builder.

func (*WalletItemsUpdate) Save

func (wiu *WalletItemsUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WalletItemsUpdate) SaveX

func (wiu *WalletItemsUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WalletItemsUpdate) SetBalance

func (wiu *WalletItemsUpdate) SetBalance(si schema.BigInt) *WalletItemsUpdate

SetBalance sets the "balance" field.

func (*WalletItemsUpdate) SetItem

func (wiu *WalletItemsUpdate) SetItem(i *Item) *WalletItemsUpdate

SetItem sets the "item" edge to the Item entity.

func (*WalletItemsUpdate) SetItemID

func (wiu *WalletItemsUpdate) SetItemID(id string) *WalletItemsUpdate

SetItemID sets the "item" edge to the Item entity by ID.

func (*WalletItemsUpdate) SetNillableBalance

func (wiu *WalletItemsUpdate) SetNillableBalance(si *schema.BigInt) *WalletItemsUpdate

SetNillableBalance sets the "balance" field if the given value is not nil.

func (*WalletItemsUpdate) SetNillableItemID

func (wiu *WalletItemsUpdate) SetNillableItemID(id *string) *WalletItemsUpdate

SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.

func (*WalletItemsUpdate) SetNillableWalletID

func (wiu *WalletItemsUpdate) SetNillableWalletID(id *string) *WalletItemsUpdate

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*WalletItemsUpdate) SetWallet

func (wiu *WalletItemsUpdate) SetWallet(w *Wallet) *WalletItemsUpdate

SetWallet sets the "wallet" edge to the Wallet entity.

func (*WalletItemsUpdate) SetWalletID

func (wiu *WalletItemsUpdate) SetWalletID(id string) *WalletItemsUpdate

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

func (*WalletItemsUpdate) Where

Where appends a list predicates to the WalletItemsUpdate builder.

type WalletItemsUpdateOne

type WalletItemsUpdateOne struct {
	// contains filtered or unexported fields
}

WalletItemsUpdateOne is the builder for updating a single WalletItems entity.

func (*WalletItemsUpdateOne) AddBalance

AddBalance adds si to the "balance" field.

func (*WalletItemsUpdateOne) ClearItem

func (wiuo *WalletItemsUpdateOne) ClearItem() *WalletItemsUpdateOne

ClearItem clears the "item" edge to the Item entity.

func (*WalletItemsUpdateOne) ClearWallet

func (wiuo *WalletItemsUpdateOne) ClearWallet() *WalletItemsUpdateOne

ClearWallet clears the "wallet" edge to the Wallet entity.

func (*WalletItemsUpdateOne) Exec

func (wiuo *WalletItemsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WalletItemsUpdateOne) ExecX

func (wiuo *WalletItemsUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletItemsUpdateOne) Mutation

func (wiuo *WalletItemsUpdateOne) Mutation() *WalletItemsMutation

Mutation returns the WalletItemsMutation object of the builder.

func (*WalletItemsUpdateOne) Save

Save executes the query and returns the updated WalletItems entity.

func (*WalletItemsUpdateOne) SaveX

func (wiuo *WalletItemsUpdateOne) SaveX(ctx context.Context) *WalletItems

SaveX is like Save, but panics if an error occurs.

func (*WalletItemsUpdateOne) Select

func (wiuo *WalletItemsUpdateOne) Select(field string, fields ...string) *WalletItemsUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WalletItemsUpdateOne) SetBalance

SetBalance sets the "balance" field.

func (*WalletItemsUpdateOne) SetItem

func (wiuo *WalletItemsUpdateOne) SetItem(i *Item) *WalletItemsUpdateOne

SetItem sets the "item" edge to the Item entity.

func (*WalletItemsUpdateOne) SetItemID

func (wiuo *WalletItemsUpdateOne) SetItemID(id string) *WalletItemsUpdateOne

SetItemID sets the "item" edge to the Item entity by ID.

func (*WalletItemsUpdateOne) SetNillableBalance

func (wiuo *WalletItemsUpdateOne) SetNillableBalance(si *schema.BigInt) *WalletItemsUpdateOne

SetNillableBalance sets the "balance" field if the given value is not nil.

func (*WalletItemsUpdateOne) SetNillableItemID

func (wiuo *WalletItemsUpdateOne) SetNillableItemID(id *string) *WalletItemsUpdateOne

SetNillableItemID sets the "item" edge to the Item entity by ID if the given value is not nil.

func (*WalletItemsUpdateOne) SetNillableWalletID

func (wiuo *WalletItemsUpdateOne) SetNillableWalletID(id *string) *WalletItemsUpdateOne

SetNillableWalletID sets the "wallet" edge to the Wallet entity by ID if the given value is not nil.

func (*WalletItemsUpdateOne) SetWallet

func (wiuo *WalletItemsUpdateOne) SetWallet(w *Wallet) *WalletItemsUpdateOne

SetWallet sets the "wallet" edge to the Wallet entity.

func (*WalletItemsUpdateOne) SetWalletID

func (wiuo *WalletItemsUpdateOne) SetWalletID(id string) *WalletItemsUpdateOne

SetWalletID sets the "wallet" edge to the Wallet entity by ID.

type WalletItemsUpsert

type WalletItemsUpsert struct {
	*sql.UpdateSet
}

WalletItemsUpsert is the "OnConflict" setter.

func (*WalletItemsUpsert) AddBalance

AddBalance adds v to the "balance" field.

func (*WalletItemsUpsert) SetBalance

SetBalance sets the "balance" field.

func (*WalletItemsUpsert) UpdateBalance

func (u *WalletItemsUpsert) UpdateBalance() *WalletItemsUpsert

UpdateBalance sets the "balance" field to the value that was provided on create.

type WalletItemsUpsertBulk

type WalletItemsUpsertBulk struct {
	// contains filtered or unexported fields
}

WalletItemsUpsertBulk is the builder for "upsert"-ing a bulk of WalletItems nodes.

func (*WalletItemsUpsertBulk) AddBalance

AddBalance adds v to the "balance" field.

func (*WalletItemsUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WalletItemsUpsertBulk) Exec

Exec executes the query.

func (*WalletItemsUpsertBulk) ExecX

func (u *WalletItemsUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletItemsUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WalletItems.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WalletItemsUpsertBulk) SetBalance

SetBalance sets the "balance" field.

func (*WalletItemsUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the WalletItemsCreateBulk.OnConflict documentation for more info.

func (*WalletItemsUpsertBulk) UpdateBalance

func (u *WalletItemsUpsertBulk) UpdateBalance() *WalletItemsUpsertBulk

UpdateBalance sets the "balance" field to the value that was provided on create.

func (*WalletItemsUpsertBulk) UpdateNewValues

func (u *WalletItemsUpsertBulk) UpdateNewValues() *WalletItemsUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.WalletItems.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(walletitems.FieldID)
		}),
	).
	Exec(ctx)

type WalletItemsUpsertOne

type WalletItemsUpsertOne struct {
	// contains filtered or unexported fields
}

WalletItemsUpsertOne is the builder for "upsert"-ing

one WalletItems node.

func (*WalletItemsUpsertOne) AddBalance

AddBalance adds v to the "balance" field.

func (*WalletItemsUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WalletItemsUpsertOne) Exec

Exec executes the query.

func (*WalletItemsUpsertOne) ExecX

func (u *WalletItemsUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletItemsUpsertOne) ID

func (u *WalletItemsUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WalletItemsUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*WalletItemsUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WalletItems.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WalletItemsUpsertOne) SetBalance

SetBalance sets the "balance" field.

func (*WalletItemsUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the WalletItemsCreate.OnConflict documentation for more info.

func (*WalletItemsUpsertOne) UpdateBalance

func (u *WalletItemsUpsertOne) UpdateBalance() *WalletItemsUpsertOne

UpdateBalance sets the "balance" field to the value that was provided on create.

func (*WalletItemsUpsertOne) UpdateNewValues

func (u *WalletItemsUpsertOne) UpdateNewValues() *WalletItemsUpsertOne

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.WalletItems.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(walletitems.FieldID)
		}),
	).
	Exec(ctx)

type WalletItemsWhereInput

type WalletItemsWhereInput struct {
	Not *WalletItemsWhereInput   `json:"not,omitempty"`
	Or  []*WalletItemsWhereInput `json:"or,omitempty"`
	And []*WalletItemsWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "balance" field predicates.
	Balance      *schema.BigInt  `json:"balance,omitempty"`
	BalanceNEQ   *schema.BigInt  `json:"balanceNEQ,omitempty"`
	BalanceIn    []schema.BigInt `json:"balanceIn,omitempty"`
	BalanceNotIn []schema.BigInt `json:"balanceNotIn,omitempty"`
	BalanceGT    *schema.BigInt  `json:"balanceGT,omitempty"`
	BalanceGTE   *schema.BigInt  `json:"balanceGTE,omitempty"`
	BalanceLT    *schema.BigInt  `json:"balanceLT,omitempty"`
	BalanceLTE   *schema.BigInt  `json:"balanceLTE,omitempty"`

	// "wallet" edge predicates.
	HasWallet     *bool               `json:"hasWallet,omitempty"`
	HasWalletWith []*WalletWhereInput `json:"hasWalletWith,omitempty"`

	// "item" edge predicates.
	HasItem     *bool             `json:"hasItem,omitempty"`
	HasItemWith []*ItemWhereInput `json:"hasItemWith,omitempty"`
}

WalletItemsWhereInput represents a where input for filtering WalletItems queries.

func (*WalletItemsWhereInput) Filter

Filter applies the WalletItemsWhereInput filter on the WalletItemsQuery builder.

func (*WalletItemsWhereInput) P

P returns a predicate for filtering walletitemsslice. An error is returned if the input is empty or invalid.

type WalletMutation

type WalletMutation struct {
	// contains filtered or unexported fields
}

WalletMutation represents an operation that mutates the Wallet nodes in the graph.

func (*WalletMutation) AddDopeIDs

func (m *WalletMutation) AddDopeIDs(ids ...string)

AddDopeIDs adds the "dopes" edge to the Dope entity by ids.

func (*WalletMutation) AddField

func (m *WalletMutation) 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 (*WalletMutation) AddHustlerIDs

func (m *WalletMutation) AddHustlerIDs(ids ...string)

AddHustlerIDs adds the "hustlers" edge to the Hustler entity by ids.

func (*WalletMutation) AddItemIDs

func (m *WalletMutation) AddItemIDs(ids ...string)

AddItemIDs adds the "items" edge to the WalletItems entity by ids.

func (*WalletMutation) AddPaper

func (m *WalletMutation) AddPaper(si schema.BigInt)

AddPaper adds si to the "paper" field.

func (*WalletMutation) AddedEdges

func (m *WalletMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WalletMutation) AddedField

func (m *WalletMutation) 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 (*WalletMutation) AddedFields

func (m *WalletMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WalletMutation) AddedIDs

func (m *WalletMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WalletMutation) AddedPaper

func (m *WalletMutation) AddedPaper() (r schema.BigInt, exists bool)

AddedPaper returns the value that was added to the "paper" field in this mutation.

func (*WalletMutation) ClearDopes

func (m *WalletMutation) ClearDopes()

ClearDopes clears the "dopes" edge to the Dope entity.

func (*WalletMutation) ClearEdge

func (m *WalletMutation) 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 (*WalletMutation) ClearField

func (m *WalletMutation) 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 (*WalletMutation) ClearHustlers

func (m *WalletMutation) ClearHustlers()

ClearHustlers clears the "hustlers" edge to the Hustler entity.

func (*WalletMutation) ClearItems

func (m *WalletMutation) ClearItems()

ClearItems clears the "items" edge to the WalletItems entity.

func (*WalletMutation) ClearedEdges

func (m *WalletMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WalletMutation) ClearedFields

func (m *WalletMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WalletMutation) Client

func (m WalletMutation) 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 (*WalletMutation) CreatedAt

func (m *WalletMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*WalletMutation) DopesCleared

func (m *WalletMutation) DopesCleared() bool

DopesCleared reports if the "dopes" edge to the Dope entity was cleared.

func (*WalletMutation) DopesIDs

func (m *WalletMutation) DopesIDs() (ids []string)

DopesIDs returns the "dopes" edge IDs in the mutation.

func (*WalletMutation) EdgeCleared

func (m *WalletMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WalletMutation) Field

func (m *WalletMutation) 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 (*WalletMutation) FieldCleared

func (m *WalletMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WalletMutation) Fields

func (m *WalletMutation) 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 (*WalletMutation) HustlersCleared

func (m *WalletMutation) HustlersCleared() bool

HustlersCleared reports if the "hustlers" edge to the Hustler entity was cleared.

func (*WalletMutation) HustlersIDs

func (m *WalletMutation) HustlersIDs() (ids []string)

HustlersIDs returns the "hustlers" edge IDs in the mutation.

func (*WalletMutation) ID

func (m *WalletMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WalletMutation) IDs

func (m *WalletMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*WalletMutation) ItemsCleared

func (m *WalletMutation) ItemsCleared() bool

ItemsCleared reports if the "items" edge to the WalletItems entity was cleared.

func (*WalletMutation) ItemsIDs

func (m *WalletMutation) ItemsIDs() (ids []string)

ItemsIDs returns the "items" edge IDs in the mutation.

func (*WalletMutation) OldCreatedAt

func (m *WalletMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Wallet entity. If the Wallet 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 (*WalletMutation) OldField

func (m *WalletMutation) 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 (*WalletMutation) OldPaper

func (m *WalletMutation) OldPaper(ctx context.Context) (v schema.BigInt, err error)

OldPaper returns the old "paper" field's value of the Wallet entity. If the Wallet 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 (*WalletMutation) Op

func (m *WalletMutation) Op() Op

Op returns the operation name.

func (*WalletMutation) Paper

func (m *WalletMutation) Paper() (r schema.BigInt, exists bool)

Paper returns the value of the "paper" field in the mutation.

func (*WalletMutation) RemoveDopeIDs

func (m *WalletMutation) RemoveDopeIDs(ids ...string)

RemoveDopeIDs removes the "dopes" edge to the Dope entity by IDs.

func (*WalletMutation) RemoveHustlerIDs

func (m *WalletMutation) RemoveHustlerIDs(ids ...string)

RemoveHustlerIDs removes the "hustlers" edge to the Hustler entity by IDs.

func (*WalletMutation) RemoveItemIDs

func (m *WalletMutation) RemoveItemIDs(ids ...string)

RemoveItemIDs removes the "items" edge to the WalletItems entity by IDs.

func (*WalletMutation) RemovedDopesIDs

func (m *WalletMutation) RemovedDopesIDs() (ids []string)

RemovedDopes returns the removed IDs of the "dopes" edge to the Dope entity.

func (*WalletMutation) RemovedEdges

func (m *WalletMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WalletMutation) RemovedHustlersIDs

func (m *WalletMutation) RemovedHustlersIDs() (ids []string)

RemovedHustlers returns the removed IDs of the "hustlers" edge to the Hustler entity.

func (*WalletMutation) RemovedIDs

func (m *WalletMutation) 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 (*WalletMutation) RemovedItemsIDs

func (m *WalletMutation) RemovedItemsIDs() (ids []string)

RemovedItems returns the removed IDs of the "items" edge to the WalletItems entity.

func (*WalletMutation) ResetCreatedAt

func (m *WalletMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*WalletMutation) ResetDopes

func (m *WalletMutation) ResetDopes()

ResetDopes resets all changes to the "dopes" edge.

func (*WalletMutation) ResetEdge

func (m *WalletMutation) 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 (*WalletMutation) ResetField

func (m *WalletMutation) 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 (*WalletMutation) ResetHustlers

func (m *WalletMutation) ResetHustlers()

ResetHustlers resets all changes to the "hustlers" edge.

func (*WalletMutation) ResetItems

func (m *WalletMutation) ResetItems()

ResetItems resets all changes to the "items" edge.

func (*WalletMutation) ResetPaper

func (m *WalletMutation) ResetPaper()

ResetPaper resets all changes to the "paper" field.

func (*WalletMutation) SetCreatedAt

func (m *WalletMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*WalletMutation) SetField

func (m *WalletMutation) 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 (*WalletMutation) SetID

func (m *WalletMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Wallet entities.

func (*WalletMutation) SetPaper

func (m *WalletMutation) SetPaper(si schema.BigInt)

SetPaper sets the "paper" field.

func (WalletMutation) Tx

func (m WalletMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WalletMutation) Type

func (m *WalletMutation) Type() string

Type returns the node type of this mutation (Wallet).

func (*WalletMutation) Where

func (m *WalletMutation) Where(ps ...predicate.Wallet)

Where appends a list predicates to the WalletMutation builder.

type WalletOrder

type WalletOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *WalletOrderField `json:"field"`
}

WalletOrder defines the ordering of Wallet.

type WalletOrderField

type WalletOrderField struct {
	// contains filtered or unexported fields
}

WalletOrderField defines the ordering field of Wallet.

func (WalletOrderField) MarshalGQL

func (f WalletOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (WalletOrderField) String

func (f WalletOrderField) String() string

String implement fmt.Stringer interface.

func (*WalletOrderField) UnmarshalGQL

func (f *WalletOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type WalletPaginateOption

type WalletPaginateOption func(*walletPager) error

WalletPaginateOption enables pagination customization.

func WithWalletFilter

func WithWalletFilter(filter func(*WalletQuery) (*WalletQuery, error)) WalletPaginateOption

WithWalletFilter configures pagination filter.

func WithWalletOrder

func WithWalletOrder(order *WalletOrder) WalletPaginateOption

WithWalletOrder configures pagination ordering.

type WalletQuery

type WalletQuery struct {
	// contains filtered or unexported fields
}

WalletQuery is the builder for querying Wallet entities.

func (*WalletQuery) All

func (wq *WalletQuery) All(ctx context.Context) ([]*Wallet, error)

All executes the query and returns a list of Wallets.

func (*WalletQuery) AllX

func (wq *WalletQuery) AllX(ctx context.Context) []*Wallet

AllX is like All, but panics if an error occurs.

func (*WalletQuery) Clone

func (wq *WalletQuery) Clone() *WalletQuery

Clone returns a duplicate of the WalletQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WalletQuery) CollectFields

func (w *WalletQuery) CollectFields(ctx context.Context, satisfies ...string) *WalletQuery

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*WalletQuery) Count

func (wq *WalletQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WalletQuery) CountX

func (wq *WalletQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WalletQuery) Exist

func (wq *WalletQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WalletQuery) ExistX

func (wq *WalletQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WalletQuery) First

func (wq *WalletQuery) First(ctx context.Context) (*Wallet, error)

First returns the first Wallet entity from the query. Returns a *NotFoundError when no Wallet was found.

func (*WalletQuery) FirstID

func (wq *WalletQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Wallet ID from the query. Returns a *NotFoundError when no Wallet ID was found.

func (*WalletQuery) FirstIDX

func (wq *WalletQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*WalletQuery) FirstX

func (wq *WalletQuery) FirstX(ctx context.Context) *Wallet

FirstX is like First, but panics if an error occurs.

func (*WalletQuery) GroupBy

func (wq *WalletQuery) GroupBy(field string, fields ...string) *WalletGroupBy

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 {
	Paper schema.BigInt `json:"paper,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Wallet.Query().
	GroupBy(wallet.FieldPaper).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WalletQuery) IDs

func (wq *WalletQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Wallet IDs.

func (*WalletQuery) IDsX

func (wq *WalletQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*WalletQuery) Limit

func (wq *WalletQuery) Limit(limit int) *WalletQuery

Limit adds a limit step to the query.

func (*WalletQuery) Offset

func (wq *WalletQuery) Offset(offset int) *WalletQuery

Offset adds an offset step to the query.

func (*WalletQuery) Only

func (wq *WalletQuery) Only(ctx context.Context) (*Wallet, error)

Only returns a single Wallet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Wallet entity is found. Returns a *NotFoundError when no Wallet entities are found.

func (*WalletQuery) OnlyID

func (wq *WalletQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Wallet ID in the query. Returns a *NotSingularError when more than one Wallet ID is found. Returns a *NotFoundError when no entities are found.

func (*WalletQuery) OnlyIDX

func (wq *WalletQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WalletQuery) OnlyX

func (wq *WalletQuery) OnlyX(ctx context.Context) *Wallet

OnlyX is like Only, but panics if an error occurs.

func (*WalletQuery) Order

func (wq *WalletQuery) Order(o ...OrderFunc) *WalletQuery

Order adds an order step to the query.

func (*WalletQuery) Paginate

func (w *WalletQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...WalletPaginateOption,
) (*WalletConnection, error)

Paginate executes the query and returns a relay based cursor connection to Wallet.

func (*WalletQuery) QueryDopes

func (wq *WalletQuery) QueryDopes() *DopeQuery

QueryDopes chains the current query on the "dopes" edge.

func (*WalletQuery) QueryHustlers

func (wq *WalletQuery) QueryHustlers() *HustlerQuery

QueryHustlers chains the current query on the "hustlers" edge.

func (*WalletQuery) QueryItems

func (wq *WalletQuery) QueryItems() *WalletItemsQuery

QueryItems chains the current query on the "items" edge.

func (*WalletQuery) Select

func (wq *WalletQuery) Select(fields ...string) *WalletSelect

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 {
	Paper schema.BigInt `json:"paper,omitempty"`
}

client.Wallet.Query().
	Select(wallet.FieldPaper).
	Scan(ctx, &v)

func (*WalletQuery) Unique

func (wq *WalletQuery) Unique(unique bool) *WalletQuery

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 (*WalletQuery) Where

func (wq *WalletQuery) Where(ps ...predicate.Wallet) *WalletQuery

Where adds a new predicate for the WalletQuery builder.

func (*WalletQuery) WithDopes

func (wq *WalletQuery) WithDopes(opts ...func(*DopeQuery)) *WalletQuery

WithDopes tells the query-builder to eager-load the nodes that are connected to the "dopes" edge. The optional arguments are used to configure the query builder of the edge.

func (*WalletQuery) WithHustlers

func (wq *WalletQuery) WithHustlers(opts ...func(*HustlerQuery)) *WalletQuery

WithHustlers tells the query-builder to eager-load the nodes that are connected to the "hustlers" edge. The optional arguments are used to configure the query builder of the edge.

func (*WalletQuery) WithItems

func (wq *WalletQuery) WithItems(opts ...func(*WalletItemsQuery)) *WalletQuery

WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.

type WalletSelect

type WalletSelect struct {
	*WalletQuery
	// contains filtered or unexported fields
}

WalletSelect is the builder for selecting fields of Wallet entities.

func (*WalletSelect) Bool

func (ws *WalletSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WalletSelect) BoolX

func (ws *WalletSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WalletSelect) Bools

func (ws *WalletSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WalletSelect) BoolsX

func (ws *WalletSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WalletSelect) Float64

func (ws *WalletSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WalletSelect) Float64X

func (ws *WalletSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WalletSelect) Float64s

func (ws *WalletSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WalletSelect) Float64sX

func (ws *WalletSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WalletSelect) Int

func (ws *WalletSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WalletSelect) IntX

func (ws *WalletSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WalletSelect) Ints

func (ws *WalletSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WalletSelect) IntsX

func (ws *WalletSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WalletSelect) Scan

func (ws *WalletSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*WalletSelect) ScanX

func (ws *WalletSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*WalletSelect) String

func (ws *WalletSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WalletSelect) StringX

func (ws *WalletSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WalletSelect) Strings

func (ws *WalletSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WalletSelect) StringsX

func (ws *WalletSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WalletUpdate

type WalletUpdate struct {
	// contains filtered or unexported fields
}

WalletUpdate is the builder for updating Wallet entities.

func (*WalletUpdate) AddDopeIDs

func (wu *WalletUpdate) AddDopeIDs(ids ...string) *WalletUpdate

AddDopeIDs adds the "dopes" edge to the Dope entity by IDs.

func (*WalletUpdate) AddDopes

func (wu *WalletUpdate) AddDopes(d ...*Dope) *WalletUpdate

AddDopes adds the "dopes" edges to the Dope entity.

func (*WalletUpdate) AddHustlerIDs

func (wu *WalletUpdate) AddHustlerIDs(ids ...string) *WalletUpdate

AddHustlerIDs adds the "hustlers" edge to the Hustler entity by IDs.

func (*WalletUpdate) AddHustlers

func (wu *WalletUpdate) AddHustlers(h ...*Hustler) *WalletUpdate

AddHustlers adds the "hustlers" edges to the Hustler entity.

func (*WalletUpdate) AddItemIDs

func (wu *WalletUpdate) AddItemIDs(ids ...string) *WalletUpdate

AddItemIDs adds the "items" edge to the WalletItems entity by IDs.

func (*WalletUpdate) AddItems

func (wu *WalletUpdate) AddItems(w ...*WalletItems) *WalletUpdate

AddItems adds the "items" edges to the WalletItems entity.

func (*WalletUpdate) AddPaper

func (wu *WalletUpdate) AddPaper(si schema.BigInt) *WalletUpdate

AddPaper adds si to the "paper" field.

func (*WalletUpdate) ClearDopes

func (wu *WalletUpdate) ClearDopes() *WalletUpdate

ClearDopes clears all "dopes" edges to the Dope entity.

func (*WalletUpdate) ClearHustlers

func (wu *WalletUpdate) ClearHustlers() *WalletUpdate

ClearHustlers clears all "hustlers" edges to the Hustler entity.

func (*WalletUpdate) ClearItems

func (wu *WalletUpdate) ClearItems() *WalletUpdate

ClearItems clears all "items" edges to the WalletItems entity.

func (*WalletUpdate) Exec

func (wu *WalletUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WalletUpdate) ExecX

func (wu *WalletUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletUpdate) Mutation

func (wu *WalletUpdate) Mutation() *WalletMutation

Mutation returns the WalletMutation object of the builder.

func (*WalletUpdate) RemoveDopeIDs

func (wu *WalletUpdate) RemoveDopeIDs(ids ...string) *WalletUpdate

RemoveDopeIDs removes the "dopes" edge to Dope entities by IDs.

func (*WalletUpdate) RemoveDopes

func (wu *WalletUpdate) RemoveDopes(d ...*Dope) *WalletUpdate

RemoveDopes removes "dopes" edges to Dope entities.

func (*WalletUpdate) RemoveHustlerIDs

func (wu *WalletUpdate) RemoveHustlerIDs(ids ...string) *WalletUpdate

RemoveHustlerIDs removes the "hustlers" edge to Hustler entities by IDs.

func (*WalletUpdate) RemoveHustlers

func (wu *WalletUpdate) RemoveHustlers(h ...*Hustler) *WalletUpdate

RemoveHustlers removes "hustlers" edges to Hustler entities.

func (*WalletUpdate) RemoveItemIDs

func (wu *WalletUpdate) RemoveItemIDs(ids ...string) *WalletUpdate

RemoveItemIDs removes the "items" edge to WalletItems entities by IDs.

func (*WalletUpdate) RemoveItems

func (wu *WalletUpdate) RemoveItems(w ...*WalletItems) *WalletUpdate

RemoveItems removes "items" edges to WalletItems entities.

func (*WalletUpdate) Save

func (wu *WalletUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WalletUpdate) SaveX

func (wu *WalletUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WalletUpdate) SetNillablePaper

func (wu *WalletUpdate) SetNillablePaper(si *schema.BigInt) *WalletUpdate

SetNillablePaper sets the "paper" field if the given value is not nil.

func (*WalletUpdate) SetPaper

func (wu *WalletUpdate) SetPaper(si schema.BigInt) *WalletUpdate

SetPaper sets the "paper" field.

func (*WalletUpdate) Where

func (wu *WalletUpdate) Where(ps ...predicate.Wallet) *WalletUpdate

Where appends a list predicates to the WalletUpdate builder.

type WalletUpdateOne

type WalletUpdateOne struct {
	// contains filtered or unexported fields
}

WalletUpdateOne is the builder for updating a single Wallet entity.

func (*WalletUpdateOne) AddDopeIDs

func (wuo *WalletUpdateOne) AddDopeIDs(ids ...string) *WalletUpdateOne

AddDopeIDs adds the "dopes" edge to the Dope entity by IDs.

func (*WalletUpdateOne) AddDopes

func (wuo *WalletUpdateOne) AddDopes(d ...*Dope) *WalletUpdateOne

AddDopes adds the "dopes" edges to the Dope entity.

func (*WalletUpdateOne) AddHustlerIDs

func (wuo *WalletUpdateOne) AddHustlerIDs(ids ...string) *WalletUpdateOne

AddHustlerIDs adds the "hustlers" edge to the Hustler entity by IDs.

func (*WalletUpdateOne) AddHustlers

func (wuo *WalletUpdateOne) AddHustlers(h ...*Hustler) *WalletUpdateOne

AddHustlers adds the "hustlers" edges to the Hustler entity.

func (*WalletUpdateOne) AddItemIDs

func (wuo *WalletUpdateOne) AddItemIDs(ids ...string) *WalletUpdateOne

AddItemIDs adds the "items" edge to the WalletItems entity by IDs.

func (*WalletUpdateOne) AddItems

func (wuo *WalletUpdateOne) AddItems(w ...*WalletItems) *WalletUpdateOne

AddItems adds the "items" edges to the WalletItems entity.

func (*WalletUpdateOne) AddPaper

func (wuo *WalletUpdateOne) AddPaper(si schema.BigInt) *WalletUpdateOne

AddPaper adds si to the "paper" field.

func (*WalletUpdateOne) ClearDopes

func (wuo *WalletUpdateOne) ClearDopes() *WalletUpdateOne

ClearDopes clears all "dopes" edges to the Dope entity.

func (*WalletUpdateOne) ClearHustlers

func (wuo *WalletUpdateOne) ClearHustlers() *WalletUpdateOne

ClearHustlers clears all "hustlers" edges to the Hustler entity.

func (*WalletUpdateOne) ClearItems

func (wuo *WalletUpdateOne) ClearItems() *WalletUpdateOne

ClearItems clears all "items" edges to the WalletItems entity.

func (*WalletUpdateOne) Exec

func (wuo *WalletUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WalletUpdateOne) ExecX

func (wuo *WalletUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletUpdateOne) Mutation

func (wuo *WalletUpdateOne) Mutation() *WalletMutation

Mutation returns the WalletMutation object of the builder.

func (*WalletUpdateOne) RemoveDopeIDs

func (wuo *WalletUpdateOne) RemoveDopeIDs(ids ...string) *WalletUpdateOne

RemoveDopeIDs removes the "dopes" edge to Dope entities by IDs.

func (*WalletUpdateOne) RemoveDopes

func (wuo *WalletUpdateOne) RemoveDopes(d ...*Dope) *WalletUpdateOne

RemoveDopes removes "dopes" edges to Dope entities.

func (*WalletUpdateOne) RemoveHustlerIDs

func (wuo *WalletUpdateOne) RemoveHustlerIDs(ids ...string) *WalletUpdateOne

RemoveHustlerIDs removes the "hustlers" edge to Hustler entities by IDs.

func (*WalletUpdateOne) RemoveHustlers

func (wuo *WalletUpdateOne) RemoveHustlers(h ...*Hustler) *WalletUpdateOne

RemoveHustlers removes "hustlers" edges to Hustler entities.

func (*WalletUpdateOne) RemoveItemIDs

func (wuo *WalletUpdateOne) RemoveItemIDs(ids ...string) *WalletUpdateOne

RemoveItemIDs removes the "items" edge to WalletItems entities by IDs.

func (*WalletUpdateOne) RemoveItems

func (wuo *WalletUpdateOne) RemoveItems(w ...*WalletItems) *WalletUpdateOne

RemoveItems removes "items" edges to WalletItems entities.

func (*WalletUpdateOne) Save

func (wuo *WalletUpdateOne) Save(ctx context.Context) (*Wallet, error)

Save executes the query and returns the updated Wallet entity.

func (*WalletUpdateOne) SaveX

func (wuo *WalletUpdateOne) SaveX(ctx context.Context) *Wallet

SaveX is like Save, but panics if an error occurs.

func (*WalletUpdateOne) Select

func (wuo *WalletUpdateOne) Select(field string, fields ...string) *WalletUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WalletUpdateOne) SetNillablePaper

func (wuo *WalletUpdateOne) SetNillablePaper(si *schema.BigInt) *WalletUpdateOne

SetNillablePaper sets the "paper" field if the given value is not nil.

func (*WalletUpdateOne) SetPaper

func (wuo *WalletUpdateOne) SetPaper(si schema.BigInt) *WalletUpdateOne

SetPaper sets the "paper" field.

type WalletUpsert

type WalletUpsert struct {
	*sql.UpdateSet
}

WalletUpsert is the "OnConflict" setter.

func (*WalletUpsert) AddPaper

func (u *WalletUpsert) AddPaper(v schema.BigInt) *WalletUpsert

AddPaper adds v to the "paper" field.

func (*WalletUpsert) SetCreatedAt

func (u *WalletUpsert) SetCreatedAt(v time.Time) *WalletUpsert

SetCreatedAt sets the "created_at" field.

func (*WalletUpsert) SetPaper

func (u *WalletUpsert) SetPaper(v schema.BigInt) *WalletUpsert

SetPaper sets the "paper" field.

func (*WalletUpsert) UpdateCreatedAt

func (u *WalletUpsert) UpdateCreatedAt() *WalletUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*WalletUpsert) UpdatePaper

func (u *WalletUpsert) UpdatePaper() *WalletUpsert

UpdatePaper sets the "paper" field to the value that was provided on create.

type WalletUpsertBulk

type WalletUpsertBulk struct {
	// contains filtered or unexported fields
}

WalletUpsertBulk is the builder for "upsert"-ing a bulk of Wallet nodes.

func (*WalletUpsertBulk) AddPaper

AddPaper adds v to the "paper" field.

func (*WalletUpsertBulk) DoNothing

func (u *WalletUpsertBulk) DoNothing() *WalletUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WalletUpsertBulk) Exec

func (u *WalletUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WalletUpsertBulk) ExecX

func (u *WalletUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletUpsertBulk) Ignore

func (u *WalletUpsertBulk) Ignore() *WalletUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Wallet.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WalletUpsertBulk) SetCreatedAt

func (u *WalletUpsertBulk) SetCreatedAt(v time.Time) *WalletUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*WalletUpsertBulk) SetPaper

SetPaper sets the "paper" field.

func (*WalletUpsertBulk) Update

func (u *WalletUpsertBulk) Update(set func(*WalletUpsert)) *WalletUpsertBulk

Update allows overriding fields `UPDATE` values. See the WalletCreateBulk.OnConflict documentation for more info.

func (*WalletUpsertBulk) UpdateCreatedAt

func (u *WalletUpsertBulk) UpdateCreatedAt() *WalletUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*WalletUpsertBulk) UpdateNewValues

func (u *WalletUpsertBulk) UpdateNewValues() *WalletUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Wallet.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(wallet.FieldID)
		}),
	).
	Exec(ctx)

func (*WalletUpsertBulk) UpdatePaper

func (u *WalletUpsertBulk) UpdatePaper() *WalletUpsertBulk

UpdatePaper sets the "paper" field to the value that was provided on create.

type WalletUpsertOne

type WalletUpsertOne struct {
	// contains filtered or unexported fields
}

WalletUpsertOne is the builder for "upsert"-ing

one Wallet node.

func (*WalletUpsertOne) AddPaper

func (u *WalletUpsertOne) AddPaper(v schema.BigInt) *WalletUpsertOne

AddPaper adds v to the "paper" field.

func (*WalletUpsertOne) DoNothing

func (u *WalletUpsertOne) DoNothing() *WalletUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WalletUpsertOne) Exec

func (u *WalletUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*WalletUpsertOne) ExecX

func (u *WalletUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WalletUpsertOne) ID

func (u *WalletUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WalletUpsertOne) IDX

func (u *WalletUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*WalletUpsertOne) Ignore

func (u *WalletUpsertOne) Ignore() *WalletUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Wallet.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WalletUpsertOne) SetCreatedAt

func (u *WalletUpsertOne) SetCreatedAt(v time.Time) *WalletUpsertOne

SetCreatedAt sets the "created_at" field.

func (*WalletUpsertOne) SetPaper

func (u *WalletUpsertOne) SetPaper(v schema.BigInt) *WalletUpsertOne

SetPaper sets the "paper" field.

func (*WalletUpsertOne) Update

func (u *WalletUpsertOne) Update(set func(*WalletUpsert)) *WalletUpsertOne

Update allows overriding fields `UPDATE` values. See the WalletCreate.OnConflict documentation for more info.

func (*WalletUpsertOne) UpdateCreatedAt

func (u *WalletUpsertOne) UpdateCreatedAt() *WalletUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*WalletUpsertOne) UpdateNewValues

func (u *WalletUpsertOne) UpdateNewValues() *WalletUpsertOne

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.Wallet.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(wallet.FieldID)
		}),
	).
	Exec(ctx)

func (*WalletUpsertOne) UpdatePaper

func (u *WalletUpsertOne) UpdatePaper() *WalletUpsertOne

UpdatePaper sets the "paper" field to the value that was provided on create.

type WalletWhereInput

type WalletWhereInput struct {
	Not *WalletWhereInput   `json:"not,omitempty"`
	Or  []*WalletWhereInput `json:"or,omitempty"`
	And []*WalletWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *string  `json:"id,omitempty"`
	IDNEQ   *string  `json:"idNEQ,omitempty"`
	IDIn    []string `json:"idIn,omitempty"`
	IDNotIn []string `json:"idNotIn,omitempty"`
	IDGT    *string  `json:"idGT,omitempty"`
	IDGTE   *string  `json:"idGTE,omitempty"`
	IDLT    *string  `json:"idLT,omitempty"`
	IDLTE   *string  `json:"idLTE,omitempty"`

	// "paper" field predicates.
	Paper      *schema.BigInt  `json:"paper,omitempty"`
	PaperNEQ   *schema.BigInt  `json:"paperNEQ,omitempty"`
	PaperIn    []schema.BigInt `json:"paperIn,omitempty"`
	PaperNotIn []schema.BigInt `json:"paperNotIn,omitempty"`
	PaperGT    *schema.BigInt  `json:"paperGT,omitempty"`
	PaperGTE   *schema.BigInt  `json:"paperGTE,omitempty"`
	PaperLT    *schema.BigInt  `json:"paperLT,omitempty"`
	PaperLTE   *schema.BigInt  `json:"paperLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "dopes" edge predicates.
	HasDopes     *bool             `json:"hasDopes,omitempty"`
	HasDopesWith []*DopeWhereInput `json:"hasDopesWith,omitempty"`

	// "items" edge predicates.
	HasItems     *bool                    `json:"hasItems,omitempty"`
	HasItemsWith []*WalletItemsWhereInput `json:"hasItemsWith,omitempty"`

	// "hustlers" edge predicates.
	HasHustlers     *bool                `json:"hasHustlers,omitempty"`
	HasHustlersWith []*HustlerWhereInput `json:"hasHustlersWith,omitempty"`
}

WalletWhereInput represents a where input for filtering Wallet queries.

func (*WalletWhereInput) Filter

func (i *WalletWhereInput) Filter(q *WalletQuery) (*WalletQuery, error)

Filter applies the WalletWhereInput filter on the WalletQuery builder.

func (*WalletWhereInput) P

P returns a predicate for filtering wallets. An error is returned if the input is empty or invalid.

type Wallets

type Wallets []*Wallet

Wallets is a parsable slice of Wallet.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL