entities

package
v0.0.0-...-fe50809 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 43 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.
	TypeCurrency    = "Currency"
	TypeMarket      = "Market"
	TypeOutbox      = "Outbox"
	TypeTicker      = "Ticker"
	TypeTradingPair = "TradingPair"
	TypeVenue       = "Venue"
)

Variables

View Source
var (
	// CurrencyOrderFieldSymbol orders Currency by symbol.
	CurrencyOrderFieldSymbol = &CurrencyOrderField{
		field: currency.FieldSymbol,
		toCursor: func(c *Currency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.Symbol,
			}
		},
	}
	// CurrencyOrderFieldName orders Currency by name.
	CurrencyOrderFieldName = &CurrencyOrderField{
		field: currency.FieldName,
		toCursor: func(c *Currency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.Name,
			}
		},
	}
	// CurrencyOrderFieldType orders Currency by type.
	CurrencyOrderFieldType = &CurrencyOrderField{
		field: currency.FieldType,
		toCursor: func(c *Currency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.Type,
			}
		},
	}
)
View Source
var (
	// MarketOrderFieldName orders Market by name.
	MarketOrderFieldName = &MarketOrderField{
		field: market.FieldName,
		toCursor: func(m *Market) Cursor {
			return Cursor{
				ID:    m.ID,
				Value: m.Name,
			}
		},
	}
	// MarketOrderFieldType orders Market by type.
	MarketOrderFieldType = &MarketOrderField{
		field: market.FieldType,
		toCursor: func(m *Market) Cursor {
			return Cursor{
				ID:    m.ID,
				Value: m.Type,
			}
		},
	}
)
View Source
var (
	// TickerOrderFieldBase orders Ticker by base.
	TickerOrderFieldBase = &TickerOrderField{
		field: ticker.FieldBase,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Base,
			}
		},
	}
	// TickerOrderFieldBaseCoinID orders Ticker by base_coin_id.
	TickerOrderFieldBaseCoinID = &TickerOrderField{
		field: ticker.FieldBaseCoinID,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.BaseCoinID,
			}
		},
	}
	// TickerOrderFieldCounter orders Ticker by counter.
	TickerOrderFieldCounter = &TickerOrderField{
		field: ticker.FieldCounter,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Counter,
			}
		},
	}
	// TickerOrderFieldCounterCoinID orders Ticker by counter_coin_id.
	TickerOrderFieldCounterCoinID = &TickerOrderField{
		field: ticker.FieldCounterCoinID,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.CounterCoinID,
			}
		},
	}
	// TickerOrderFieldLast orders Ticker by last.
	TickerOrderFieldLast = &TickerOrderField{
		field: ticker.FieldLast,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Last,
			}
		},
	}
	// TickerOrderFieldVolume orders Ticker by volume.
	TickerOrderFieldVolume = &TickerOrderField{
		field: ticker.FieldVolume,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Volume,
			}
		},
	}
	// TickerOrderFieldTrustScore orders Ticker by trust_score.
	TickerOrderFieldTrustScore = &TickerOrderField{
		field: ticker.FieldTrustScore,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.TrustScore,
			}
		},
	}
	// TickerOrderFieldBidAskSpreadPercentage orders Ticker by bid_ask_spread_percentage.
	TickerOrderFieldBidAskSpreadPercentage = &TickerOrderField{
		field: ticker.FieldBidAskSpreadPercentage,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.BidAskSpreadPercentage,
			}
		},
	}
	// TickerOrderFieldTimestamp orders Ticker by timestamp.
	TickerOrderFieldTimestamp = &TickerOrderField{
		field: ticker.FieldTimestamp,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Timestamp,
			}
		},
	}
	// TickerOrderFieldLastTradedAt orders Ticker by last_traded_at.
	TickerOrderFieldLastTradedAt = &TickerOrderField{
		field: ticker.FieldLastTradedAt,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.LastTradedAt,
			}
		},
	}
	// TickerOrderFieldLastFetchAt orders Ticker by last_fetch_at.
	TickerOrderFieldLastFetchAt = &TickerOrderField{
		field: ticker.FieldLastFetchAt,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.LastFetchAt,
			}
		},
	}
	// TickerOrderFieldIsAnomaly orders Ticker by is_anomaly.
	TickerOrderFieldIsAnomaly = &TickerOrderField{
		field: ticker.FieldIsAnomaly,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.IsAnomaly,
			}
		},
	}
	// TickerOrderFieldIsStale orders Ticker by is_stale.
	TickerOrderFieldIsStale = &TickerOrderField{
		field: ticker.FieldIsStale,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.IsStale,
			}
		},
	}
	// TickerOrderFieldTradeURL orders Ticker by trade_url.
	TickerOrderFieldTradeURL = &TickerOrderField{
		field: ticker.FieldTradeURL,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.TradeURL,
			}
		},
	}
	// TickerOrderFieldTokenInfoURL orders Ticker by token_info_url.
	TickerOrderFieldTokenInfoURL = &TickerOrderField{
		field: ticker.FieldTokenInfoURL,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.TokenInfoURL,
			}
		},
	}
)
View Source
var (
	// TradingPairOrderFieldSymbol orders TradingPair by symbol.
	TradingPairOrderFieldSymbol = &TradingPairOrderField{
		field: tradingpair.FieldSymbol,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.Symbol,
			}
		},
	}
	// TradingPairOrderFieldBasePriceMinPrecision orders TradingPair by base_price_min_precision.
	TradingPairOrderFieldBasePriceMinPrecision = &TradingPairOrderField{
		field: tradingpair.FieldBasePriceMinPrecision,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.BasePriceMinPrecision,
			}
		},
	}
	// TradingPairOrderFieldBasePriceMaxPrecision orders TradingPair by base_price_max_precision.
	TradingPairOrderFieldBasePriceMaxPrecision = &TradingPairOrderField{
		field: tradingpair.FieldBasePriceMaxPrecision,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.BasePriceMaxPrecision,
			}
		},
	}
	// TradingPairOrderFieldBaseQuantityMinPrecision orders TradingPair by base_quantity_min_precision.
	TradingPairOrderFieldBaseQuantityMinPrecision = &TradingPairOrderField{
		field: tradingpair.FieldBaseQuantityMinPrecision,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.BaseQuantityMinPrecision,
			}
		},
	}
	// TradingPairOrderFieldBaseQuantityMaxPrecision orders TradingPair by base_quantity_max_precision.
	TradingPairOrderFieldBaseQuantityMaxPrecision = &TradingPairOrderField{
		field: tradingpair.FieldBaseQuantityMaxPrecision,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.BaseQuantityMaxPrecision,
			}
		},
	}
	// TradingPairOrderFieldCounterPriceMinPrecision orders TradingPair by counter_price_min_precision.
	TradingPairOrderFieldCounterPriceMinPrecision = &TradingPairOrderField{
		field: tradingpair.FieldCounterPriceMinPrecision,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.CounterPriceMinPrecision,
			}
		},
	}
	// TradingPairOrderFieldCounterPriceMaxPrecision orders TradingPair by counter_price_max_precision.
	TradingPairOrderFieldCounterPriceMaxPrecision = &TradingPairOrderField{
		field: tradingpair.FieldCounterPriceMaxPrecision,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.CounterPriceMaxPrecision,
			}
		},
	}
	// TradingPairOrderFieldCounterQuantityMinPrecision orders TradingPair by counter_quantity_min_precision.
	TradingPairOrderFieldCounterQuantityMinPrecision = &TradingPairOrderField{
		field: tradingpair.FieldCounterQuantityMinPrecision,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.CounterQuantityMinPrecision,
			}
		},
	}
	// TradingPairOrderFieldCounterQuantityMaxPrecision orders TradingPair by counter_quantity_max_precision.
	TradingPairOrderFieldCounterQuantityMaxPrecision = &TradingPairOrderField{
		field: tradingpair.FieldCounterQuantityMaxPrecision,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{
				ID:    tp.ID,
				Value: tp.CounterQuantityMaxPrecision,
			}
		},
	}
)
View Source
var (
	// VenueOrderFieldVenueID orders Venue by venue_id.
	VenueOrderFieldVenueID = &VenueOrderField{
		field: venue.FieldVenueID,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.VenueID,
			}
		},
	}
	// VenueOrderFieldType orders Venue by type.
	VenueOrderFieldType = &VenueOrderField{
		field: venue.FieldType,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.Type,
			}
		},
	}
	// VenueOrderFieldName orders Venue by name.
	VenueOrderFieldName = &VenueOrderField{
		field: venue.FieldName,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.Name,
			}
		},
	}
	// VenueOrderFieldYearEstablished orders Venue by year_established.
	VenueOrderFieldYearEstablished = &VenueOrderField{
		field: venue.FieldYearEstablished,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.YearEstablished,
			}
		},
	}
	// VenueOrderFieldCountry orders Venue by country.
	VenueOrderFieldCountry = &VenueOrderField{
		field: venue.FieldCountry,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.Country,
			}
		},
	}
	// VenueOrderFieldImage orders Venue by image.
	VenueOrderFieldImage = &VenueOrderField{
		field: venue.FieldImage,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.Image,
			}
		},
	}
	// VenueOrderFieldHasTradingIncentive orders Venue by has_trading_incentive.
	VenueOrderFieldHasTradingIncentive = &VenueOrderField{
		field: venue.FieldHasTradingIncentive,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.HasTradingIncentive,
			}
		},
	}
	// VenueOrderFieldCentralized orders Venue by centralized.
	VenueOrderFieldCentralized = &VenueOrderField{
		field: venue.FieldCentralized,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.Centralized,
			}
		},
	}
	// VenueOrderFieldPublicNotice orders Venue by public_notice.
	VenueOrderFieldPublicNotice = &VenueOrderField{
		field: venue.FieldPublicNotice,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.PublicNotice,
			}
		},
	}
	// VenueOrderFieldAlertNotice orders Venue by alert_notice.
	VenueOrderFieldAlertNotice = &VenueOrderField{
		field: venue.FieldAlertNotice,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.AlertNotice,
			}
		},
	}
	// VenueOrderFieldTrustScore orders Venue by trust_score.
	VenueOrderFieldTrustScore = &VenueOrderField{
		field: venue.FieldTrustScore,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.TrustScore,
			}
		},
	}
	// VenueOrderFieldTrustScoreRank orders Venue by trust_score_rank.
	VenueOrderFieldTrustScoreRank = &VenueOrderField{
		field: venue.FieldTrustScoreRank,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.TrustScoreRank,
			}
		},
	}
	// VenueOrderFieldTradeVolume24hBtc orders Venue by trade_volume_24h_btc.
	VenueOrderFieldTradeVolume24hBtc = &VenueOrderField{
		field: venue.FieldTradeVolume24hBtc,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.TradeVolume24hBtc,
			}
		},
	}
	// VenueOrderFieldTradeVolume24hBtcNormalized orders Venue by trade_volume_24h_btc_normalized.
	VenueOrderFieldTradeVolume24hBtcNormalized = &VenueOrderField{
		field: venue.FieldTradeVolume24hBtcNormalized,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.TradeVolume24hBtcNormalized,
			}
		},
	}
	// VenueOrderFieldMakerFee orders Venue by maker_fee.
	VenueOrderFieldMakerFee = &VenueOrderField{
		field: venue.FieldMakerFee,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.MakerFee,
			}
		},
	}
	// VenueOrderFieldTakerFee orders Venue by taker_fee.
	VenueOrderFieldTakerFee = &VenueOrderField{
		field: venue.FieldTakerFee,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.TakerFee,
			}
		},
	}
	// VenueOrderFieldSpreadFee orders Venue by spread_fee.
	VenueOrderFieldSpreadFee = &VenueOrderField{
		field: venue.FieldSpreadFee,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.SpreadFee,
			}
		},
	}
	// VenueOrderFieldSupportAPI orders Venue by support_api.
	VenueOrderFieldSupportAPI = &VenueOrderField{
		field: venue.FieldSupportAPI,
		toCursor: func(v *Venue) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.SupportAPI,
			}
		},
	}
)
View Source
var DefaultCurrencyOrder = &CurrencyOrder{
	Direction: OrderDirectionAsc,
	Field: &CurrencyOrderField{
		field: currency.FieldID,
		toCursor: func(c *Currency) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultCurrencyOrder is the default ordering of Currency.

View Source
var DefaultMarketOrder = &MarketOrder{
	Direction: OrderDirectionAsc,
	Field: &MarketOrderField{
		field: market.FieldID,
		toCursor: func(m *Market) Cursor {
			return Cursor{ID: m.ID}
		},
	},
}

DefaultMarketOrder is the default ordering of Market.

View Source
var DefaultOutboxOrder = &OutboxOrder{
	Direction: OrderDirectionAsc,
	Field: &OutboxOrderField{
		field: outbox.FieldID,
		toCursor: func(o *Outbox) Cursor {
			return Cursor{ID: o.ID}
		},
	},
}

DefaultOutboxOrder is the default ordering of Outbox.

View Source
var DefaultTickerOrder = &TickerOrder{
	Direction: OrderDirectionAsc,
	Field: &TickerOrderField{
		field: ticker.FieldID,
		toCursor: func(t *Ticker) Cursor {
			return Cursor{ID: t.ID}
		},
	},
}

DefaultTickerOrder is the default ordering of Ticker.

View Source
var DefaultTradingPairOrder = &TradingPairOrder{
	Direction: OrderDirectionAsc,
	Field: &TradingPairOrderField{
		field: tradingpair.FieldID,
		toCursor: func(tp *TradingPair) Cursor {
			return Cursor{ID: tp.ID}
		},
	},
}

DefaultTradingPairOrder is the default ordering of TradingPair.

View Source
var DefaultVenueOrder = &VenueOrder{
	Direction: OrderDirectionAsc,
	Field: &VenueOrderField{
		field: venue.FieldID,
		toCursor: func(v *Venue) Cursor {
			return Cursor{ID: v.ID}
		},
	},
}

DefaultVenueOrder is the default ordering of Venue.

View Source
var ErrEmptyCurrencyWhereInput = errors.New("entities: empty predicate CurrencyWhereInput")

ErrEmptyCurrencyWhereInput is returned in case the CurrencyWhereInput is empty.

View Source
var ErrEmptyMarketWhereInput = errors.New("entities: empty predicate MarketWhereInput")

ErrEmptyMarketWhereInput is returned in case the MarketWhereInput is empty.

View Source
var ErrEmptyOutboxWhereInput = errors.New("entities: empty predicate OutboxWhereInput")

ErrEmptyOutboxWhereInput is returned in case the OutboxWhereInput is empty.

View Source
var ErrEmptyTickerWhereInput = errors.New("entities: empty predicate TickerWhereInput")

ErrEmptyTickerWhereInput is returned in case the TickerWhereInput is empty.

View Source
var ErrEmptyTradingPairWhereInput = errors.New("entities: empty predicate TradingPairWhereInput")

ErrEmptyTradingPairWhereInput is returned in case the TradingPairWhereInput is empty.

View Source
var ErrEmptyVenueWhereInput = errors.New("entities: empty predicate VenueWhereInput")

ErrEmptyVenueWhereInput is returned in case the VenueWhereInput is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

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

OpenTxFromContext open transactions from client stored in context.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

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

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Currency is the client for interacting with the Currency builders.
	Currency *CurrencyClient
	// Market is the client for interacting with the Market builders.
	Market *MarketClient
	// Outbox is the client for interacting with the Outbox builders.
	Outbox *OutboxClient
	// Ticker is the client for interacting with the Ticker builders.
	Ticker *TickerClient
	// TradingPair is the client for interacting with the TradingPair builders.
	TradingPair *TradingPairClient
	// Venue is the client for interacting with the Venue builders.
	Venue *VenueClient
	// 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().
	Currency.
	Query().
	Count(ctx)

func (*Client) ExecContext

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

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

func (*Client) Intercept

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

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

func (*Client) Mutate

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

Mutate implements the ent.Mutator interface.

func (*Client) Noder

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

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

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

func (*Client) Noders

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

func (*Client) OpenTx

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

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

func (*Client) QueryContext

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

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

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Currencies

type Currencies []*Currency

Currencies is a parsable slice of Currency.

type Currency

type Currency struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Symbol holds the value of the "symbol" field.
	Symbol string `json:"symbol,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Type holds the value of the "type" field.
	Type currency.Type `json:"type,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CurrencyQuery when eager-loading is set.
	Edges CurrencyEdges `json:"edges"`
	// contains filtered or unexported fields
}

Currency is the model entity for the Currency schema.

func (*Currency) CurrencyBase

func (c *Currency) CurrencyBase(ctx context.Context) (result []*TradingPair, err error)

func (*Currency) CurrencyCounter

func (c *Currency) CurrencyCounter(ctx context.Context) (result []*TradingPair, err error)

func (*Currency) ExecContext

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

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

func (*Currency) IsNode

func (n *Currency) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Currency) NamedCurrencyBase

func (c *Currency) NamedCurrencyBase(name string) ([]*TradingPair, error)

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

func (*Currency) NamedCurrencyCounter

func (c *Currency) NamedCurrencyCounter(name string) ([]*TradingPair, error)

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

func (*Currency) QueryContext

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

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

func (*Currency) QueryCurrencyBase

func (c *Currency) QueryCurrencyBase() *TradingPairQuery

QueryCurrencyBase queries the "currency_base" edge of the Currency entity.

func (*Currency) QueryCurrencyCounter

func (c *Currency) QueryCurrencyCounter() *TradingPairQuery

QueryCurrencyCounter queries the "currency_counter" edge of the Currency entity.

func (*Currency) String

func (c *Currency) String() string

String implements the fmt.Stringer.

func (*Currency) ToEdge

func (c *Currency) ToEdge(order *CurrencyOrder) *CurrencyEdge

ToEdge converts Currency into CurrencyEdge.

func (*Currency) Unwrap

func (c *Currency) Unwrap() *Currency

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

func (c *Currency) Update() *CurrencyUpdateOne

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

type CurrencyClient

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

CurrencyClient is a client for the Currency schema.

func NewCurrencyClient

func NewCurrencyClient(c config) *CurrencyClient

NewCurrencyClient returns a client for the Currency from the given config.

func (*CurrencyClient) Create

func (c *CurrencyClient) Create() *CurrencyCreate

Create returns a builder for creating a Currency entity.

func (*CurrencyClient) CreateBulk

func (c *CurrencyClient) CreateBulk(builders ...*CurrencyCreate) *CurrencyCreateBulk

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

func (*CurrencyClient) Delete

func (c *CurrencyClient) Delete() *CurrencyDelete

Delete returns a delete builder for Currency.

func (*CurrencyClient) DeleteOne

func (c *CurrencyClient) DeleteOne(cu *Currency) *CurrencyDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CurrencyClient) DeleteOneID

func (c *CurrencyClient) DeleteOneID(id int) *CurrencyDeleteOne

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

func (*CurrencyClient) ExecContext

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

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

func (*CurrencyClient) Get

func (c *CurrencyClient) Get(ctx context.Context, id int) (*Currency, error)

Get returns a Currency entity by its id.

func (*CurrencyClient) GetX

func (c *CurrencyClient) GetX(ctx context.Context, id int) *Currency

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

func (*CurrencyClient) Hooks

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

Hooks returns the client hooks.

func (*CurrencyClient) Intercept

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

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

func (*CurrencyClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CurrencyClient) Query

func (c *CurrencyClient) Query() *CurrencyQuery

Query returns a query builder for Currency.

func (*CurrencyClient) QueryContext

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

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

func (*CurrencyClient) QueryCurrencyBase

func (c *CurrencyClient) QueryCurrencyBase(cu *Currency) *TradingPairQuery

QueryCurrencyBase queries the currency_base edge of a Currency.

func (*CurrencyClient) QueryCurrencyCounter

func (c *CurrencyClient) QueryCurrencyCounter(cu *Currency) *TradingPairQuery

QueryCurrencyCounter queries the currency_counter edge of a Currency.

func (*CurrencyClient) Update

func (c *CurrencyClient) Update() *CurrencyUpdate

Update returns an update builder for Currency.

func (*CurrencyClient) UpdateOne

func (c *CurrencyClient) UpdateOne(cu *Currency) *CurrencyUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CurrencyClient) UpdateOneID

func (c *CurrencyClient) UpdateOneID(id int) *CurrencyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CurrencyClient) Use

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

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

type CurrencyConnection

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

CurrencyConnection is the connection containing edges to Currency.

type CurrencyCreate

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

CurrencyCreate is the builder for creating a Currency entity.

func (*CurrencyCreate) AddCurrencyBase

func (cc *CurrencyCreate) AddCurrencyBase(t ...*TradingPair) *CurrencyCreate

AddCurrencyBase adds the "currency_base" edges to the TradingPair entity.

func (*CurrencyCreate) AddCurrencyBaseIDs

func (cc *CurrencyCreate) AddCurrencyBaseIDs(ids ...int) *CurrencyCreate

AddCurrencyBaseIDs adds the "currency_base" edge to the TradingPair entity by IDs.

func (*CurrencyCreate) AddCurrencyCounter

func (cc *CurrencyCreate) AddCurrencyCounter(t ...*TradingPair) *CurrencyCreate

AddCurrencyCounter adds the "currency_counter" edges to the TradingPair entity.

func (*CurrencyCreate) AddCurrencyCounterIDs

func (cc *CurrencyCreate) AddCurrencyCounterIDs(ids ...int) *CurrencyCreate

AddCurrencyCounterIDs adds the "currency_counter" edge to the TradingPair entity by IDs.

func (*CurrencyCreate) Exec

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

Exec executes the query.

func (*CurrencyCreate) ExecContext

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

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

func (*CurrencyCreate) ExecX

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

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

func (*CurrencyCreate) Mutation

func (cc *CurrencyCreate) Mutation() *CurrencyMutation

Mutation returns the CurrencyMutation object of the builder.

func (*CurrencyCreate) OnConflict

func (cc *CurrencyCreate) OnConflict(opts ...sql.ConflictOption) *CurrencyUpsertOne

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

client.Currency.Create().
	SetSymbol(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.CurrencyUpsert) {
		SetSymbol(v+v).
	}).
	Exec(ctx)

func (*CurrencyCreate) OnConflictColumns

func (cc *CurrencyCreate) OnConflictColumns(columns ...string) *CurrencyUpsertOne

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

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

func (*CurrencyCreate) QueryContext

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

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

func (*CurrencyCreate) Save

func (cc *CurrencyCreate) Save(ctx context.Context) (*Currency, error)

Save creates the Currency in the database.

func (*CurrencyCreate) SaveX

func (cc *CurrencyCreate) SaveX(ctx context.Context) *Currency

SaveX calls Save and panics if Save returns an error.

func (*CurrencyCreate) SetName

func (cc *CurrencyCreate) SetName(s string) *CurrencyCreate

SetName sets the "name" field.

func (*CurrencyCreate) SetNillableName

func (cc *CurrencyCreate) SetNillableName(s *string) *CurrencyCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*CurrencyCreate) SetSymbol

func (cc *CurrencyCreate) SetSymbol(s string) *CurrencyCreate

SetSymbol sets the "symbol" field.

func (*CurrencyCreate) SetType

func (cc *CurrencyCreate) SetType(c currency.Type) *CurrencyCreate

SetType sets the "type" field.

type CurrencyCreateBulk

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

CurrencyCreateBulk is the builder for creating many Currency entities in bulk.

func (*CurrencyCreateBulk) Exec

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

Exec executes the query.

func (*CurrencyCreateBulk) ExecContext

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

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

func (*CurrencyCreateBulk) ExecX

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

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

func (*CurrencyCreateBulk) OnConflict

func (ccb *CurrencyCreateBulk) OnConflict(opts ...sql.ConflictOption) *CurrencyUpsertBulk

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

client.Currency.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.CurrencyUpsert) {
		SetSymbol(v+v).
	}).
	Exec(ctx)

func (*CurrencyCreateBulk) OnConflictColumns

func (ccb *CurrencyCreateBulk) OnConflictColumns(columns ...string) *CurrencyUpsertBulk

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

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

func (*CurrencyCreateBulk) QueryContext

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

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

func (*CurrencyCreateBulk) Save

func (ccb *CurrencyCreateBulk) Save(ctx context.Context) ([]*Currency, error)

Save creates the Currency entities in the database.

func (*CurrencyCreateBulk) SaveX

func (ccb *CurrencyCreateBulk) SaveX(ctx context.Context) []*Currency

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

type CurrencyDelete

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

CurrencyDelete is the builder for deleting a Currency entity.

func (*CurrencyDelete) Exec

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

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

func (*CurrencyDelete) ExecContext

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

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

func (*CurrencyDelete) ExecX

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

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

func (*CurrencyDelete) QueryContext

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

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

func (*CurrencyDelete) Where

func (cd *CurrencyDelete) Where(ps ...predicate.Currency) *CurrencyDelete

Where appends a list predicates to the CurrencyDelete builder.

type CurrencyDeleteOne

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

CurrencyDeleteOne is the builder for deleting a single Currency entity.

func (*CurrencyDeleteOne) Exec

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

Exec executes the deletion query.

func (*CurrencyDeleteOne) ExecX

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

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

func (*CurrencyDeleteOne) Where

Where appends a list predicates to the CurrencyDelete builder.

type CurrencyEdge

type CurrencyEdge struct {
	Node   *Currency `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

CurrencyEdge is the edge representation of Currency.

type CurrencyEdges

type CurrencyEdges struct {
	// CurrencyBase holds the value of the currency_base edge.
	CurrencyBase []*TradingPair `json:"currency_base,omitempty"`
	// CurrencyCounter holds the value of the currency_counter edge.
	CurrencyCounter []*TradingPair `json:"currency_counter,omitempty"`
	// contains filtered or unexported fields
}

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

func (CurrencyEdges) CurrencyBaseOrErr

func (e CurrencyEdges) CurrencyBaseOrErr() ([]*TradingPair, error)

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

func (CurrencyEdges) CurrencyCounterOrErr

func (e CurrencyEdges) CurrencyCounterOrErr() ([]*TradingPair, error)

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

type CurrencyFilter

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

CurrencyFilter provides a generic filtering capability at runtime for CurrencyQuery.

func (*CurrencyFilter) ExecContext

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

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

func (*CurrencyFilter) QueryContext

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

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

func (*CurrencyFilter) Where

func (f *CurrencyFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*CurrencyFilter) WhereHasCurrencyBase

func (f *CurrencyFilter) WhereHasCurrencyBase()

WhereHasCurrencyBase applies a predicate to check if query has an edge currency_base.

func (*CurrencyFilter) WhereHasCurrencyBaseWith

func (f *CurrencyFilter) WhereHasCurrencyBaseWith(preds ...predicate.TradingPair)

WhereHasCurrencyBaseWith applies a predicate to check if query has an edge currency_base with a given conditions (other predicates).

func (*CurrencyFilter) WhereHasCurrencyCounter

func (f *CurrencyFilter) WhereHasCurrencyCounter()

WhereHasCurrencyCounter applies a predicate to check if query has an edge currency_counter.

func (*CurrencyFilter) WhereHasCurrencyCounterWith

func (f *CurrencyFilter) WhereHasCurrencyCounterWith(preds ...predicate.TradingPair)

WhereHasCurrencyCounterWith applies a predicate to check if query has an edge currency_counter with a given conditions (other predicates).

func (*CurrencyFilter) WhereID

func (f *CurrencyFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*CurrencyFilter) WhereName

func (f *CurrencyFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*CurrencyFilter) WhereSymbol

func (f *CurrencyFilter) WhereSymbol(p entql.StringP)

WhereSymbol applies the entql string predicate on the symbol field.

func (*CurrencyFilter) WhereType

func (f *CurrencyFilter) WhereType(p entql.StringP)

WhereType applies the entql string predicate on the type field.

type CurrencyGroupBy

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

CurrencyGroupBy is the group-by builder for Currency entities.

func (*CurrencyGroupBy) Aggregate

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

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

func (*CurrencyGroupBy) Bool

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

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

func (*CurrencyGroupBy) BoolX

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

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

func (*CurrencyGroupBy) Bools

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

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

func (*CurrencyGroupBy) BoolsX

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

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

func (*CurrencyGroupBy) Float64

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

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

func (*CurrencyGroupBy) Float64X

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

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

func (*CurrencyGroupBy) Float64s

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

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

func (*CurrencyGroupBy) Float64sX

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

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

func (*CurrencyGroupBy) Int

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

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

func (*CurrencyGroupBy) IntX

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

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

func (*CurrencyGroupBy) Ints

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

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

func (*CurrencyGroupBy) IntsX

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

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

func (*CurrencyGroupBy) Scan

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

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

func (*CurrencyGroupBy) ScanX

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

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

func (*CurrencyGroupBy) String

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

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

func (*CurrencyGroupBy) StringX

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

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

func (*CurrencyGroupBy) Strings

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

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

func (*CurrencyGroupBy) StringsX

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

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

type CurrencyMutation

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

CurrencyMutation represents an operation that mutates the Currency nodes in the graph.

func (*CurrencyMutation) AddCurrencyBaseIDs

func (m *CurrencyMutation) AddCurrencyBaseIDs(ids ...int)

AddCurrencyBaseIDs adds the "currency_base" edge to the TradingPair entity by ids.

func (*CurrencyMutation) AddCurrencyCounterIDs

func (m *CurrencyMutation) AddCurrencyCounterIDs(ids ...int)

AddCurrencyCounterIDs adds the "currency_counter" edge to the TradingPair entity by ids.

func (*CurrencyMutation) AddField

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

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

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

func (*CurrencyMutation) AddedField

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

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

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

func (*CurrencyMutation) AddedIDs

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

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

func (*CurrencyMutation) ClearCurrencyBase

func (m *CurrencyMutation) ClearCurrencyBase()

ClearCurrencyBase clears the "currency_base" edge to the TradingPair entity.

func (*CurrencyMutation) ClearCurrencyCounter

func (m *CurrencyMutation) ClearCurrencyCounter()

ClearCurrencyCounter clears the "currency_counter" edge to the TradingPair entity.

func (*CurrencyMutation) ClearEdge

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

func (m *CurrencyMutation) 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 (*CurrencyMutation) ClearName

func (m *CurrencyMutation) ClearName()

ClearName clears the value of the "name" field.

func (*CurrencyMutation) ClearedEdges

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

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

func (*CurrencyMutation) ClearedFields

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

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

func (CurrencyMutation) Client

func (m CurrencyMutation) 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 (*CurrencyMutation) CurrencyBaseCleared

func (m *CurrencyMutation) CurrencyBaseCleared() bool

CurrencyBaseCleared reports if the "currency_base" edge to the TradingPair entity was cleared.

func (*CurrencyMutation) CurrencyBaseIDs

func (m *CurrencyMutation) CurrencyBaseIDs() (ids []int)

CurrencyBaseIDs returns the "currency_base" edge IDs in the mutation.

func (*CurrencyMutation) CurrencyCounterCleared

func (m *CurrencyMutation) CurrencyCounterCleared() bool

CurrencyCounterCleared reports if the "currency_counter" edge to the TradingPair entity was cleared.

func (*CurrencyMutation) CurrencyCounterIDs

func (m *CurrencyMutation) CurrencyCounterIDs() (ids []int)

CurrencyCounterIDs returns the "currency_counter" edge IDs in the mutation.

func (*CurrencyMutation) EdgeCleared

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

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

func (*CurrencyMutation) ExecContext

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

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

func (*CurrencyMutation) Field

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

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

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

func (*CurrencyMutation) Fields

func (m *CurrencyMutation) 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 (*CurrencyMutation) Filter

func (m *CurrencyMutation) Filter() *CurrencyFilter

Filter returns an entql.Where implementation to apply filters on the CurrencyMutation builder.

func (*CurrencyMutation) GetType

func (m *CurrencyMutation) GetType() (r currency.Type, exists bool)

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

func (*CurrencyMutation) ID

func (m *CurrencyMutation) ID() (id int, exists bool)

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

func (*CurrencyMutation) IDs

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

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

func (*CurrencyMutation) Name

func (m *CurrencyMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*CurrencyMutation) NameCleared

func (m *CurrencyMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*CurrencyMutation) OldField

func (m *CurrencyMutation) 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 (*CurrencyMutation) OldName

func (m *CurrencyMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Currency entity. If the Currency 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 (*CurrencyMutation) OldSymbol

func (m *CurrencyMutation) OldSymbol(ctx context.Context) (v string, err error)

OldSymbol returns the old "symbol" field's value of the Currency entity. If the Currency 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 (*CurrencyMutation) OldType

func (m *CurrencyMutation) OldType(ctx context.Context) (v currency.Type, err error)

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

func (m *CurrencyMutation) Op() Op

Op returns the operation name.

func (*CurrencyMutation) QueryContext

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

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

func (*CurrencyMutation) RemoveCurrencyBaseIDs

func (m *CurrencyMutation) RemoveCurrencyBaseIDs(ids ...int)

RemoveCurrencyBaseIDs removes the "currency_base" edge to the TradingPair entity by IDs.

func (*CurrencyMutation) RemoveCurrencyCounterIDs

func (m *CurrencyMutation) RemoveCurrencyCounterIDs(ids ...int)

RemoveCurrencyCounterIDs removes the "currency_counter" edge to the TradingPair entity by IDs.

func (*CurrencyMutation) RemovedCurrencyBaseIDs

func (m *CurrencyMutation) RemovedCurrencyBaseIDs() (ids []int)

RemovedCurrencyBase returns the removed IDs of the "currency_base" edge to the TradingPair entity.

func (*CurrencyMutation) RemovedCurrencyCounterIDs

func (m *CurrencyMutation) RemovedCurrencyCounterIDs() (ids []int)

RemovedCurrencyCounter returns the removed IDs of the "currency_counter" edge to the TradingPair entity.

func (*CurrencyMutation) RemovedEdges

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

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

func (*CurrencyMutation) RemovedIDs

func (m *CurrencyMutation) 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 (*CurrencyMutation) ResetCurrencyBase

func (m *CurrencyMutation) ResetCurrencyBase()

ResetCurrencyBase resets all changes to the "currency_base" edge.

func (*CurrencyMutation) ResetCurrencyCounter

func (m *CurrencyMutation) ResetCurrencyCounter()

ResetCurrencyCounter resets all changes to the "currency_counter" edge.

func (*CurrencyMutation) ResetEdge

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

func (m *CurrencyMutation) 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 (*CurrencyMutation) ResetName

func (m *CurrencyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CurrencyMutation) ResetSymbol

func (m *CurrencyMutation) ResetSymbol()

ResetSymbol resets all changes to the "symbol" field.

func (*CurrencyMutation) ResetType

func (m *CurrencyMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*CurrencyMutation) SetField

func (m *CurrencyMutation) 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 (*CurrencyMutation) SetName

func (m *CurrencyMutation) SetName(s string)

SetName sets the "name" field.

func (*CurrencyMutation) SetOp

func (m *CurrencyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CurrencyMutation) SetSymbol

func (m *CurrencyMutation) SetSymbol(s string)

SetSymbol sets the "symbol" field.

func (*CurrencyMutation) SetType

func (m *CurrencyMutation) SetType(c currency.Type)

SetType sets the "type" field.

func (*CurrencyMutation) Symbol

func (m *CurrencyMutation) Symbol() (r string, exists bool)

Symbol returns the value of the "symbol" field in the mutation.

func (CurrencyMutation) Tx

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

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

func (*CurrencyMutation) Type

func (m *CurrencyMutation) Type() string

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

func (*CurrencyMutation) Where

func (m *CurrencyMutation) Where(ps ...predicate.Currency)

Where appends a list predicates to the CurrencyMutation builder.

func (*CurrencyMutation) WhereP

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

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

type CurrencyOrder

type CurrencyOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *CurrencyOrderField `json:"field"`
}

CurrencyOrder defines the ordering of Currency.

type CurrencyOrderField

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

CurrencyOrderField defines the ordering field of Currency.

func (CurrencyOrderField) MarshalGQL

func (f CurrencyOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (CurrencyOrderField) String

func (f CurrencyOrderField) String() string

String implement fmt.Stringer interface.

func (*CurrencyOrderField) UnmarshalGQL

func (f *CurrencyOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type CurrencyPaginateOption

type CurrencyPaginateOption func(*currencyPager) error

CurrencyPaginateOption enables pagination customization.

func WithCurrencyFilter

func WithCurrencyFilter(filter func(*CurrencyQuery) (*CurrencyQuery, error)) CurrencyPaginateOption

WithCurrencyFilter configures pagination filter.

func WithCurrencyOrder

func WithCurrencyOrder(order *CurrencyOrder) CurrencyPaginateOption

WithCurrencyOrder configures pagination ordering.

type CurrencyQuery

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

CurrencyQuery is the builder for querying Currency entities.

func (*CurrencyQuery) Aggregate

func (cq *CurrencyQuery) Aggregate(fns ...AggregateFunc) *CurrencySelect

Aggregate returns a CurrencySelect configured with the given aggregations.

func (*CurrencyQuery) All

func (cq *CurrencyQuery) All(ctx context.Context) ([]*Currency, error)

All executes the query and returns a list of Currencies.

func (*CurrencyQuery) AllX

func (cq *CurrencyQuery) AllX(ctx context.Context) []*Currency

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

func (*CurrencyQuery) Clone

func (cq *CurrencyQuery) Clone() *CurrencyQuery

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

func (*CurrencyQuery) CollectFields

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

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

func (*CurrencyQuery) Count

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

Count returns the count of the given query.

func (*CurrencyQuery) CountX

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

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

func (*CurrencyQuery) ExecContext

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

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

func (*CurrencyQuery) Exist

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

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

func (*CurrencyQuery) ExistX

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

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

func (*CurrencyQuery) Filter

func (cq *CurrencyQuery) Filter() *CurrencyFilter

Filter returns a Filter implementation to apply filters on the CurrencyQuery builder.

func (*CurrencyQuery) First

func (cq *CurrencyQuery) First(ctx context.Context) (*Currency, error)

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

func (*CurrencyQuery) FirstID

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

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

func (*CurrencyQuery) FirstIDX

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

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

func (*CurrencyQuery) FirstX

func (cq *CurrencyQuery) FirstX(ctx context.Context) *Currency

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

func (*CurrencyQuery) ForShare

func (cq *CurrencyQuery) ForShare(opts ...sql.LockOption) *CurrencyQuery

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

func (*CurrencyQuery) ForUpdate

func (cq *CurrencyQuery) ForUpdate(opts ...sql.LockOption) *CurrencyQuery

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

func (*CurrencyQuery) GroupBy

func (cq *CurrencyQuery) GroupBy(field string, fields ...string) *CurrencyGroupBy

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

client.Currency.Query().
	GroupBy(currency.FieldSymbol).
	Aggregate(entities.Count()).
	Scan(ctx, &v)

func (*CurrencyQuery) IDs

func (cq *CurrencyQuery) IDs(ctx context.Context) ([]int, error)

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

func (*CurrencyQuery) IDsX

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

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

func (*CurrencyQuery) Limit

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

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

func (*CurrencyQuery) Modify

func (cq *CurrencyQuery) Modify(modifiers ...func(s *sql.Selector)) *CurrencySelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CurrencyQuery) Offset

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

Offset to start from.

func (*CurrencyQuery) Only

func (cq *CurrencyQuery) Only(ctx context.Context) (*Currency, error)

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

func (*CurrencyQuery) OnlyID

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

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

func (*CurrencyQuery) OnlyIDX

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

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

func (*CurrencyQuery) OnlyX

func (cq *CurrencyQuery) OnlyX(ctx context.Context) *Currency

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

func (*CurrencyQuery) Order

func (cq *CurrencyQuery) Order(o ...OrderFunc) *CurrencyQuery

Order specifies how the records should be ordered.

func (*CurrencyQuery) Paginate

func (c *CurrencyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CurrencyPaginateOption,
) (*CurrencyConnection, error)

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

func (*CurrencyQuery) QueryContext

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

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

func (*CurrencyQuery) QueryCurrencyBase

func (cq *CurrencyQuery) QueryCurrencyBase() *TradingPairQuery

QueryCurrencyBase chains the current query on the "currency_base" edge.

func (*CurrencyQuery) QueryCurrencyCounter

func (cq *CurrencyQuery) QueryCurrencyCounter() *TradingPairQuery

QueryCurrencyCounter chains the current query on the "currency_counter" edge.

func (*CurrencyQuery) Select

func (cq *CurrencyQuery) Select(fields ...string) *CurrencySelect

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

client.Currency.Query().
	Select(currency.FieldSymbol).
	Scan(ctx, &v)

func (*CurrencyQuery) Unique

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

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

func (cq *CurrencyQuery) Where(ps ...predicate.Currency) *CurrencyQuery

Where adds a new predicate for the CurrencyQuery builder.

func (*CurrencyQuery) WithCurrencyBase

func (cq *CurrencyQuery) WithCurrencyBase(opts ...func(*TradingPairQuery)) *CurrencyQuery

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

func (*CurrencyQuery) WithCurrencyCounter

func (cq *CurrencyQuery) WithCurrencyCounter(opts ...func(*TradingPairQuery)) *CurrencyQuery

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

func (*CurrencyQuery) WithNamedCurrencyBase

func (cq *CurrencyQuery) WithNamedCurrencyBase(name string, opts ...func(*TradingPairQuery)) *CurrencyQuery

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

func (*CurrencyQuery) WithNamedCurrencyCounter

func (cq *CurrencyQuery) WithNamedCurrencyCounter(name string, opts ...func(*TradingPairQuery)) *CurrencyQuery

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

type CurrencySelect

type CurrencySelect struct {
	*CurrencyQuery
	// contains filtered or unexported fields
}

CurrencySelect is the builder for selecting fields of Currency entities.

func (*CurrencySelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*CurrencySelect) Bool

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

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

func (*CurrencySelect) BoolX

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

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

func (*CurrencySelect) Bools

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

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

func (*CurrencySelect) BoolsX

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

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

func (CurrencySelect) ExecContext

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

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

func (*CurrencySelect) Float64

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

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

func (*CurrencySelect) Float64X

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

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

func (*CurrencySelect) Float64s

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

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

func (*CurrencySelect) Float64sX

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

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

func (*CurrencySelect) Int

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

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

func (*CurrencySelect) IntX

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

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

func (*CurrencySelect) Ints

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

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

func (*CurrencySelect) IntsX

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

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

func (*CurrencySelect) Modify

func (cs *CurrencySelect) Modify(modifiers ...func(s *sql.Selector)) *CurrencySelect

Modify adds a query modifier for attaching custom logic to queries.

func (CurrencySelect) QueryContext

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

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

func (*CurrencySelect) Scan

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

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

func (*CurrencySelect) ScanX

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

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

func (*CurrencySelect) String

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

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

func (*CurrencySelect) StringX

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

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

func (*CurrencySelect) Strings

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

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

func (*CurrencySelect) StringsX

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

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

type CurrencyUpdate

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

CurrencyUpdate is the builder for updating Currency entities.

func (*CurrencyUpdate) AddCurrencyBase

func (cu *CurrencyUpdate) AddCurrencyBase(t ...*TradingPair) *CurrencyUpdate

AddCurrencyBase adds the "currency_base" edges to the TradingPair entity.

func (*CurrencyUpdate) AddCurrencyBaseIDs

func (cu *CurrencyUpdate) AddCurrencyBaseIDs(ids ...int) *CurrencyUpdate

AddCurrencyBaseIDs adds the "currency_base" edge to the TradingPair entity by IDs.

func (*CurrencyUpdate) AddCurrencyCounter

func (cu *CurrencyUpdate) AddCurrencyCounter(t ...*TradingPair) *CurrencyUpdate

AddCurrencyCounter adds the "currency_counter" edges to the TradingPair entity.

func (*CurrencyUpdate) AddCurrencyCounterIDs

func (cu *CurrencyUpdate) AddCurrencyCounterIDs(ids ...int) *CurrencyUpdate

AddCurrencyCounterIDs adds the "currency_counter" edge to the TradingPair entity by IDs.

func (*CurrencyUpdate) ClearCurrencyBase

func (cu *CurrencyUpdate) ClearCurrencyBase() *CurrencyUpdate

ClearCurrencyBase clears all "currency_base" edges to the TradingPair entity.

func (*CurrencyUpdate) ClearCurrencyCounter

func (cu *CurrencyUpdate) ClearCurrencyCounter() *CurrencyUpdate

ClearCurrencyCounter clears all "currency_counter" edges to the TradingPair entity.

func (*CurrencyUpdate) ClearName

func (cu *CurrencyUpdate) ClearName() *CurrencyUpdate

ClearName clears the value of the "name" field.

func (*CurrencyUpdate) Exec

func (cu *CurrencyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CurrencyUpdate) ExecContext

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

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

func (*CurrencyUpdate) ExecX

func (cu *CurrencyUpdate) ExecX(ctx context.Context)

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

func (*CurrencyUpdate) Modify

func (cu *CurrencyUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CurrencyUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CurrencyUpdate) Mutation

func (cu *CurrencyUpdate) Mutation() *CurrencyMutation

Mutation returns the CurrencyMutation object of the builder.

func (*CurrencyUpdate) QueryContext

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

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

func (*CurrencyUpdate) RemoveCurrencyBase

func (cu *CurrencyUpdate) RemoveCurrencyBase(t ...*TradingPair) *CurrencyUpdate

RemoveCurrencyBase removes "currency_base" edges to TradingPair entities.

func (*CurrencyUpdate) RemoveCurrencyBaseIDs

func (cu *CurrencyUpdate) RemoveCurrencyBaseIDs(ids ...int) *CurrencyUpdate

RemoveCurrencyBaseIDs removes the "currency_base" edge to TradingPair entities by IDs.

func (*CurrencyUpdate) RemoveCurrencyCounter

func (cu *CurrencyUpdate) RemoveCurrencyCounter(t ...*TradingPair) *CurrencyUpdate

RemoveCurrencyCounter removes "currency_counter" edges to TradingPair entities.

func (*CurrencyUpdate) RemoveCurrencyCounterIDs

func (cu *CurrencyUpdate) RemoveCurrencyCounterIDs(ids ...int) *CurrencyUpdate

RemoveCurrencyCounterIDs removes the "currency_counter" edge to TradingPair entities by IDs.

func (*CurrencyUpdate) Save

func (cu *CurrencyUpdate) Save(ctx context.Context) (int, error)

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

func (*CurrencyUpdate) SaveX

func (cu *CurrencyUpdate) SaveX(ctx context.Context) int

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

func (*CurrencyUpdate) SetName

func (cu *CurrencyUpdate) SetName(s string) *CurrencyUpdate

SetName sets the "name" field.

func (*CurrencyUpdate) SetNillableName

func (cu *CurrencyUpdate) SetNillableName(s *string) *CurrencyUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*CurrencyUpdate) SetSymbol

func (cu *CurrencyUpdate) SetSymbol(s string) *CurrencyUpdate

SetSymbol sets the "symbol" field.

func (*CurrencyUpdate) SetType

func (cu *CurrencyUpdate) SetType(c currency.Type) *CurrencyUpdate

SetType sets the "type" field.

func (*CurrencyUpdate) Where

func (cu *CurrencyUpdate) Where(ps ...predicate.Currency) *CurrencyUpdate

Where appends a list predicates to the CurrencyUpdate builder.

type CurrencyUpdateOne

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

CurrencyUpdateOne is the builder for updating a single Currency entity.

func (*CurrencyUpdateOne) AddCurrencyBase

func (cuo *CurrencyUpdateOne) AddCurrencyBase(t ...*TradingPair) *CurrencyUpdateOne

AddCurrencyBase adds the "currency_base" edges to the TradingPair entity.

func (*CurrencyUpdateOne) AddCurrencyBaseIDs

func (cuo *CurrencyUpdateOne) AddCurrencyBaseIDs(ids ...int) *CurrencyUpdateOne

AddCurrencyBaseIDs adds the "currency_base" edge to the TradingPair entity by IDs.

func (*CurrencyUpdateOne) AddCurrencyCounter

func (cuo *CurrencyUpdateOne) AddCurrencyCounter(t ...*TradingPair) *CurrencyUpdateOne

AddCurrencyCounter adds the "currency_counter" edges to the TradingPair entity.

func (*CurrencyUpdateOne) AddCurrencyCounterIDs

func (cuo *CurrencyUpdateOne) AddCurrencyCounterIDs(ids ...int) *CurrencyUpdateOne

AddCurrencyCounterIDs adds the "currency_counter" edge to the TradingPair entity by IDs.

func (*CurrencyUpdateOne) ClearCurrencyBase

func (cuo *CurrencyUpdateOne) ClearCurrencyBase() *CurrencyUpdateOne

ClearCurrencyBase clears all "currency_base" edges to the TradingPair entity.

func (*CurrencyUpdateOne) ClearCurrencyCounter

func (cuo *CurrencyUpdateOne) ClearCurrencyCounter() *CurrencyUpdateOne

ClearCurrencyCounter clears all "currency_counter" edges to the TradingPair entity.

func (*CurrencyUpdateOne) ClearName

func (cuo *CurrencyUpdateOne) ClearName() *CurrencyUpdateOne

ClearName clears the value of the "name" field.

func (*CurrencyUpdateOne) Exec

func (cuo *CurrencyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CurrencyUpdateOne) ExecContext

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

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

func (*CurrencyUpdateOne) ExecX

func (cuo *CurrencyUpdateOne) ExecX(ctx context.Context)

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

func (*CurrencyUpdateOne) Modify

func (cuo *CurrencyUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CurrencyUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CurrencyUpdateOne) Mutation

func (cuo *CurrencyUpdateOne) Mutation() *CurrencyMutation

Mutation returns the CurrencyMutation object of the builder.

func (*CurrencyUpdateOne) QueryContext

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

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

func (*CurrencyUpdateOne) RemoveCurrencyBase

func (cuo *CurrencyUpdateOne) RemoveCurrencyBase(t ...*TradingPair) *CurrencyUpdateOne

RemoveCurrencyBase removes "currency_base" edges to TradingPair entities.

func (*CurrencyUpdateOne) RemoveCurrencyBaseIDs

func (cuo *CurrencyUpdateOne) RemoveCurrencyBaseIDs(ids ...int) *CurrencyUpdateOne

RemoveCurrencyBaseIDs removes the "currency_base" edge to TradingPair entities by IDs.

func (*CurrencyUpdateOne) RemoveCurrencyCounter

func (cuo *CurrencyUpdateOne) RemoveCurrencyCounter(t ...*TradingPair) *CurrencyUpdateOne

RemoveCurrencyCounter removes "currency_counter" edges to TradingPair entities.

func (*CurrencyUpdateOne) RemoveCurrencyCounterIDs

func (cuo *CurrencyUpdateOne) RemoveCurrencyCounterIDs(ids ...int) *CurrencyUpdateOne

RemoveCurrencyCounterIDs removes the "currency_counter" edge to TradingPair entities by IDs.

func (*CurrencyUpdateOne) Save

func (cuo *CurrencyUpdateOne) Save(ctx context.Context) (*Currency, error)

Save executes the query and returns the updated Currency entity.

func (*CurrencyUpdateOne) SaveX

func (cuo *CurrencyUpdateOne) SaveX(ctx context.Context) *Currency

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

func (*CurrencyUpdateOne) Select

func (cuo *CurrencyUpdateOne) Select(field string, fields ...string) *CurrencyUpdateOne

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

func (*CurrencyUpdateOne) SetName

func (cuo *CurrencyUpdateOne) SetName(s string) *CurrencyUpdateOne

SetName sets the "name" field.

func (*CurrencyUpdateOne) SetNillableName

func (cuo *CurrencyUpdateOne) SetNillableName(s *string) *CurrencyUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*CurrencyUpdateOne) SetSymbol

func (cuo *CurrencyUpdateOne) SetSymbol(s string) *CurrencyUpdateOne

SetSymbol sets the "symbol" field.

func (*CurrencyUpdateOne) SetType

SetType sets the "type" field.

type CurrencyUpsert

type CurrencyUpsert struct {
	*sql.UpdateSet
}

CurrencyUpsert is the "OnConflict" setter.

func (*CurrencyUpsert) ClearName

func (u *CurrencyUpsert) ClearName() *CurrencyUpsert

ClearName clears the value of the "name" field.

func (*CurrencyUpsert) SetName

func (u *CurrencyUpsert) SetName(v string) *CurrencyUpsert

SetName sets the "name" field.

func (*CurrencyUpsert) SetSymbol

func (u *CurrencyUpsert) SetSymbol(v string) *CurrencyUpsert

SetSymbol sets the "symbol" field.

func (*CurrencyUpsert) SetType

func (u *CurrencyUpsert) SetType(v currency.Type) *CurrencyUpsert

SetType sets the "type" field.

func (*CurrencyUpsert) UpdateName

func (u *CurrencyUpsert) UpdateName() *CurrencyUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*CurrencyUpsert) UpdateSymbol

func (u *CurrencyUpsert) UpdateSymbol() *CurrencyUpsert

UpdateSymbol sets the "symbol" field to the value that was provided on create.

func (*CurrencyUpsert) UpdateType

func (u *CurrencyUpsert) UpdateType() *CurrencyUpsert

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

type CurrencyUpsertBulk

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

CurrencyUpsertBulk is the builder for "upsert"-ing a bulk of Currency nodes.

func (*CurrencyUpsertBulk) ClearName

func (u *CurrencyUpsertBulk) ClearName() *CurrencyUpsertBulk

ClearName clears the value of the "name" field.

func (*CurrencyUpsertBulk) DoNothing

func (u *CurrencyUpsertBulk) DoNothing() *CurrencyUpsertBulk

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

func (*CurrencyUpsertBulk) Exec

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

Exec executes the query.

func (*CurrencyUpsertBulk) ExecX

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

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

func (*CurrencyUpsertBulk) Ignore

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

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

func (*CurrencyUpsertBulk) SetName

SetName sets the "name" field.

func (*CurrencyUpsertBulk) SetSymbol

func (u *CurrencyUpsertBulk) SetSymbol(v string) *CurrencyUpsertBulk

SetSymbol sets the "symbol" field.

func (*CurrencyUpsertBulk) SetType

SetType sets the "type" field.

func (*CurrencyUpsertBulk) Update

func (u *CurrencyUpsertBulk) Update(set func(*CurrencyUpsert)) *CurrencyUpsertBulk

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

func (*CurrencyUpsertBulk) UpdateName

func (u *CurrencyUpsertBulk) UpdateName() *CurrencyUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*CurrencyUpsertBulk) UpdateNewValues

func (u *CurrencyUpsertBulk) UpdateNewValues() *CurrencyUpsertBulk

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

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

func (*CurrencyUpsertBulk) UpdateSymbol

func (u *CurrencyUpsertBulk) UpdateSymbol() *CurrencyUpsertBulk

UpdateSymbol sets the "symbol" field to the value that was provided on create.

func (*CurrencyUpsertBulk) UpdateType

func (u *CurrencyUpsertBulk) UpdateType() *CurrencyUpsertBulk

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

type CurrencyUpsertOne

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

CurrencyUpsertOne is the builder for "upsert"-ing

one Currency node.

func (*CurrencyUpsertOne) ClearName

func (u *CurrencyUpsertOne) ClearName() *CurrencyUpsertOne

ClearName clears the value of the "name" field.

func (*CurrencyUpsertOne) DoNothing

func (u *CurrencyUpsertOne) DoNothing() *CurrencyUpsertOne

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

func (*CurrencyUpsertOne) Exec

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

Exec executes the query.

func (*CurrencyUpsertOne) ExecX

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

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

func (*CurrencyUpsertOne) ID

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

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

func (*CurrencyUpsertOne) IDX

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

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

func (*CurrencyUpsertOne) Ignore

func (u *CurrencyUpsertOne) Ignore() *CurrencyUpsertOne

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

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

func (*CurrencyUpsertOne) SetName

SetName sets the "name" field.

func (*CurrencyUpsertOne) SetSymbol

func (u *CurrencyUpsertOne) SetSymbol(v string) *CurrencyUpsertOne

SetSymbol sets the "symbol" field.

func (*CurrencyUpsertOne) SetType

SetType sets the "type" field.

func (*CurrencyUpsertOne) Update

func (u *CurrencyUpsertOne) Update(set func(*CurrencyUpsert)) *CurrencyUpsertOne

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

func (*CurrencyUpsertOne) UpdateName

func (u *CurrencyUpsertOne) UpdateName() *CurrencyUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*CurrencyUpsertOne) UpdateNewValues

func (u *CurrencyUpsertOne) UpdateNewValues() *CurrencyUpsertOne

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

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

func (*CurrencyUpsertOne) UpdateSymbol

func (u *CurrencyUpsertOne) UpdateSymbol() *CurrencyUpsertOne

UpdateSymbol sets the "symbol" field to the value that was provided on create.

func (*CurrencyUpsertOne) UpdateType

func (u *CurrencyUpsertOne) UpdateType() *CurrencyUpsertOne

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

type CurrencyWhereInput

type CurrencyWhereInput struct {
	Predicates []predicate.Currency  `json:"-"`
	Not        *CurrencyWhereInput   `json:"not,omitempty"`
	Or         []*CurrencyWhereInput `json:"or,omitempty"`
	And        []*CurrencyWhereInput `json:"and,omitempty"`

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

	// "symbol" field predicates.
	Symbol             *string  `json:"symbol,omitempty"`
	SymbolNEQ          *string  `json:"symbolNEQ,omitempty"`
	SymbolIn           []string `json:"symbolIn,omitempty"`
	SymbolNotIn        []string `json:"symbolNotIn,omitempty"`
	SymbolGT           *string  `json:"symbolGT,omitempty"`
	SymbolGTE          *string  `json:"symbolGTE,omitempty"`
	SymbolLT           *string  `json:"symbolLT,omitempty"`
	SymbolLTE          *string  `json:"symbolLTE,omitempty"`
	SymbolContains     *string  `json:"symbolContains,omitempty"`
	SymbolHasPrefix    *string  `json:"symbolHasPrefix,omitempty"`
	SymbolHasSuffix    *string  `json:"symbolHasSuffix,omitempty"`
	SymbolEqualFold    *string  `json:"symbolEqualFold,omitempty"`
	SymbolContainsFold *string  `json:"symbolContainsFold,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"`

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

	// "currency_base" edge predicates.
	HasCurrencyBase     *bool                    `json:"hasCurrencyBase,omitempty"`
	HasCurrencyBaseWith []*TradingPairWhereInput `json:"hasCurrencyBaseWith,omitempty"`

	// "currency_counter" edge predicates.
	HasCurrencyCounter     *bool                    `json:"hasCurrencyCounter,omitempty"`
	HasCurrencyCounterWith []*TradingPairWhereInput `json:"hasCurrencyCounterWith,omitempty"`
}

CurrencyWhereInput represents a where input for filtering Currency queries.

func (*CurrencyWhereInput) AddPredicates

func (i *CurrencyWhereInput) AddPredicates(predicates ...predicate.Currency)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*CurrencyWhereInput) Filter

Filter applies the CurrencyWhereInput filter on the CurrencyQuery builder.

func (*CurrencyWhereInput) P

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

type Cursor

type Cursor struct {
	ID    int   `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 EntgoClient

type EntgoClient interface {
	GetClient() *Client
	Close()
}

func NewEntgoClient

func NewEntgoClient(
	logger *zap.SugaredLogger,
	database database.Database) (EntgoClient, error)

type Hook

type Hook = ent.Hook

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

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type Market

type Market struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Type holds the value of the "type" field.
	Type market.Type `json:"type,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MarketQuery when eager-loading is set.
	Edges MarketEdges `json:"edges"`
	// contains filtered or unexported fields
}

Market is the model entity for the Market schema.

func (*Market) ExecContext

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

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

func (*Market) IsNode

func (n *Market) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Market) NamedTradingPair

func (m *Market) NamedTradingPair(name string) ([]*TradingPair, error)

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

func (*Market) QueryContext

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

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

func (*Market) QueryTradingPair

func (m *Market) QueryTradingPair() *TradingPairQuery

QueryTradingPair queries the "trading_pair" edge of the Market entity.

func (*Market) QueryVenue

func (m *Market) QueryVenue() *VenueQuery

QueryVenue queries the "venue" edge of the Market entity.

func (*Market) String

func (m *Market) String() string

String implements the fmt.Stringer.

func (*Market) ToEdge

func (m *Market) ToEdge(order *MarketOrder) *MarketEdge

ToEdge converts Market into MarketEdge.

func (*Market) TradingPair

func (m *Market) TradingPair(ctx context.Context) (result []*TradingPair, err error)

func (*Market) Unwrap

func (m *Market) Unwrap() *Market

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

func (m *Market) Update() *MarketUpdateOne

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

func (*Market) Venue

func (m *Market) Venue(ctx context.Context) (*Venue, error)

type MarketClient

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

MarketClient is a client for the Market schema.

func NewMarketClient

func NewMarketClient(c config) *MarketClient

NewMarketClient returns a client for the Market from the given config.

func (*MarketClient) Create

func (c *MarketClient) Create() *MarketCreate

Create returns a builder for creating a Market entity.

func (*MarketClient) CreateBulk

func (c *MarketClient) CreateBulk(builders ...*MarketCreate) *MarketCreateBulk

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

func (*MarketClient) Delete

func (c *MarketClient) Delete() *MarketDelete

Delete returns a delete builder for Market.

func (*MarketClient) DeleteOne

func (c *MarketClient) DeleteOne(m *Market) *MarketDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MarketClient) DeleteOneID

func (c *MarketClient) DeleteOneID(id int) *MarketDeleteOne

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

func (*MarketClient) ExecContext

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

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

func (*MarketClient) Get

func (c *MarketClient) Get(ctx context.Context, id int) (*Market, error)

Get returns a Market entity by its id.

func (*MarketClient) GetX

func (c *MarketClient) GetX(ctx context.Context, id int) *Market

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

func (*MarketClient) Hooks

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

Hooks returns the client hooks.

func (*MarketClient) Intercept

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

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

func (*MarketClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MarketClient) Query

func (c *MarketClient) Query() *MarketQuery

Query returns a query builder for Market.

func (*MarketClient) QueryContext

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

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

func (*MarketClient) QueryTradingPair

func (c *MarketClient) QueryTradingPair(m *Market) *TradingPairQuery

QueryTradingPair queries the trading_pair edge of a Market.

func (*MarketClient) QueryVenue

func (c *MarketClient) QueryVenue(m *Market) *VenueQuery

QueryVenue queries the venue edge of a Market.

func (*MarketClient) Update

func (c *MarketClient) Update() *MarketUpdate

Update returns an update builder for Market.

func (*MarketClient) UpdateOne

func (c *MarketClient) UpdateOne(m *Market) *MarketUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MarketClient) UpdateOneID

func (c *MarketClient) UpdateOneID(id int) *MarketUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MarketClient) Use

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

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

type MarketConnection

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

MarketConnection is the connection containing edges to Market.

type MarketCreate

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

MarketCreate is the builder for creating a Market entity.

func (*MarketCreate) AddTradingPair

func (mc *MarketCreate) AddTradingPair(t ...*TradingPair) *MarketCreate

AddTradingPair adds the "trading_pair" edges to the TradingPair entity.

func (*MarketCreate) AddTradingPairIDs

func (mc *MarketCreate) AddTradingPairIDs(ids ...int) *MarketCreate

AddTradingPairIDs adds the "trading_pair" edge to the TradingPair entity by IDs.

func (*MarketCreate) Exec

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

Exec executes the query.

func (*MarketCreate) ExecContext

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

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

func (*MarketCreate) ExecX

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

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

func (*MarketCreate) Mutation

func (mc *MarketCreate) Mutation() *MarketMutation

Mutation returns the MarketMutation object of the builder.

func (*MarketCreate) OnConflict

func (mc *MarketCreate) OnConflict(opts ...sql.ConflictOption) *MarketUpsertOne

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

client.Market.Create().
	SetName(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.MarketUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*MarketCreate) OnConflictColumns

func (mc *MarketCreate) OnConflictColumns(columns ...string) *MarketUpsertOne

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

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

func (*MarketCreate) QueryContext

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

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

func (*MarketCreate) Save

func (mc *MarketCreate) Save(ctx context.Context) (*Market, error)

Save creates the Market in the database.

func (*MarketCreate) SaveX

func (mc *MarketCreate) SaveX(ctx context.Context) *Market

SaveX calls Save and panics if Save returns an error.

func (*MarketCreate) SetName

func (mc *MarketCreate) SetName(s string) *MarketCreate

SetName sets the "name" field.

func (*MarketCreate) SetType

func (mc *MarketCreate) SetType(m market.Type) *MarketCreate

SetType sets the "type" field.

func (*MarketCreate) SetVenue

func (mc *MarketCreate) SetVenue(v *Venue) *MarketCreate

SetVenue sets the "venue" edge to the Venue entity.

func (*MarketCreate) SetVenueID

func (mc *MarketCreate) SetVenueID(id int) *MarketCreate

SetVenueID sets the "venue" edge to the Venue entity by ID.

type MarketCreateBulk

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

MarketCreateBulk is the builder for creating many Market entities in bulk.

func (*MarketCreateBulk) Exec

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

Exec executes the query.

func (*MarketCreateBulk) ExecContext

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

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

func (*MarketCreateBulk) ExecX

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

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

func (*MarketCreateBulk) OnConflict

func (mcb *MarketCreateBulk) OnConflict(opts ...sql.ConflictOption) *MarketUpsertBulk

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

client.Market.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.MarketUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*MarketCreateBulk) OnConflictColumns

func (mcb *MarketCreateBulk) OnConflictColumns(columns ...string) *MarketUpsertBulk

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

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

func (*MarketCreateBulk) QueryContext

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

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

func (*MarketCreateBulk) Save

func (mcb *MarketCreateBulk) Save(ctx context.Context) ([]*Market, error)

Save creates the Market entities in the database.

func (*MarketCreateBulk) SaveX

func (mcb *MarketCreateBulk) SaveX(ctx context.Context) []*Market

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

type MarketDelete

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

MarketDelete is the builder for deleting a Market entity.

func (*MarketDelete) Exec

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

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

func (*MarketDelete) ExecContext

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

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

func (*MarketDelete) ExecX

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

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

func (*MarketDelete) QueryContext

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

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

func (*MarketDelete) Where

func (md *MarketDelete) Where(ps ...predicate.Market) *MarketDelete

Where appends a list predicates to the MarketDelete builder.

type MarketDeleteOne

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

MarketDeleteOne is the builder for deleting a single Market entity.

func (*MarketDeleteOne) Exec

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

Exec executes the deletion query.

func (*MarketDeleteOne) ExecX

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

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

func (*MarketDeleteOne) Where

func (mdo *MarketDeleteOne) Where(ps ...predicate.Market) *MarketDeleteOne

Where appends a list predicates to the MarketDelete builder.

type MarketEdge

type MarketEdge struct {
	Node   *Market `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

MarketEdge is the edge representation of Market.

type MarketEdges

type MarketEdges struct {
	// Venue holds the value of the venue edge.
	Venue *Venue `json:"venue,omitempty"`
	// TradingPair holds the value of the trading_pair edge.
	TradingPair []*TradingPair `json:"trading_pair,omitempty"`
	// contains filtered or unexported fields
}

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

func (MarketEdges) TradingPairOrErr

func (e MarketEdges) TradingPairOrErr() ([]*TradingPair, error)

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

func (MarketEdges) VenueOrErr

func (e MarketEdges) VenueOrErr() (*Venue, error)

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

type MarketFilter

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

MarketFilter provides a generic filtering capability at runtime for MarketQuery.

func (*MarketFilter) ExecContext

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

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

func (*MarketFilter) QueryContext

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

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

func (*MarketFilter) Where

func (f *MarketFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*MarketFilter) WhereHasTradingPair

func (f *MarketFilter) WhereHasTradingPair()

WhereHasTradingPair applies a predicate to check if query has an edge trading_pair.

func (*MarketFilter) WhereHasTradingPairWith

func (f *MarketFilter) WhereHasTradingPairWith(preds ...predicate.TradingPair)

WhereHasTradingPairWith applies a predicate to check if query has an edge trading_pair with a given conditions (other predicates).

func (*MarketFilter) WhereHasVenue

func (f *MarketFilter) WhereHasVenue()

WhereHasVenue applies a predicate to check if query has an edge venue.

func (*MarketFilter) WhereHasVenueWith

func (f *MarketFilter) WhereHasVenueWith(preds ...predicate.Venue)

WhereHasVenueWith applies a predicate to check if query has an edge venue with a given conditions (other predicates).

func (*MarketFilter) WhereID

func (f *MarketFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*MarketFilter) WhereName

func (f *MarketFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*MarketFilter) WhereType

func (f *MarketFilter) WhereType(p entql.StringP)

WhereType applies the entql string predicate on the type field.

type MarketGroupBy

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

MarketGroupBy is the group-by builder for Market entities.

func (*MarketGroupBy) Aggregate

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

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

func (*MarketGroupBy) Bool

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

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

func (*MarketGroupBy) BoolX

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

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

func (*MarketGroupBy) Bools

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

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

func (*MarketGroupBy) BoolsX

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

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

func (*MarketGroupBy) Float64

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

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

func (*MarketGroupBy) Float64X

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

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

func (*MarketGroupBy) Float64s

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

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

func (*MarketGroupBy) Float64sX

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

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

func (*MarketGroupBy) Int

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

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

func (*MarketGroupBy) IntX

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

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

func (*MarketGroupBy) Ints

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

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

func (*MarketGroupBy) IntsX

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

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

func (*MarketGroupBy) Scan

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

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

func (*MarketGroupBy) ScanX

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

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

func (*MarketGroupBy) String

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

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

func (*MarketGroupBy) StringX

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

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

func (*MarketGroupBy) Strings

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

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

func (*MarketGroupBy) StringsX

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

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

type MarketMutation

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

MarketMutation represents an operation that mutates the Market nodes in the graph.

func (*MarketMutation) AddField

func (m *MarketMutation) 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 (*MarketMutation) AddTradingPairIDs

func (m *MarketMutation) AddTradingPairIDs(ids ...int)

AddTradingPairIDs adds the "trading_pair" edge to the TradingPair entity by ids.

func (*MarketMutation) AddedEdges

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

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

func (*MarketMutation) AddedField

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

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

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

func (*MarketMutation) AddedIDs

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

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

func (*MarketMutation) ClearEdge

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

func (m *MarketMutation) 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 (*MarketMutation) ClearTradingPair

func (m *MarketMutation) ClearTradingPair()

ClearTradingPair clears the "trading_pair" edge to the TradingPair entity.

func (*MarketMutation) ClearVenue

func (m *MarketMutation) ClearVenue()

ClearVenue clears the "venue" edge to the Venue entity.

func (*MarketMutation) ClearedEdges

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

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

func (*MarketMutation) ClearedFields

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

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

func (MarketMutation) Client

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

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

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

func (*MarketMutation) ExecContext

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

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

func (*MarketMutation) Field

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

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

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

func (*MarketMutation) Fields

func (m *MarketMutation) 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 (*MarketMutation) Filter

func (m *MarketMutation) Filter() *MarketFilter

Filter returns an entql.Where implementation to apply filters on the MarketMutation builder.

func (*MarketMutation) GetType

func (m *MarketMutation) GetType() (r market.Type, exists bool)

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

func (*MarketMutation) ID

func (m *MarketMutation) ID() (id int, exists bool)

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

func (*MarketMutation) IDs

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

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

func (*MarketMutation) Name

func (m *MarketMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*MarketMutation) OldField

func (m *MarketMutation) 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 (*MarketMutation) OldName

func (m *MarketMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Market entity. If the Market 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 (*MarketMutation) OldType

func (m *MarketMutation) OldType(ctx context.Context) (v market.Type, err error)

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

func (m *MarketMutation) Op() Op

Op returns the operation name.

func (*MarketMutation) QueryContext

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

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

func (*MarketMutation) RemoveTradingPairIDs

func (m *MarketMutation) RemoveTradingPairIDs(ids ...int)

RemoveTradingPairIDs removes the "trading_pair" edge to the TradingPair entity by IDs.

func (*MarketMutation) RemovedEdges

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

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

func (*MarketMutation) RemovedIDs

func (m *MarketMutation) 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 (*MarketMutation) RemovedTradingPairIDs

func (m *MarketMutation) RemovedTradingPairIDs() (ids []int)

RemovedTradingPair returns the removed IDs of the "trading_pair" edge to the TradingPair entity.

func (*MarketMutation) ResetEdge

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

func (m *MarketMutation) 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 (*MarketMutation) ResetName

func (m *MarketMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*MarketMutation) ResetTradingPair

func (m *MarketMutation) ResetTradingPair()

ResetTradingPair resets all changes to the "trading_pair" edge.

func (*MarketMutation) ResetType

func (m *MarketMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*MarketMutation) ResetVenue

func (m *MarketMutation) ResetVenue()

ResetVenue resets all changes to the "venue" edge.

func (*MarketMutation) SetField

func (m *MarketMutation) 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 (*MarketMutation) SetName

func (m *MarketMutation) SetName(s string)

SetName sets the "name" field.

func (*MarketMutation) SetOp

func (m *MarketMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MarketMutation) SetType

func (m *MarketMutation) SetType(value market.Type)

SetType sets the "type" field.

func (*MarketMutation) SetVenueID

func (m *MarketMutation) SetVenueID(id int)

SetVenueID sets the "venue" edge to the Venue entity by id.

func (*MarketMutation) TradingPairCleared

func (m *MarketMutation) TradingPairCleared() bool

TradingPairCleared reports if the "trading_pair" edge to the TradingPair entity was cleared.

func (*MarketMutation) TradingPairIDs

func (m *MarketMutation) TradingPairIDs() (ids []int)

TradingPairIDs returns the "trading_pair" edge IDs in the mutation.

func (MarketMutation) Tx

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

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

func (*MarketMutation) Type

func (m *MarketMutation) Type() string

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

func (*MarketMutation) VenueCleared

func (m *MarketMutation) VenueCleared() bool

VenueCleared reports if the "venue" edge to the Venue entity was cleared.

func (*MarketMutation) VenueID

func (m *MarketMutation) VenueID() (id int, exists bool)

VenueID returns the "venue" edge ID in the mutation.

func (*MarketMutation) VenueIDs

func (m *MarketMutation) VenueIDs() (ids []int)

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

func (*MarketMutation) Where

func (m *MarketMutation) Where(ps ...predicate.Market)

Where appends a list predicates to the MarketMutation builder.

func (*MarketMutation) WhereP

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

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

type MarketOrder

type MarketOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *MarketOrderField `json:"field"`
}

MarketOrder defines the ordering of Market.

type MarketOrderField

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

MarketOrderField defines the ordering field of Market.

func (MarketOrderField) MarshalGQL

func (f MarketOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MarketOrderField) String

func (f MarketOrderField) String() string

String implement fmt.Stringer interface.

func (*MarketOrderField) UnmarshalGQL

func (f *MarketOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MarketPaginateOption

type MarketPaginateOption func(*marketPager) error

MarketPaginateOption enables pagination customization.

func WithMarketFilter

func WithMarketFilter(filter func(*MarketQuery) (*MarketQuery, error)) MarketPaginateOption

WithMarketFilter configures pagination filter.

func WithMarketOrder

func WithMarketOrder(order *MarketOrder) MarketPaginateOption

WithMarketOrder configures pagination ordering.

type MarketQuery

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

MarketQuery is the builder for querying Market entities.

func (*MarketQuery) Aggregate

func (mq *MarketQuery) Aggregate(fns ...AggregateFunc) *MarketSelect

Aggregate returns a MarketSelect configured with the given aggregations.

func (*MarketQuery) All

func (mq *MarketQuery) All(ctx context.Context) ([]*Market, error)

All executes the query and returns a list of Markets.

func (*MarketQuery) AllX

func (mq *MarketQuery) AllX(ctx context.Context) []*Market

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

func (*MarketQuery) Clone

func (mq *MarketQuery) Clone() *MarketQuery

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

func (*MarketQuery) CollectFields

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

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

func (*MarketQuery) Count

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

Count returns the count of the given query.

func (*MarketQuery) CountX

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

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

func (*MarketQuery) ExecContext

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

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

func (*MarketQuery) Exist

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

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

func (*MarketQuery) ExistX

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

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

func (*MarketQuery) Filter

func (mq *MarketQuery) Filter() *MarketFilter

Filter returns a Filter implementation to apply filters on the MarketQuery builder.

func (*MarketQuery) First

func (mq *MarketQuery) First(ctx context.Context) (*Market, error)

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

func (*MarketQuery) FirstID

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

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

func (*MarketQuery) FirstIDX

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

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

func (*MarketQuery) FirstX

func (mq *MarketQuery) FirstX(ctx context.Context) *Market

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

func (*MarketQuery) ForShare

func (mq *MarketQuery) ForShare(opts ...sql.LockOption) *MarketQuery

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

func (*MarketQuery) ForUpdate

func (mq *MarketQuery) ForUpdate(opts ...sql.LockOption) *MarketQuery

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

func (*MarketQuery) GroupBy

func (mq *MarketQuery) GroupBy(field string, fields ...string) *MarketGroupBy

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

client.Market.Query().
	GroupBy(market.FieldName).
	Aggregate(entities.Count()).
	Scan(ctx, &v)

func (*MarketQuery) IDs

func (mq *MarketQuery) IDs(ctx context.Context) ([]int, error)

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

func (*MarketQuery) IDsX

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

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

func (*MarketQuery) Limit

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

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

func (*MarketQuery) Modify

func (mq *MarketQuery) Modify(modifiers ...func(s *sql.Selector)) *MarketSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MarketQuery) Offset

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

Offset to start from.

func (*MarketQuery) Only

func (mq *MarketQuery) Only(ctx context.Context) (*Market, error)

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

func (*MarketQuery) OnlyID

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

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

func (*MarketQuery) OnlyIDX

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

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

func (*MarketQuery) OnlyX

func (mq *MarketQuery) OnlyX(ctx context.Context) *Market

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

func (*MarketQuery) Order

func (mq *MarketQuery) Order(o ...OrderFunc) *MarketQuery

Order specifies how the records should be ordered.

func (*MarketQuery) Paginate

func (m *MarketQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MarketPaginateOption,
) (*MarketConnection, error)

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

func (*MarketQuery) QueryContext

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

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

func (*MarketQuery) QueryTradingPair

func (mq *MarketQuery) QueryTradingPair() *TradingPairQuery

QueryTradingPair chains the current query on the "trading_pair" edge.

func (*MarketQuery) QueryVenue

func (mq *MarketQuery) QueryVenue() *VenueQuery

QueryVenue chains the current query on the "venue" edge.

func (*MarketQuery) Select

func (mq *MarketQuery) Select(fields ...string) *MarketSelect

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

client.Market.Query().
	Select(market.FieldName).
	Scan(ctx, &v)

func (*MarketQuery) Unique

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

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

func (mq *MarketQuery) Where(ps ...predicate.Market) *MarketQuery

Where adds a new predicate for the MarketQuery builder.

func (*MarketQuery) WithNamedTradingPair

func (mq *MarketQuery) WithNamedTradingPair(name string, opts ...func(*TradingPairQuery)) *MarketQuery

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

func (*MarketQuery) WithTradingPair

func (mq *MarketQuery) WithTradingPair(opts ...func(*TradingPairQuery)) *MarketQuery

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

func (*MarketQuery) WithVenue

func (mq *MarketQuery) WithVenue(opts ...func(*VenueQuery)) *MarketQuery

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

type MarketSelect

type MarketSelect struct {
	*MarketQuery
	// contains filtered or unexported fields
}

MarketSelect is the builder for selecting fields of Market entities.

func (*MarketSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*MarketSelect) Bool

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

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

func (*MarketSelect) BoolX

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

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

func (*MarketSelect) Bools

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

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

func (*MarketSelect) BoolsX

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

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

func (MarketSelect) ExecContext

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

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

func (*MarketSelect) Float64

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

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

func (*MarketSelect) Float64X

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

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

func (*MarketSelect) Float64s

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

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

func (*MarketSelect) Float64sX

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

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

func (*MarketSelect) Int

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

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

func (*MarketSelect) IntX

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

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

func (*MarketSelect) Ints

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

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

func (*MarketSelect) IntsX

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

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

func (*MarketSelect) Modify

func (ms *MarketSelect) Modify(modifiers ...func(s *sql.Selector)) *MarketSelect

Modify adds a query modifier for attaching custom logic to queries.

func (MarketSelect) QueryContext

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

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

func (*MarketSelect) Scan

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

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

func (*MarketSelect) ScanX

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

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

func (*MarketSelect) String

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

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

func (*MarketSelect) StringX

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

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

func (*MarketSelect) Strings

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

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

func (*MarketSelect) StringsX

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

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

type MarketUpdate

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

MarketUpdate is the builder for updating Market entities.

func (*MarketUpdate) AddTradingPair

func (mu *MarketUpdate) AddTradingPair(t ...*TradingPair) *MarketUpdate

AddTradingPair adds the "trading_pair" edges to the TradingPair entity.

func (*MarketUpdate) AddTradingPairIDs

func (mu *MarketUpdate) AddTradingPairIDs(ids ...int) *MarketUpdate

AddTradingPairIDs adds the "trading_pair" edge to the TradingPair entity by IDs.

func (*MarketUpdate) ClearTradingPair

func (mu *MarketUpdate) ClearTradingPair() *MarketUpdate

ClearTradingPair clears all "trading_pair" edges to the TradingPair entity.

func (*MarketUpdate) ClearVenue

func (mu *MarketUpdate) ClearVenue() *MarketUpdate

ClearVenue clears the "venue" edge to the Venue entity.

func (*MarketUpdate) Exec

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

Exec executes the query.

func (*MarketUpdate) ExecContext

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

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

func (*MarketUpdate) ExecX

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

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

func (*MarketUpdate) Modify

func (mu *MarketUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MarketUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MarketUpdate) Mutation

func (mu *MarketUpdate) Mutation() *MarketMutation

Mutation returns the MarketMutation object of the builder.

func (*MarketUpdate) QueryContext

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

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

func (*MarketUpdate) RemoveTradingPair

func (mu *MarketUpdate) RemoveTradingPair(t ...*TradingPair) *MarketUpdate

RemoveTradingPair removes "trading_pair" edges to TradingPair entities.

func (*MarketUpdate) RemoveTradingPairIDs

func (mu *MarketUpdate) RemoveTradingPairIDs(ids ...int) *MarketUpdate

RemoveTradingPairIDs removes the "trading_pair" edge to TradingPair entities by IDs.

func (*MarketUpdate) Save

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

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

func (*MarketUpdate) SaveX

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

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

func (*MarketUpdate) SetName

func (mu *MarketUpdate) SetName(s string) *MarketUpdate

SetName sets the "name" field.

func (*MarketUpdate) SetType

func (mu *MarketUpdate) SetType(m market.Type) *MarketUpdate

SetType sets the "type" field.

func (*MarketUpdate) SetVenue

func (mu *MarketUpdate) SetVenue(v *Venue) *MarketUpdate

SetVenue sets the "venue" edge to the Venue entity.

func (*MarketUpdate) SetVenueID

func (mu *MarketUpdate) SetVenueID(id int) *MarketUpdate

SetVenueID sets the "venue" edge to the Venue entity by ID.

func (*MarketUpdate) Where

func (mu *MarketUpdate) Where(ps ...predicate.Market) *MarketUpdate

Where appends a list predicates to the MarketUpdate builder.

type MarketUpdateOne

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

MarketUpdateOne is the builder for updating a single Market entity.

func (*MarketUpdateOne) AddTradingPair

func (muo *MarketUpdateOne) AddTradingPair(t ...*TradingPair) *MarketUpdateOne

AddTradingPair adds the "trading_pair" edges to the TradingPair entity.

func (*MarketUpdateOne) AddTradingPairIDs

func (muo *MarketUpdateOne) AddTradingPairIDs(ids ...int) *MarketUpdateOne

AddTradingPairIDs adds the "trading_pair" edge to the TradingPair entity by IDs.

func (*MarketUpdateOne) ClearTradingPair

func (muo *MarketUpdateOne) ClearTradingPair() *MarketUpdateOne

ClearTradingPair clears all "trading_pair" edges to the TradingPair entity.

func (*MarketUpdateOne) ClearVenue

func (muo *MarketUpdateOne) ClearVenue() *MarketUpdateOne

ClearVenue clears the "venue" edge to the Venue entity.

func (*MarketUpdateOne) Exec

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

Exec executes the query on the entity.

func (*MarketUpdateOne) ExecContext

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

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

func (*MarketUpdateOne) ExecX

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

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

func (*MarketUpdateOne) Modify

func (muo *MarketUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MarketUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MarketUpdateOne) Mutation

func (muo *MarketUpdateOne) Mutation() *MarketMutation

Mutation returns the MarketMutation object of the builder.

func (*MarketUpdateOne) QueryContext

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

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

func (*MarketUpdateOne) RemoveTradingPair

func (muo *MarketUpdateOne) RemoveTradingPair(t ...*TradingPair) *MarketUpdateOne

RemoveTradingPair removes "trading_pair" edges to TradingPair entities.

func (*MarketUpdateOne) RemoveTradingPairIDs

func (muo *MarketUpdateOne) RemoveTradingPairIDs(ids ...int) *MarketUpdateOne

RemoveTradingPairIDs removes the "trading_pair" edge to TradingPair entities by IDs.

func (*MarketUpdateOne) Save

func (muo *MarketUpdateOne) Save(ctx context.Context) (*Market, error)

Save executes the query and returns the updated Market entity.

func (*MarketUpdateOne) SaveX

func (muo *MarketUpdateOne) SaveX(ctx context.Context) *Market

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

func (*MarketUpdateOne) Select

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

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

func (*MarketUpdateOne) SetName

func (muo *MarketUpdateOne) SetName(s string) *MarketUpdateOne

SetName sets the "name" field.

func (*MarketUpdateOne) SetType

func (muo *MarketUpdateOne) SetType(m market.Type) *MarketUpdateOne

SetType sets the "type" field.

func (*MarketUpdateOne) SetVenue

func (muo *MarketUpdateOne) SetVenue(v *Venue) *MarketUpdateOne

SetVenue sets the "venue" edge to the Venue entity.

func (*MarketUpdateOne) SetVenueID

func (muo *MarketUpdateOne) SetVenueID(id int) *MarketUpdateOne

SetVenueID sets the "venue" edge to the Venue entity by ID.

type MarketUpsert

type MarketUpsert struct {
	*sql.UpdateSet
}

MarketUpsert is the "OnConflict" setter.

func (*MarketUpsert) SetName

func (u *MarketUpsert) SetName(v string) *MarketUpsert

SetName sets the "name" field.

func (*MarketUpsert) SetType

func (u *MarketUpsert) SetType(v market.Type) *MarketUpsert

SetType sets the "type" field.

func (*MarketUpsert) UpdateName

func (u *MarketUpsert) UpdateName() *MarketUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*MarketUpsert) UpdateType

func (u *MarketUpsert) UpdateType() *MarketUpsert

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

type MarketUpsertBulk

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

MarketUpsertBulk is the builder for "upsert"-ing a bulk of Market nodes.

func (*MarketUpsertBulk) DoNothing

func (u *MarketUpsertBulk) DoNothing() *MarketUpsertBulk

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

func (*MarketUpsertBulk) Exec

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

Exec executes the query.

func (*MarketUpsertBulk) ExecX

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

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

func (*MarketUpsertBulk) Ignore

func (u *MarketUpsertBulk) Ignore() *MarketUpsertBulk

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

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

func (*MarketUpsertBulk) SetName

func (u *MarketUpsertBulk) SetName(v string) *MarketUpsertBulk

SetName sets the "name" field.

func (*MarketUpsertBulk) SetType

SetType sets the "type" field.

func (*MarketUpsertBulk) Update

func (u *MarketUpsertBulk) Update(set func(*MarketUpsert)) *MarketUpsertBulk

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

func (*MarketUpsertBulk) UpdateName

func (u *MarketUpsertBulk) UpdateName() *MarketUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*MarketUpsertBulk) UpdateNewValues

func (u *MarketUpsertBulk) UpdateNewValues() *MarketUpsertBulk

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

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

func (*MarketUpsertBulk) UpdateType

func (u *MarketUpsertBulk) UpdateType() *MarketUpsertBulk

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

type MarketUpsertOne

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

MarketUpsertOne is the builder for "upsert"-ing

one Market node.

func (*MarketUpsertOne) DoNothing

func (u *MarketUpsertOne) DoNothing() *MarketUpsertOne

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

func (*MarketUpsertOne) Exec

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

Exec executes the query.

func (*MarketUpsertOne) ExecX

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

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

func (*MarketUpsertOne) ID

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

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

func (*MarketUpsertOne) IDX

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

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

func (*MarketUpsertOne) Ignore

func (u *MarketUpsertOne) Ignore() *MarketUpsertOne

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

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

func (*MarketUpsertOne) SetName

func (u *MarketUpsertOne) SetName(v string) *MarketUpsertOne

SetName sets the "name" field.

func (*MarketUpsertOne) SetType

func (u *MarketUpsertOne) SetType(v market.Type) *MarketUpsertOne

SetType sets the "type" field.

func (*MarketUpsertOne) Update

func (u *MarketUpsertOne) Update(set func(*MarketUpsert)) *MarketUpsertOne

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

func (*MarketUpsertOne) UpdateName

func (u *MarketUpsertOne) UpdateName() *MarketUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*MarketUpsertOne) UpdateNewValues

func (u *MarketUpsertOne) UpdateNewValues() *MarketUpsertOne

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

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

func (*MarketUpsertOne) UpdateType

func (u *MarketUpsertOne) UpdateType() *MarketUpsertOne

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

type MarketWhereInput

type MarketWhereInput struct {
	Predicates []predicate.Market  `json:"-"`
	Not        *MarketWhereInput   `json:"not,omitempty"`
	Or         []*MarketWhereInput `json:"or,omitempty"`
	And        []*MarketWhereInput `json:"and,omitempty"`

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

	// "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"`

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

	// "venue" edge predicates.
	HasVenue     *bool              `json:"hasVenue,omitempty"`
	HasVenueWith []*VenueWhereInput `json:"hasVenueWith,omitempty"`

	// "trading_pair" edge predicates.
	HasTradingPair     *bool                    `json:"hasTradingPair,omitempty"`
	HasTradingPairWith []*TradingPairWhereInput `json:"hasTradingPairWith,omitempty"`
}

MarketWhereInput represents a where input for filtering Market queries.

func (*MarketWhereInput) AddPredicates

func (i *MarketWhereInput) AddPredicates(predicates ...predicate.Market)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MarketWhereInput) Filter

func (i *MarketWhereInput) Filter(q *MarketQuery) (*MarketQuery, error)

Filter applies the MarketWhereInput filter on the MarketQuery builder.

func (*MarketWhereInput) P

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

type Markets

type Markets []*Market

Markets is a parsable slice of Market.

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

type NotFoundError

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

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func AlternateSchema

func AlternateSchema(schemaConfig SchemaConfig) Option

AlternateSchemas allows alternate schema names to be passed into ent operations.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection 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 Outbox

type Outbox struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Timestamp holds the value of the "timestamp" field.
	Timestamp time.Time `json:"timestamp,omitempty"`
	// Topic holds the value of the "topic" field.
	Topic string `json:"topic,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Payload holds the value of the "payload" field.
	Payload []byte `json:"payload,omitempty"`
	// Headers holds the value of the "headers" field.
	Headers map[string]string `json:"headers,omitempty"`
	// RetryCount holds the value of the "retry_count" field.
	RetryCount int `json:"retry_count,omitempty"`
	// Status holds the value of the "status" field.
	Status outbox.Status `json:"status,omitempty"`
	// LastRetry holds the value of the "last_retry" field.
	LastRetry time.Time `json:"last_retry,omitempty"`
	// ProcessingErrors holds the value of the "processing_errors" field.
	ProcessingErrors []string `json:"processing_errors,omitempty"`
	// contains filtered or unexported fields
}

Outbox is the model entity for the Outbox schema.

func (*Outbox) ExecContext

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

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

func (*Outbox) IsNode

func (n *Outbox) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Outbox) QueryContext

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

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

func (*Outbox) String

func (o *Outbox) String() string

String implements the fmt.Stringer.

func (*Outbox) ToEdge

func (o *Outbox) ToEdge(order *OutboxOrder) *OutboxEdge

ToEdge converts Outbox into OutboxEdge.

func (*Outbox) Unwrap

func (o *Outbox) Unwrap() *Outbox

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

func (o *Outbox) Update() *OutboxUpdateOne

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

type OutboxClient

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

OutboxClient is a client for the Outbox schema.

func NewOutboxClient

func NewOutboxClient(c config) *OutboxClient

NewOutboxClient returns a client for the Outbox from the given config.

func (*OutboxClient) Create

func (c *OutboxClient) Create() *OutboxCreate

Create returns a builder for creating a Outbox entity.

func (*OutboxClient) CreateBulk

func (c *OutboxClient) CreateBulk(builders ...*OutboxCreate) *OutboxCreateBulk

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

func (*OutboxClient) Delete

func (c *OutboxClient) Delete() *OutboxDelete

Delete returns a delete builder for Outbox.

func (*OutboxClient) DeleteOne

func (c *OutboxClient) DeleteOne(o *Outbox) *OutboxDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OutboxClient) DeleteOneID

func (c *OutboxClient) DeleteOneID(id int) *OutboxDeleteOne

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

func (*OutboxClient) ExecContext

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

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

func (*OutboxClient) Get

func (c *OutboxClient) Get(ctx context.Context, id int) (*Outbox, error)

Get returns a Outbox entity by its id.

func (*OutboxClient) GetX

func (c *OutboxClient) GetX(ctx context.Context, id int) *Outbox

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

func (*OutboxClient) Hooks

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

Hooks returns the client hooks.

func (*OutboxClient) Intercept

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

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

func (*OutboxClient) Interceptors

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

Interceptors returns the client interceptors.

func (*OutboxClient) Query

func (c *OutboxClient) Query() *OutboxQuery

Query returns a query builder for Outbox.

func (*OutboxClient) QueryContext

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

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

func (*OutboxClient) Update

func (c *OutboxClient) Update() *OutboxUpdate

Update returns an update builder for Outbox.

func (*OutboxClient) UpdateOne

func (c *OutboxClient) UpdateOne(o *Outbox) *OutboxUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OutboxClient) UpdateOneID

func (c *OutboxClient) UpdateOneID(id int) *OutboxUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OutboxClient) Use

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

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

type OutboxConnection

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

OutboxConnection is the connection containing edges to Outbox.

type OutboxCreate

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

OutboxCreate is the builder for creating a Outbox entity.

func (*OutboxCreate) Exec

func (oc *OutboxCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OutboxCreate) ExecContext

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

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

func (*OutboxCreate) ExecX

func (oc *OutboxCreate) ExecX(ctx context.Context)

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

func (*OutboxCreate) Mutation

func (oc *OutboxCreate) Mutation() *OutboxMutation

Mutation returns the OutboxMutation object of the builder.

func (*OutboxCreate) OnConflict

func (oc *OutboxCreate) OnConflict(opts ...sql.ConflictOption) *OutboxUpsertOne

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

client.Outbox.Create().
	SetTimestamp(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.OutboxUpsert) {
		SetTimestamp(v+v).
	}).
	Exec(ctx)

func (*OutboxCreate) OnConflictColumns

func (oc *OutboxCreate) OnConflictColumns(columns ...string) *OutboxUpsertOne

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

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

func (*OutboxCreate) QueryContext

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

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

func (*OutboxCreate) Save

func (oc *OutboxCreate) Save(ctx context.Context) (*Outbox, error)

Save creates the Outbox in the database.

func (*OutboxCreate) SaveX

func (oc *OutboxCreate) SaveX(ctx context.Context) *Outbox

SaveX calls Save and panics if Save returns an error.

func (*OutboxCreate) SetHeaders

func (oc *OutboxCreate) SetHeaders(m map[string]string) *OutboxCreate

SetHeaders sets the "headers" field.

func (*OutboxCreate) SetKey

func (oc *OutboxCreate) SetKey(s string) *OutboxCreate

SetKey sets the "key" field.

func (*OutboxCreate) SetLastRetry

func (oc *OutboxCreate) SetLastRetry(t time.Time) *OutboxCreate

SetLastRetry sets the "last_retry" field.

func (*OutboxCreate) SetNillableLastRetry

func (oc *OutboxCreate) SetNillableLastRetry(t *time.Time) *OutboxCreate

SetNillableLastRetry sets the "last_retry" field if the given value is not nil.

func (*OutboxCreate) SetPayload

func (oc *OutboxCreate) SetPayload(b []byte) *OutboxCreate

SetPayload sets the "payload" field.

func (*OutboxCreate) SetProcessingErrors

func (oc *OutboxCreate) SetProcessingErrors(s []string) *OutboxCreate

SetProcessingErrors sets the "processing_errors" field.

func (*OutboxCreate) SetRetryCount

func (oc *OutboxCreate) SetRetryCount(i int) *OutboxCreate

SetRetryCount sets the "retry_count" field.

func (*OutboxCreate) SetStatus

func (oc *OutboxCreate) SetStatus(o outbox.Status) *OutboxCreate

SetStatus sets the "status" field.

func (*OutboxCreate) SetTimestamp

func (oc *OutboxCreate) SetTimestamp(t time.Time) *OutboxCreate

SetTimestamp sets the "timestamp" field.

func (*OutboxCreate) SetTopic

func (oc *OutboxCreate) SetTopic(s string) *OutboxCreate

SetTopic sets the "topic" field.

type OutboxCreateBulk

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

OutboxCreateBulk is the builder for creating many Outbox entities in bulk.

func (*OutboxCreateBulk) Exec

func (ocb *OutboxCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OutboxCreateBulk) ExecContext

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

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

func (*OutboxCreateBulk) ExecX

func (ocb *OutboxCreateBulk) ExecX(ctx context.Context)

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

func (*OutboxCreateBulk) OnConflict

func (ocb *OutboxCreateBulk) OnConflict(opts ...sql.ConflictOption) *OutboxUpsertBulk

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

client.Outbox.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.OutboxUpsert) {
		SetTimestamp(v+v).
	}).
	Exec(ctx)

func (*OutboxCreateBulk) OnConflictColumns

func (ocb *OutboxCreateBulk) OnConflictColumns(columns ...string) *OutboxUpsertBulk

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

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

func (*OutboxCreateBulk) QueryContext

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

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

func (*OutboxCreateBulk) Save

func (ocb *OutboxCreateBulk) Save(ctx context.Context) ([]*Outbox, error)

Save creates the Outbox entities in the database.

func (*OutboxCreateBulk) SaveX

func (ocb *OutboxCreateBulk) SaveX(ctx context.Context) []*Outbox

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

type OutboxDelete

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

OutboxDelete is the builder for deleting a Outbox entity.

func (*OutboxDelete) Exec

func (od *OutboxDelete) Exec(ctx context.Context) (int, error)

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

func (*OutboxDelete) ExecContext

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

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

func (*OutboxDelete) ExecX

func (od *OutboxDelete) ExecX(ctx context.Context) int

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

func (*OutboxDelete) QueryContext

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

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

func (*OutboxDelete) Where

func (od *OutboxDelete) Where(ps ...predicate.Outbox) *OutboxDelete

Where appends a list predicates to the OutboxDelete builder.

type OutboxDeleteOne

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

OutboxDeleteOne is the builder for deleting a single Outbox entity.

func (*OutboxDeleteOne) Exec

func (odo *OutboxDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OutboxDeleteOne) ExecX

func (odo *OutboxDeleteOne) ExecX(ctx context.Context)

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

func (*OutboxDeleteOne) Where

func (odo *OutboxDeleteOne) Where(ps ...predicate.Outbox) *OutboxDeleteOne

Where appends a list predicates to the OutboxDelete builder.

type OutboxEdge

type OutboxEdge struct {
	Node   *Outbox `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

OutboxEdge is the edge representation of Outbox.

type OutboxFilter

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

OutboxFilter provides a generic filtering capability at runtime for OutboxQuery.

func (*OutboxFilter) ExecContext

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

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

func (*OutboxFilter) QueryContext

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

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

func (*OutboxFilter) Where

func (f *OutboxFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*OutboxFilter) WhereHeaders

func (f *OutboxFilter) WhereHeaders(p entql.BytesP)

WhereHeaders applies the entql json.RawMessage predicate on the headers field.

func (*OutboxFilter) WhereID

func (f *OutboxFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*OutboxFilter) WhereKey

func (f *OutboxFilter) WhereKey(p entql.StringP)

WhereKey applies the entql string predicate on the key field.

func (*OutboxFilter) WhereLastRetry

func (f *OutboxFilter) WhereLastRetry(p entql.TimeP)

WhereLastRetry applies the entql time.Time predicate on the last_retry field.

func (*OutboxFilter) WherePayload

func (f *OutboxFilter) WherePayload(p entql.BytesP)

WherePayload applies the entql []byte predicate on the payload field.

func (*OutboxFilter) WhereProcessingErrors

func (f *OutboxFilter) WhereProcessingErrors(p entql.BytesP)

WhereProcessingErrors applies the entql json.RawMessage predicate on the processing_errors field.

func (*OutboxFilter) WhereRetryCount

func (f *OutboxFilter) WhereRetryCount(p entql.IntP)

WhereRetryCount applies the entql int predicate on the retry_count field.

func (*OutboxFilter) WhereStatus

func (f *OutboxFilter) WhereStatus(p entql.StringP)

WhereStatus applies the entql string predicate on the status field.

func (*OutboxFilter) WhereTimestamp

func (f *OutboxFilter) WhereTimestamp(p entql.TimeP)

WhereTimestamp applies the entql time.Time predicate on the timestamp field.

func (*OutboxFilter) WhereTopic

func (f *OutboxFilter) WhereTopic(p entql.StringP)

WhereTopic applies the entql string predicate on the topic field.

type OutboxGroupBy

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

OutboxGroupBy is the group-by builder for Outbox entities.

func (*OutboxGroupBy) Aggregate

func (ogb *OutboxGroupBy) Aggregate(fns ...AggregateFunc) *OutboxGroupBy

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

func (*OutboxGroupBy) Bool

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

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

func (*OutboxGroupBy) BoolX

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

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

func (*OutboxGroupBy) Bools

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

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

func (*OutboxGroupBy) BoolsX

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

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

func (*OutboxGroupBy) Float64

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

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

func (*OutboxGroupBy) Float64X

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

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

func (*OutboxGroupBy) Float64s

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

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

func (*OutboxGroupBy) Float64sX

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

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

func (*OutboxGroupBy) Int

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

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

func (*OutboxGroupBy) IntX

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

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

func (*OutboxGroupBy) Ints

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

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

func (*OutboxGroupBy) IntsX

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

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

func (*OutboxGroupBy) Scan

func (ogb *OutboxGroupBy) Scan(ctx context.Context, v any) error

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

func (*OutboxGroupBy) ScanX

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

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

func (*OutboxGroupBy) String

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

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

func (*OutboxGroupBy) StringX

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

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

func (*OutboxGroupBy) Strings

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

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

func (*OutboxGroupBy) StringsX

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

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

type OutboxMutation

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

OutboxMutation represents an operation that mutates the Outbox nodes in the graph.

func (*OutboxMutation) AddField

func (m *OutboxMutation) 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 (*OutboxMutation) AddRetryCount

func (m *OutboxMutation) AddRetryCount(i int)

AddRetryCount adds i to the "retry_count" field.

func (*OutboxMutation) AddedEdges

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

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

func (*OutboxMutation) AddedField

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

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

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

func (*OutboxMutation) AddedIDs

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

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

func (*OutboxMutation) AddedRetryCount

func (m *OutboxMutation) AddedRetryCount() (r int, exists bool)

AddedRetryCount returns the value that was added to the "retry_count" field in this mutation.

func (*OutboxMutation) AppendProcessingErrors

func (m *OutboxMutation) AppendProcessingErrors(s []string)

AppendProcessingErrors adds s to the "processing_errors" field.

func (*OutboxMutation) AppendedProcessingErrors

func (m *OutboxMutation) AppendedProcessingErrors() ([]string, bool)

AppendedProcessingErrors returns the list of values that were appended to the "processing_errors" field in this mutation.

func (*OutboxMutation) ClearEdge

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

func (m *OutboxMutation) 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 (*OutboxMutation) ClearLastRetry

func (m *OutboxMutation) ClearLastRetry()

ClearLastRetry clears the value of the "last_retry" field.

func (*OutboxMutation) ClearProcessingErrors

func (m *OutboxMutation) ClearProcessingErrors()

ClearProcessingErrors clears the value of the "processing_errors" field.

func (*OutboxMutation) ClearedEdges

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

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

func (*OutboxMutation) ClearedFields

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

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

func (OutboxMutation) Client

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

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

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

func (*OutboxMutation) ExecContext

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

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

func (*OutboxMutation) Field

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

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

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

func (*OutboxMutation) Fields

func (m *OutboxMutation) 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 (*OutboxMutation) Filter

func (m *OutboxMutation) Filter() *OutboxFilter

Filter returns an entql.Where implementation to apply filters on the OutboxMutation builder.

func (*OutboxMutation) Headers

func (m *OutboxMutation) Headers() (r map[string]string, exists bool)

Headers returns the value of the "headers" field in the mutation.

func (*OutboxMutation) ID

func (m *OutboxMutation) ID() (id int, exists bool)

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

func (*OutboxMutation) IDs

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

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

func (*OutboxMutation) Key

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

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

func (*OutboxMutation) LastRetry

func (m *OutboxMutation) LastRetry() (r time.Time, exists bool)

LastRetry returns the value of the "last_retry" field in the mutation.

func (*OutboxMutation) LastRetryCleared

func (m *OutboxMutation) LastRetryCleared() bool

LastRetryCleared returns if the "last_retry" field was cleared in this mutation.

func (*OutboxMutation) OldField

func (m *OutboxMutation) 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 (*OutboxMutation) OldHeaders

func (m *OutboxMutation) OldHeaders(ctx context.Context) (v map[string]string, err error)

OldHeaders returns the old "headers" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldKey

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

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

func (m *OutboxMutation) OldLastRetry(ctx context.Context) (v time.Time, err error)

OldLastRetry returns the old "last_retry" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldPayload

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

OldPayload returns the old "payload" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldProcessingErrors

func (m *OutboxMutation) OldProcessingErrors(ctx context.Context) (v []string, err error)

OldProcessingErrors returns the old "processing_errors" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldRetryCount

func (m *OutboxMutation) OldRetryCount(ctx context.Context) (v int, err error)

OldRetryCount returns the old "retry_count" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldStatus

func (m *OutboxMutation) OldStatus(ctx context.Context) (v outbox.Status, err error)

OldStatus returns the old "status" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldTimestamp

func (m *OutboxMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)

OldTimestamp returns the old "timestamp" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldTopic

func (m *OutboxMutation) OldTopic(ctx context.Context) (v string, err error)

OldTopic returns the old "topic" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) Op

func (m *OutboxMutation) Op() Op

Op returns the operation name.

func (*OutboxMutation) Payload

func (m *OutboxMutation) Payload() (r []byte, exists bool)

Payload returns the value of the "payload" field in the mutation.

func (*OutboxMutation) ProcessingErrors

func (m *OutboxMutation) ProcessingErrors() (r []string, exists bool)

ProcessingErrors returns the value of the "processing_errors" field in the mutation.

func (*OutboxMutation) ProcessingErrorsCleared

func (m *OutboxMutation) ProcessingErrorsCleared() bool

ProcessingErrorsCleared returns if the "processing_errors" field was cleared in this mutation.

func (*OutboxMutation) QueryContext

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

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

func (*OutboxMutation) RemovedEdges

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

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

func (*OutboxMutation) RemovedIDs

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

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

func (m *OutboxMutation) 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 (*OutboxMutation) ResetHeaders

func (m *OutboxMutation) ResetHeaders()

ResetHeaders resets all changes to the "headers" field.

func (*OutboxMutation) ResetKey

func (m *OutboxMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*OutboxMutation) ResetLastRetry

func (m *OutboxMutation) ResetLastRetry()

ResetLastRetry resets all changes to the "last_retry" field.

func (*OutboxMutation) ResetPayload

func (m *OutboxMutation) ResetPayload()

ResetPayload resets all changes to the "payload" field.

func (*OutboxMutation) ResetProcessingErrors

func (m *OutboxMutation) ResetProcessingErrors()

ResetProcessingErrors resets all changes to the "processing_errors" field.

func (*OutboxMutation) ResetRetryCount

func (m *OutboxMutation) ResetRetryCount()

ResetRetryCount resets all changes to the "retry_count" field.

func (*OutboxMutation) ResetStatus

func (m *OutboxMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*OutboxMutation) ResetTimestamp

func (m *OutboxMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*OutboxMutation) ResetTopic

func (m *OutboxMutation) ResetTopic()

ResetTopic resets all changes to the "topic" field.

func (*OutboxMutation) RetryCount

func (m *OutboxMutation) RetryCount() (r int, exists bool)

RetryCount returns the value of the "retry_count" field in the mutation.

func (*OutboxMutation) SetField

func (m *OutboxMutation) 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 (*OutboxMutation) SetHeaders

func (m *OutboxMutation) SetHeaders(value map[string]string)

SetHeaders sets the "headers" field.

func (*OutboxMutation) SetKey

func (m *OutboxMutation) SetKey(s string)

SetKey sets the "key" field.

func (*OutboxMutation) SetLastRetry

func (m *OutboxMutation) SetLastRetry(t time.Time)

SetLastRetry sets the "last_retry" field.

func (*OutboxMutation) SetOp

func (m *OutboxMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OutboxMutation) SetPayload

func (m *OutboxMutation) SetPayload(b []byte)

SetPayload sets the "payload" field.

func (*OutboxMutation) SetProcessingErrors

func (m *OutboxMutation) SetProcessingErrors(s []string)

SetProcessingErrors sets the "processing_errors" field.

func (*OutboxMutation) SetRetryCount

func (m *OutboxMutation) SetRetryCount(i int)

SetRetryCount sets the "retry_count" field.

func (*OutboxMutation) SetStatus

func (m *OutboxMutation) SetStatus(o outbox.Status)

SetStatus sets the "status" field.

func (*OutboxMutation) SetTimestamp

func (m *OutboxMutation) SetTimestamp(t time.Time)

SetTimestamp sets the "timestamp" field.

func (*OutboxMutation) SetTopic

func (m *OutboxMutation) SetTopic(s string)

SetTopic sets the "topic" field.

func (*OutboxMutation) Status

func (m *OutboxMutation) Status() (r outbox.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*OutboxMutation) Timestamp

func (m *OutboxMutation) Timestamp() (r time.Time, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (*OutboxMutation) Topic

func (m *OutboxMutation) Topic() (r string, exists bool)

Topic returns the value of the "topic" field in the mutation.

func (OutboxMutation) Tx

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

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

func (*OutboxMutation) Type

func (m *OutboxMutation) Type() string

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

func (*OutboxMutation) Where

func (m *OutboxMutation) Where(ps ...predicate.Outbox)

Where appends a list predicates to the OutboxMutation builder.

func (*OutboxMutation) WhereP

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

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

type OutboxOrder

type OutboxOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *OutboxOrderField `json:"field"`
}

OutboxOrder defines the ordering of Outbox.

type OutboxOrderField

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

OutboxOrderField defines the ordering field of Outbox.

type OutboxPaginateOption

type OutboxPaginateOption func(*outboxPager) error

OutboxPaginateOption enables pagination customization.

func WithOutboxFilter

func WithOutboxFilter(filter func(*OutboxQuery) (*OutboxQuery, error)) OutboxPaginateOption

WithOutboxFilter configures pagination filter.

func WithOutboxOrder

func WithOutboxOrder(order *OutboxOrder) OutboxPaginateOption

WithOutboxOrder configures pagination ordering.

type OutboxQuery

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

OutboxQuery is the builder for querying Outbox entities.

func (*OutboxQuery) Aggregate

func (oq *OutboxQuery) Aggregate(fns ...AggregateFunc) *OutboxSelect

Aggregate returns a OutboxSelect configured with the given aggregations.

func (*OutboxQuery) All

func (oq *OutboxQuery) All(ctx context.Context) ([]*Outbox, error)

All executes the query and returns a list of Outboxes.

func (*OutboxQuery) AllX

func (oq *OutboxQuery) AllX(ctx context.Context) []*Outbox

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

func (*OutboxQuery) Clone

func (oq *OutboxQuery) Clone() *OutboxQuery

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

func (*OutboxQuery) CollectFields

func (o *OutboxQuery) CollectFields(ctx context.Context, satisfies ...string) (*OutboxQuery, error)

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

func (*OutboxQuery) Count

func (oq *OutboxQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OutboxQuery) CountX

func (oq *OutboxQuery) CountX(ctx context.Context) int

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

func (*OutboxQuery) ExecContext

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

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

func (*OutboxQuery) Exist

func (oq *OutboxQuery) Exist(ctx context.Context) (bool, error)

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

func (*OutboxQuery) ExistX

func (oq *OutboxQuery) ExistX(ctx context.Context) bool

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

func (*OutboxQuery) Filter

func (oq *OutboxQuery) Filter() *OutboxFilter

Filter returns a Filter implementation to apply filters on the OutboxQuery builder.

func (*OutboxQuery) First

func (oq *OutboxQuery) First(ctx context.Context) (*Outbox, error)

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

func (*OutboxQuery) FirstID

func (oq *OutboxQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*OutboxQuery) FirstIDX

func (oq *OutboxQuery) FirstIDX(ctx context.Context) int

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

func (*OutboxQuery) FirstX

func (oq *OutboxQuery) FirstX(ctx context.Context) *Outbox

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

func (*OutboxQuery) ForShare

func (oq *OutboxQuery) ForShare(opts ...sql.LockOption) *OutboxQuery

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

func (*OutboxQuery) ForUpdate

func (oq *OutboxQuery) ForUpdate(opts ...sql.LockOption) *OutboxQuery

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

func (*OutboxQuery) GroupBy

func (oq *OutboxQuery) GroupBy(field string, fields ...string) *OutboxGroupBy

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 {
	Timestamp time.Time `json:"timestamp,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Outbox.Query().
	GroupBy(outbox.FieldTimestamp).
	Aggregate(entities.Count()).
	Scan(ctx, &v)

func (*OutboxQuery) IDs

func (oq *OutboxQuery) IDs(ctx context.Context) ([]int, error)

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

func (*OutboxQuery) IDsX

func (oq *OutboxQuery) IDsX(ctx context.Context) []int

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

func (*OutboxQuery) Limit

func (oq *OutboxQuery) Limit(limit int) *OutboxQuery

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

func (*OutboxQuery) Modify

func (oq *OutboxQuery) Modify(modifiers ...func(s *sql.Selector)) *OutboxSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*OutboxQuery) Offset

func (oq *OutboxQuery) Offset(offset int) *OutboxQuery

Offset to start from.

func (*OutboxQuery) Only

func (oq *OutboxQuery) Only(ctx context.Context) (*Outbox, error)

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

func (*OutboxQuery) OnlyID

func (oq *OutboxQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*OutboxQuery) OnlyIDX

func (oq *OutboxQuery) OnlyIDX(ctx context.Context) int

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

func (*OutboxQuery) OnlyX

func (oq *OutboxQuery) OnlyX(ctx context.Context) *Outbox

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

func (*OutboxQuery) Order

func (oq *OutboxQuery) Order(o ...OrderFunc) *OutboxQuery

Order specifies how the records should be ordered.

func (*OutboxQuery) Paginate

func (o *OutboxQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OutboxPaginateOption,
) (*OutboxConnection, error)

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

func (*OutboxQuery) QueryContext

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

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

func (*OutboxQuery) Select

func (oq *OutboxQuery) Select(fields ...string) *OutboxSelect

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 {
	Timestamp time.Time `json:"timestamp,omitempty"`
}

client.Outbox.Query().
	Select(outbox.FieldTimestamp).
	Scan(ctx, &v)

func (*OutboxQuery) Unique

func (oq *OutboxQuery) Unique(unique bool) *OutboxQuery

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

func (oq *OutboxQuery) Where(ps ...predicate.Outbox) *OutboxQuery

Where adds a new predicate for the OutboxQuery builder.

type OutboxSelect

type OutboxSelect struct {
	*OutboxQuery
	// contains filtered or unexported fields
}

OutboxSelect is the builder for selecting fields of Outbox entities.

func (*OutboxSelect) Aggregate

func (os *OutboxSelect) Aggregate(fns ...AggregateFunc) *OutboxSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OutboxSelect) Bool

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

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

func (*OutboxSelect) BoolX

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

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

func (*OutboxSelect) Bools

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

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

func (*OutboxSelect) BoolsX

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

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

func (OutboxSelect) ExecContext

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

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

func (*OutboxSelect) Float64

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

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

func (*OutboxSelect) Float64X

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

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

func (*OutboxSelect) Float64s

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

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

func (*OutboxSelect) Float64sX

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

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

func (*OutboxSelect) Int

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

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

func (*OutboxSelect) IntX

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

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

func (*OutboxSelect) Ints

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

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

func (*OutboxSelect) IntsX

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

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

func (*OutboxSelect) Modify

func (os *OutboxSelect) Modify(modifiers ...func(s *sql.Selector)) *OutboxSelect

Modify adds a query modifier for attaching custom logic to queries.

func (OutboxSelect) QueryContext

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

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

func (*OutboxSelect) Scan

func (os *OutboxSelect) Scan(ctx context.Context, v any) error

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

func (*OutboxSelect) ScanX

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

ScanX is like Scan, but panics if an error occurs.

func (*OutboxSelect) String

func (s *OutboxSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OutboxSelect) StringX

func (s *OutboxSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OutboxSelect) Strings

func (s *OutboxSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OutboxSelect) StringsX

func (s *OutboxSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OutboxUpdate

type OutboxUpdate struct {
	// contains filtered or unexported fields
}

OutboxUpdate is the builder for updating Outbox entities.

func (*OutboxUpdate) AddRetryCount

func (ou *OutboxUpdate) AddRetryCount(i int) *OutboxUpdate

AddRetryCount adds i to the "retry_count" field.

func (*OutboxUpdate) AppendProcessingErrors

func (ou *OutboxUpdate) AppendProcessingErrors(s []string) *OutboxUpdate

AppendProcessingErrors appends s to the "processing_errors" field.

func (*OutboxUpdate) ClearLastRetry

func (ou *OutboxUpdate) ClearLastRetry() *OutboxUpdate

ClearLastRetry clears the value of the "last_retry" field.

func (*OutboxUpdate) ClearProcessingErrors

func (ou *OutboxUpdate) ClearProcessingErrors() *OutboxUpdate

ClearProcessingErrors clears the value of the "processing_errors" field.

func (*OutboxUpdate) Exec

func (ou *OutboxUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OutboxUpdate) ExecContext

func (c *OutboxUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OutboxUpdate) ExecX

func (ou *OutboxUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutboxUpdate) Modify

func (ou *OutboxUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OutboxUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OutboxUpdate) Mutation

func (ou *OutboxUpdate) Mutation() *OutboxMutation

Mutation returns the OutboxMutation object of the builder.

func (*OutboxUpdate) QueryContext

func (c *OutboxUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OutboxUpdate) Save

func (ou *OutboxUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OutboxUpdate) SaveX

func (ou *OutboxUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OutboxUpdate) SetHeaders

func (ou *OutboxUpdate) SetHeaders(m map[string]string) *OutboxUpdate

SetHeaders sets the "headers" field.

func (*OutboxUpdate) SetKey

func (ou *OutboxUpdate) SetKey(s string) *OutboxUpdate

SetKey sets the "key" field.

func (*OutboxUpdate) SetLastRetry

func (ou *OutboxUpdate) SetLastRetry(t time.Time) *OutboxUpdate

SetLastRetry sets the "last_retry" field.

func (*OutboxUpdate) SetNillableLastRetry

func (ou *OutboxUpdate) SetNillableLastRetry(t *time.Time) *OutboxUpdate

SetNillableLastRetry sets the "last_retry" field if the given value is not nil.

func (*OutboxUpdate) SetPayload

func (ou *OutboxUpdate) SetPayload(b []byte) *OutboxUpdate

SetPayload sets the "payload" field.

func (*OutboxUpdate) SetProcessingErrors

func (ou *OutboxUpdate) SetProcessingErrors(s []string) *OutboxUpdate

SetProcessingErrors sets the "processing_errors" field.

func (*OutboxUpdate) SetRetryCount

func (ou *OutboxUpdate) SetRetryCount(i int) *OutboxUpdate

SetRetryCount sets the "retry_count" field.

func (*OutboxUpdate) SetStatus

func (ou *OutboxUpdate) SetStatus(o outbox.Status) *OutboxUpdate

SetStatus sets the "status" field.

func (*OutboxUpdate) SetTimestamp

func (ou *OutboxUpdate) SetTimestamp(t time.Time) *OutboxUpdate

SetTimestamp sets the "timestamp" field.

func (*OutboxUpdate) SetTopic

func (ou *OutboxUpdate) SetTopic(s string) *OutboxUpdate

SetTopic sets the "topic" field.

func (*OutboxUpdate) Where

func (ou *OutboxUpdate) Where(ps ...predicate.Outbox) *OutboxUpdate

Where appends a list predicates to the OutboxUpdate builder.

type OutboxUpdateOne

type OutboxUpdateOne struct {
	// contains filtered or unexported fields
}

OutboxUpdateOne is the builder for updating a single Outbox entity.

func (*OutboxUpdateOne) AddRetryCount

func (ouo *OutboxUpdateOne) AddRetryCount(i int) *OutboxUpdateOne

AddRetryCount adds i to the "retry_count" field.

func (*OutboxUpdateOne) AppendProcessingErrors

func (ouo *OutboxUpdateOne) AppendProcessingErrors(s []string) *OutboxUpdateOne

AppendProcessingErrors appends s to the "processing_errors" field.

func (*OutboxUpdateOne) ClearLastRetry

func (ouo *OutboxUpdateOne) ClearLastRetry() *OutboxUpdateOne

ClearLastRetry clears the value of the "last_retry" field.

func (*OutboxUpdateOne) ClearProcessingErrors

func (ouo *OutboxUpdateOne) ClearProcessingErrors() *OutboxUpdateOne

ClearProcessingErrors clears the value of the "processing_errors" field.

func (*OutboxUpdateOne) Exec

func (ouo *OutboxUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OutboxUpdateOne) ExecContext

func (c *OutboxUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OutboxUpdateOne) ExecX

func (ouo *OutboxUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutboxUpdateOne) Modify

func (ouo *OutboxUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OutboxUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OutboxUpdateOne) Mutation

func (ouo *OutboxUpdateOne) Mutation() *OutboxMutation

Mutation returns the OutboxMutation object of the builder.

func (*OutboxUpdateOne) QueryContext

func (c *OutboxUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OutboxUpdateOne) Save

func (ouo *OutboxUpdateOne) Save(ctx context.Context) (*Outbox, error)

Save executes the query and returns the updated Outbox entity.

func (*OutboxUpdateOne) SaveX

func (ouo *OutboxUpdateOne) SaveX(ctx context.Context) *Outbox

SaveX is like Save, but panics if an error occurs.

func (*OutboxUpdateOne) Select

func (ouo *OutboxUpdateOne) Select(field string, fields ...string) *OutboxUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OutboxUpdateOne) SetHeaders

func (ouo *OutboxUpdateOne) SetHeaders(m map[string]string) *OutboxUpdateOne

SetHeaders sets the "headers" field.

func (*OutboxUpdateOne) SetKey

func (ouo *OutboxUpdateOne) SetKey(s string) *OutboxUpdateOne

SetKey sets the "key" field.

func (*OutboxUpdateOne) SetLastRetry

func (ouo *OutboxUpdateOne) SetLastRetry(t time.Time) *OutboxUpdateOne

SetLastRetry sets the "last_retry" field.

func (*OutboxUpdateOne) SetNillableLastRetry

func (ouo *OutboxUpdateOne) SetNillableLastRetry(t *time.Time) *OutboxUpdateOne

SetNillableLastRetry sets the "last_retry" field if the given value is not nil.

func (*OutboxUpdateOne) SetPayload

func (ouo *OutboxUpdateOne) SetPayload(b []byte) *OutboxUpdateOne

SetPayload sets the "payload" field.

func (*OutboxUpdateOne) SetProcessingErrors

func (ouo *OutboxUpdateOne) SetProcessingErrors(s []string) *OutboxUpdateOne

SetProcessingErrors sets the "processing_errors" field.

func (*OutboxUpdateOne) SetRetryCount

func (ouo *OutboxUpdateOne) SetRetryCount(i int) *OutboxUpdateOne

SetRetryCount sets the "retry_count" field.

func (*OutboxUpdateOne) SetStatus

func (ouo *OutboxUpdateOne) SetStatus(o outbox.Status) *OutboxUpdateOne

SetStatus sets the "status" field.

func (*OutboxUpdateOne) SetTimestamp

func (ouo *OutboxUpdateOne) SetTimestamp(t time.Time) *OutboxUpdateOne

SetTimestamp sets the "timestamp" field.

func (*OutboxUpdateOne) SetTopic

func (ouo *OutboxUpdateOne) SetTopic(s string) *OutboxUpdateOne

SetTopic sets the "topic" field.

type OutboxUpsert

type OutboxUpsert struct {
	*sql.UpdateSet
}

OutboxUpsert is the "OnConflict" setter.

func (*OutboxUpsert) AddRetryCount

func (u *OutboxUpsert) AddRetryCount(v int) *OutboxUpsert

AddRetryCount adds v to the "retry_count" field.

func (*OutboxUpsert) ClearLastRetry

func (u *OutboxUpsert) ClearLastRetry() *OutboxUpsert

ClearLastRetry clears the value of the "last_retry" field.

func (*OutboxUpsert) ClearProcessingErrors

func (u *OutboxUpsert) ClearProcessingErrors() *OutboxUpsert

ClearProcessingErrors clears the value of the "processing_errors" field.

func (*OutboxUpsert) SetHeaders

func (u *OutboxUpsert) SetHeaders(v map[string]string) *OutboxUpsert

SetHeaders sets the "headers" field.

func (*OutboxUpsert) SetKey

func (u *OutboxUpsert) SetKey(v string) *OutboxUpsert

SetKey sets the "key" field.

func (*OutboxUpsert) SetLastRetry

func (u *OutboxUpsert) SetLastRetry(v time.Time) *OutboxUpsert

SetLastRetry sets the "last_retry" field.

func (*OutboxUpsert) SetPayload

func (u *OutboxUpsert) SetPayload(v []byte) *OutboxUpsert

SetPayload sets the "payload" field.

func (*OutboxUpsert) SetProcessingErrors

func (u *OutboxUpsert) SetProcessingErrors(v []string) *OutboxUpsert

SetProcessingErrors sets the "processing_errors" field.

func (*OutboxUpsert) SetRetryCount

func (u *OutboxUpsert) SetRetryCount(v int) *OutboxUpsert

SetRetryCount sets the "retry_count" field.

func (*OutboxUpsert) SetStatus

func (u *OutboxUpsert) SetStatus(v outbox.Status) *OutboxUpsert

SetStatus sets the "status" field.

func (*OutboxUpsert) SetTimestamp

func (u *OutboxUpsert) SetTimestamp(v time.Time) *OutboxUpsert

SetTimestamp sets the "timestamp" field.

func (*OutboxUpsert) SetTopic

func (u *OutboxUpsert) SetTopic(v string) *OutboxUpsert

SetTopic sets the "topic" field.

func (*OutboxUpsert) UpdateHeaders

func (u *OutboxUpsert) UpdateHeaders() *OutboxUpsert

UpdateHeaders sets the "headers" field to the value that was provided on create.

func (*OutboxUpsert) UpdateKey

func (u *OutboxUpsert) UpdateKey() *OutboxUpsert

UpdateKey sets the "key" field to the value that was provided on create.

func (*OutboxUpsert) UpdateLastRetry

func (u *OutboxUpsert) UpdateLastRetry() *OutboxUpsert

UpdateLastRetry sets the "last_retry" field to the value that was provided on create.

func (*OutboxUpsert) UpdatePayload

func (u *OutboxUpsert) UpdatePayload() *OutboxUpsert

UpdatePayload sets the "payload" field to the value that was provided on create.

func (*OutboxUpsert) UpdateProcessingErrors

func (u *OutboxUpsert) UpdateProcessingErrors() *OutboxUpsert

UpdateProcessingErrors sets the "processing_errors" field to the value that was provided on create.

func (*OutboxUpsert) UpdateRetryCount

func (u *OutboxUpsert) UpdateRetryCount() *OutboxUpsert

UpdateRetryCount sets the "retry_count" field to the value that was provided on create.

func (*OutboxUpsert) UpdateStatus

func (u *OutboxUpsert) UpdateStatus() *OutboxUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OutboxUpsert) UpdateTimestamp

func (u *OutboxUpsert) UpdateTimestamp() *OutboxUpsert

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*OutboxUpsert) UpdateTopic

func (u *OutboxUpsert) UpdateTopic() *OutboxUpsert

UpdateTopic sets the "topic" field to the value that was provided on create.

type OutboxUpsertBulk

type OutboxUpsertBulk struct {
	// contains filtered or unexported fields
}

OutboxUpsertBulk is the builder for "upsert"-ing a bulk of Outbox nodes.

func (*OutboxUpsertBulk) AddRetryCount

func (u *OutboxUpsertBulk) AddRetryCount(v int) *OutboxUpsertBulk

AddRetryCount adds v to the "retry_count" field.

func (*OutboxUpsertBulk) ClearLastRetry

func (u *OutboxUpsertBulk) ClearLastRetry() *OutboxUpsertBulk

ClearLastRetry clears the value of the "last_retry" field.

func (*OutboxUpsertBulk) ClearProcessingErrors

func (u *OutboxUpsertBulk) ClearProcessingErrors() *OutboxUpsertBulk

ClearProcessingErrors clears the value of the "processing_errors" field.

func (*OutboxUpsertBulk) DoNothing

func (u *OutboxUpsertBulk) DoNothing() *OutboxUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OutboxUpsertBulk) Exec

func (u *OutboxUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OutboxUpsertBulk) ExecX

func (u *OutboxUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutboxUpsertBulk) Ignore

func (u *OutboxUpsertBulk) Ignore() *OutboxUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Outbox.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OutboxUpsertBulk) SetHeaders

func (u *OutboxUpsertBulk) SetHeaders(v map[string]string) *OutboxUpsertBulk

SetHeaders sets the "headers" field.

func (*OutboxUpsertBulk) SetKey

SetKey sets the "key" field.

func (*OutboxUpsertBulk) SetLastRetry

func (u *OutboxUpsertBulk) SetLastRetry(v time.Time) *OutboxUpsertBulk

SetLastRetry sets the "last_retry" field.

func (*OutboxUpsertBulk) SetPayload

func (u *OutboxUpsertBulk) SetPayload(v []byte) *OutboxUpsertBulk

SetPayload sets the "payload" field.

func (*OutboxUpsertBulk) SetProcessingErrors

func (u *OutboxUpsertBulk) SetProcessingErrors(v []string) *OutboxUpsertBulk

SetProcessingErrors sets the "processing_errors" field.

func (*OutboxUpsertBulk) SetRetryCount

func (u *OutboxUpsertBulk) SetRetryCount(v int) *OutboxUpsertBulk

SetRetryCount sets the "retry_count" field.

func (*OutboxUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*OutboxUpsertBulk) SetTimestamp

func (u *OutboxUpsertBulk) SetTimestamp(v time.Time) *OutboxUpsertBulk

SetTimestamp sets the "timestamp" field.

func (*OutboxUpsertBulk) SetTopic

func (u *OutboxUpsertBulk) SetTopic(v string) *OutboxUpsertBulk

SetTopic sets the "topic" field.

func (*OutboxUpsertBulk) Update

func (u *OutboxUpsertBulk) Update(set func(*OutboxUpsert)) *OutboxUpsertBulk

Update allows overriding fields `UPDATE` values. See the OutboxCreateBulk.OnConflict documentation for more info.

func (*OutboxUpsertBulk) UpdateHeaders

func (u *OutboxUpsertBulk) UpdateHeaders() *OutboxUpsertBulk

UpdateHeaders sets the "headers" field to the value that was provided on create.

func (*OutboxUpsertBulk) UpdateKey

func (u *OutboxUpsertBulk) UpdateKey() *OutboxUpsertBulk

UpdateKey sets the "key" field to the value that was provided on create.

func (*OutboxUpsertBulk) UpdateLastRetry

func (u *OutboxUpsertBulk) UpdateLastRetry() *OutboxUpsertBulk

UpdateLastRetry sets the "last_retry" field to the value that was provided on create.

func (*OutboxUpsertBulk) UpdateNewValues

func (u *OutboxUpsertBulk) UpdateNewValues() *OutboxUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Outbox.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*OutboxUpsertBulk) UpdatePayload

func (u *OutboxUpsertBulk) UpdatePayload() *OutboxUpsertBulk

UpdatePayload sets the "payload" field to the value that was provided on create.

func (*OutboxUpsertBulk) UpdateProcessingErrors

func (u *OutboxUpsertBulk) UpdateProcessingErrors() *OutboxUpsertBulk

UpdateProcessingErrors sets the "processing_errors" field to the value that was provided on create.

func (*OutboxUpsertBulk) UpdateRetryCount

func (u *OutboxUpsertBulk) UpdateRetryCount() *OutboxUpsertBulk

UpdateRetryCount sets the "retry_count" field to the value that was provided on create.

func (*OutboxUpsertBulk) UpdateStatus

func (u *OutboxUpsertBulk) UpdateStatus() *OutboxUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OutboxUpsertBulk) UpdateTimestamp

func (u *OutboxUpsertBulk) UpdateTimestamp() *OutboxUpsertBulk

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*OutboxUpsertBulk) UpdateTopic

func (u *OutboxUpsertBulk) UpdateTopic() *OutboxUpsertBulk

UpdateTopic sets the "topic" field to the value that was provided on create.

type OutboxUpsertOne

type OutboxUpsertOne struct {
	// contains filtered or unexported fields
}

OutboxUpsertOne is the builder for "upsert"-ing

one Outbox node.

func (*OutboxUpsertOne) AddRetryCount

func (u *OutboxUpsertOne) AddRetryCount(v int) *OutboxUpsertOne

AddRetryCount adds v to the "retry_count" field.

func (*OutboxUpsertOne) ClearLastRetry

func (u *OutboxUpsertOne) ClearLastRetry() *OutboxUpsertOne

ClearLastRetry clears the value of the "last_retry" field.

func (*OutboxUpsertOne) ClearProcessingErrors

func (u *OutboxUpsertOne) ClearProcessingErrors() *OutboxUpsertOne

ClearProcessingErrors clears the value of the "processing_errors" field.

func (*OutboxUpsertOne) DoNothing

func (u *OutboxUpsertOne) DoNothing() *OutboxUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OutboxUpsertOne) Exec

func (u *OutboxUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OutboxUpsertOne) ExecX

func (u *OutboxUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OutboxUpsertOne) ID

func (u *OutboxUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OutboxUpsertOne) IDX

func (u *OutboxUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OutboxUpsertOne) Ignore

func (u *OutboxUpsertOne) Ignore() *OutboxUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Outbox.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OutboxUpsertOne) SetHeaders

func (u *OutboxUpsertOne) SetHeaders(v map[string]string) *OutboxUpsertOne

SetHeaders sets the "headers" field.

func (*OutboxUpsertOne) SetKey

func (u *OutboxUpsertOne) SetKey(v string) *OutboxUpsertOne

SetKey sets the "key" field.

func (*OutboxUpsertOne) SetLastRetry

func (u *OutboxUpsertOne) SetLastRetry(v time.Time) *OutboxUpsertOne

SetLastRetry sets the "last_retry" field.

func (*OutboxUpsertOne) SetPayload

func (u *OutboxUpsertOne) SetPayload(v []byte) *OutboxUpsertOne

SetPayload sets the "payload" field.

func (*OutboxUpsertOne) SetProcessingErrors

func (u *OutboxUpsertOne) SetProcessingErrors(v []string) *OutboxUpsertOne

SetProcessingErrors sets the "processing_errors" field.

func (*OutboxUpsertOne) SetRetryCount

func (u *OutboxUpsertOne) SetRetryCount(v int) *OutboxUpsertOne

SetRetryCount sets the "retry_count" field.

func (*OutboxUpsertOne) SetStatus

func (u *OutboxUpsertOne) SetStatus(v outbox.Status) *OutboxUpsertOne

SetStatus sets the "status" field.

func (*OutboxUpsertOne) SetTimestamp

func (u *OutboxUpsertOne) SetTimestamp(v time.Time) *OutboxUpsertOne

SetTimestamp sets the "timestamp" field.

func (*OutboxUpsertOne) SetTopic

func (u *OutboxUpsertOne) SetTopic(v string) *OutboxUpsertOne

SetTopic sets the "topic" field.

func (*OutboxUpsertOne) Update

func (u *OutboxUpsertOne) Update(set func(*OutboxUpsert)) *OutboxUpsertOne

Update allows overriding fields `UPDATE` values. See the OutboxCreate.OnConflict documentation for more info.

func (*OutboxUpsertOne) UpdateHeaders

func (u *OutboxUpsertOne) UpdateHeaders() *OutboxUpsertOne

UpdateHeaders sets the "headers" field to the value that was provided on create.

func (*OutboxUpsertOne) UpdateKey

func (u *OutboxUpsertOne) UpdateKey() *OutboxUpsertOne

UpdateKey sets the "key" field to the value that was provided on create.

func (*OutboxUpsertOne) UpdateLastRetry

func (u *OutboxUpsertOne) UpdateLastRetry() *OutboxUpsertOne

UpdateLastRetry sets the "last_retry" field to the value that was provided on create.

func (*OutboxUpsertOne) UpdateNewValues

func (u *OutboxUpsertOne) UpdateNewValues() *OutboxUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Outbox.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*OutboxUpsertOne) UpdatePayload

func (u *OutboxUpsertOne) UpdatePayload() *OutboxUpsertOne

UpdatePayload sets the "payload" field to the value that was provided on create.

func (*OutboxUpsertOne) UpdateProcessingErrors

func (u *OutboxUpsertOne) UpdateProcessingErrors() *OutboxUpsertOne

UpdateProcessingErrors sets the "processing_errors" field to the value that was provided on create.

func (*OutboxUpsertOne) UpdateRetryCount

func (u *OutboxUpsertOne) UpdateRetryCount() *OutboxUpsertOne

UpdateRetryCount sets the "retry_count" field to the value that was provided on create.

func (*OutboxUpsertOne) UpdateStatus

func (u *OutboxUpsertOne) UpdateStatus() *OutboxUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OutboxUpsertOne) UpdateTimestamp

func (u *OutboxUpsertOne) UpdateTimestamp() *OutboxUpsertOne

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*OutboxUpsertOne) UpdateTopic

func (u *OutboxUpsertOne) UpdateTopic() *OutboxUpsertOne

UpdateTopic sets the "topic" field to the value that was provided on create.

type OutboxWhereInput

type OutboxWhereInput struct {
	Predicates []predicate.Outbox  `json:"-"`
	Not        *OutboxWhereInput   `json:"not,omitempty"`
	Or         []*OutboxWhereInput `json:"or,omitempty"`
	And        []*OutboxWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "timestamp" field predicates.
	Timestamp      *time.Time  `json:"timestamp,omitempty"`
	TimestampNEQ   *time.Time  `json:"timestampNEQ,omitempty"`
	TimestampIn    []time.Time `json:"timestampIn,omitempty"`
	TimestampNotIn []time.Time `json:"timestampNotIn,omitempty"`
	TimestampGT    *time.Time  `json:"timestampGT,omitempty"`
	TimestampGTE   *time.Time  `json:"timestampGTE,omitempty"`
	TimestampLT    *time.Time  `json:"timestampLT,omitempty"`
	TimestampLTE   *time.Time  `json:"timestampLTE,omitempty"`

	// "topic" field predicates.
	Topic             *string  `json:"topic,omitempty"`
	TopicNEQ          *string  `json:"topicNEQ,omitempty"`
	TopicIn           []string `json:"topicIn,omitempty"`
	TopicNotIn        []string `json:"topicNotIn,omitempty"`
	TopicGT           *string  `json:"topicGT,omitempty"`
	TopicGTE          *string  `json:"topicGTE,omitempty"`
	TopicLT           *string  `json:"topicLT,omitempty"`
	TopicLTE          *string  `json:"topicLTE,omitempty"`
	TopicContains     *string  `json:"topicContains,omitempty"`
	TopicHasPrefix    *string  `json:"topicHasPrefix,omitempty"`
	TopicHasSuffix    *string  `json:"topicHasSuffix,omitempty"`
	TopicEqualFold    *string  `json:"topicEqualFold,omitempty"`
	TopicContainsFold *string  `json:"topicContainsFold,omitempty"`

	// "key" field predicates.
	Key             *string  `json:"key,omitempty"`
	KeyNEQ          *string  `json:"keyNEQ,omitempty"`
	KeyIn           []string `json:"keyIn,omitempty"`
	KeyNotIn        []string `json:"keyNotIn,omitempty"`
	KeyGT           *string  `json:"keyGT,omitempty"`
	KeyGTE          *string  `json:"keyGTE,omitempty"`
	KeyLT           *string  `json:"keyLT,omitempty"`
	KeyLTE          *string  `json:"keyLTE,omitempty"`
	KeyContains     *string  `json:"keyContains,omitempty"`
	KeyHasPrefix    *string  `json:"keyHasPrefix,omitempty"`
	KeyHasSuffix    *string  `json:"keyHasSuffix,omitempty"`
	KeyEqualFold    *string  `json:"keyEqualFold,omitempty"`
	KeyContainsFold *string  `json:"keyContainsFold,omitempty"`

	// "retry_count" field predicates.
	RetryCount      *int  `json:"retryCount,omitempty"`
	RetryCountNEQ   *int  `json:"retryCountNEQ,omitempty"`
	RetryCountIn    []int `json:"retryCountIn,omitempty"`
	RetryCountNotIn []int `json:"retryCountNotIn,omitempty"`
	RetryCountGT    *int  `json:"retryCountGT,omitempty"`
	RetryCountGTE   *int  `json:"retryCountGTE,omitempty"`
	RetryCountLT    *int  `json:"retryCountLT,omitempty"`
	RetryCountLTE   *int  `json:"retryCountLTE,omitempty"`

	// "status" field predicates.
	Status      *outbox.Status  `json:"status,omitempty"`
	StatusNEQ   *outbox.Status  `json:"statusNEQ,omitempty"`
	StatusIn    []outbox.Status `json:"statusIn,omitempty"`
	StatusNotIn []outbox.Status `json:"statusNotIn,omitempty"`

	// "last_retry" field predicates.
	LastRetry       *time.Time  `json:"lastRetry,omitempty"`
	LastRetryNEQ    *time.Time  `json:"lastRetryNEQ,omitempty"`
	LastRetryIn     []time.Time `json:"lastRetryIn,omitempty"`
	LastRetryNotIn  []time.Time `json:"lastRetryNotIn,omitempty"`
	LastRetryGT     *time.Time  `json:"lastRetryGT,omitempty"`
	LastRetryGTE    *time.Time  `json:"lastRetryGTE,omitempty"`
	LastRetryLT     *time.Time  `json:"lastRetryLT,omitempty"`
	LastRetryLTE    *time.Time  `json:"lastRetryLTE,omitempty"`
	LastRetryIsNil  bool        `json:"lastRetryIsNil,omitempty"`
	LastRetryNotNil bool        `json:"lastRetryNotNil,omitempty"`
}

OutboxWhereInput represents a where input for filtering Outbox queries.

func (*OutboxWhereInput) AddPredicates

func (i *OutboxWhereInput) AddPredicates(predicates ...predicate.Outbox)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OutboxWhereInput) Filter

func (i *OutboxWhereInput) Filter(q *OutboxQuery) (*OutboxQuery, error)

Filter applies the OutboxWhereInput filter on the OutboxQuery builder.

func (*OutboxWhereInput) P

P returns a predicate for filtering outboxes. An error is returned if the input is empty or invalid.

type Outboxes

type Outboxes []*Outbox

Outboxes is a parsable slice of Outbox.

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 Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type SchemaConfig

type SchemaConfig = internal.SchemaConfig

SchemaConfig represents alternative schema names for all tables that can be passed at runtime.

type Ticker

type Ticker struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Base holds the value of the "base" field.
	Base string `json:"base,omitempty"`
	// BaseCoinID holds the value of the "base_coin_id" field.
	BaseCoinID string `json:"base_coin_id,omitempty"`
	// Counter holds the value of the "counter" field.
	Counter string `json:"counter,omitempty"`
	// CounterCoinID holds the value of the "counter_coin_id" field.
	CounterCoinID string `json:"counter_coin_id,omitempty"`
	// Market holds the value of the "market" field.
	Market models.Market `json:"market,omitempty"`
	// Last holds the value of the "last" field.
	Last float64 `json:"last,omitempty"`
	// Volume holds the value of the "volume" field.
	Volume float64 `json:"volume,omitempty"`
	// ConvertedLast holds the value of the "converted_last" field.
	ConvertedLast models.ConvertedDetails `json:"converted_last,omitempty"`
	// ConvertedVolume holds the value of the "converted_volume" field.
	ConvertedVolume models.ConvertedDetails `json:"converted_volume,omitempty"`
	// TrustScore holds the value of the "trust_score" field.
	TrustScore string `json:"trust_score,omitempty"`
	// BidAskSpreadPercentage holds the value of the "bid_ask_spread_percentage" field.
	BidAskSpreadPercentage float64 `json:"bid_ask_spread_percentage,omitempty"`
	// Timestamp holds the value of the "timestamp" field.
	Timestamp time.Time `json:"timestamp,omitempty"`
	// LastTradedAt holds the value of the "last_traded_at" field.
	LastTradedAt time.Time `json:"last_traded_at,omitempty"`
	// LastFetchAt holds the value of the "last_fetch_at" field.
	LastFetchAt time.Time `json:"last_fetch_at,omitempty"`
	// IsAnomaly holds the value of the "is_anomaly" field.
	IsAnomaly bool `json:"is_anomaly,omitempty"`
	// IsStale holds the value of the "is_stale" field.
	IsStale bool `json:"is_stale,omitempty"`
	// TradeURL holds the value of the "trade_url" field.
	TradeURL string `json:"trade_url,omitempty"`
	// TokenInfoURL holds the value of the "token_info_url" field.
	TokenInfoURL string `json:"token_info_url,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TickerQuery when eager-loading is set.
	Edges TickerEdges `json:"edges"`
	// contains filtered or unexported fields
}

Ticker is the model entity for the Ticker schema.

func (*Ticker) ExecContext

func (c *Ticker) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Ticker) IsNode

func (n *Ticker) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Ticker) QueryContext

func (c *Ticker) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Ticker) QueryVenue

func (t *Ticker) QueryVenue() *VenueQuery

QueryVenue queries the "venue" edge of the Ticker entity.

func (*Ticker) String

func (t *Ticker) String() string

String implements the fmt.Stringer.

func (*Ticker) ToEdge

func (t *Ticker) ToEdge(order *TickerOrder) *TickerEdge

ToEdge converts Ticker into TickerEdge.

func (*Ticker) Unwrap

func (t *Ticker) Unwrap() *Ticker

Unwrap unwraps the Ticker 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 (*Ticker) Update

func (t *Ticker) Update() *TickerUpdateOne

Update returns a builder for updating this Ticker. Note that you need to call Ticker.Unwrap() before calling this method if this Ticker was returned from a transaction, and the transaction was committed or rolled back.

func (*Ticker) Venue

func (t *Ticker) Venue(ctx context.Context) (*Venue, error)

type TickerClient

type TickerClient struct {
	// contains filtered or unexported fields
}

TickerClient is a client for the Ticker schema.

func NewTickerClient

func NewTickerClient(c config) *TickerClient

NewTickerClient returns a client for the Ticker from the given config.

func (*TickerClient) Create

func (c *TickerClient) Create() *TickerCreate

Create returns a builder for creating a Ticker entity.

func (*TickerClient) CreateBulk

func (c *TickerClient) CreateBulk(builders ...*TickerCreate) *TickerCreateBulk

CreateBulk returns a builder for creating a bulk of Ticker entities.

func (*TickerClient) Delete

func (c *TickerClient) Delete() *TickerDelete

Delete returns a delete builder for Ticker.

func (*TickerClient) DeleteOne

func (c *TickerClient) DeleteOne(t *Ticker) *TickerDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TickerClient) DeleteOneID

func (c *TickerClient) DeleteOneID(id int) *TickerDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TickerClient) ExecContext

func (c *TickerClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerClient) Get

func (c *TickerClient) Get(ctx context.Context, id int) (*Ticker, error)

Get returns a Ticker entity by its id.

func (*TickerClient) GetX

func (c *TickerClient) GetX(ctx context.Context, id int) *Ticker

GetX is like Get, but panics if an error occurs.

func (*TickerClient) Hooks

func (c *TickerClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TickerClient) Intercept

func (c *TickerClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ticker.Intercept(f(g(h())))`.

func (*TickerClient) Interceptors

func (c *TickerClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TickerClient) Query

func (c *TickerClient) Query() *TickerQuery

Query returns a query builder for Ticker.

func (*TickerClient) QueryContext

func (c *TickerClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerClient) QueryVenue

func (c *TickerClient) QueryVenue(t *Ticker) *VenueQuery

QueryVenue queries the venue edge of a Ticker.

func (*TickerClient) Update

func (c *TickerClient) Update() *TickerUpdate

Update returns an update builder for Ticker.

func (*TickerClient) UpdateOne

func (c *TickerClient) UpdateOne(t *Ticker) *TickerUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TickerClient) UpdateOneID

func (c *TickerClient) UpdateOneID(id int) *TickerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TickerClient) Use

func (c *TickerClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ticker.Hooks(f(g(h())))`.

type TickerConnection

type TickerConnection struct {
	Edges      []*TickerEdge `json:"edges"`
	PageInfo   PageInfo      `json:"pageInfo"`
	TotalCount int           `json:"totalCount"`
}

TickerConnection is the connection containing edges to Ticker.

type TickerCreate

type TickerCreate struct {
	// contains filtered or unexported fields
}

TickerCreate is the builder for creating a Ticker entity.

func (*TickerCreate) Exec

func (tc *TickerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TickerCreate) ExecContext

func (c *TickerCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerCreate) ExecX

func (tc *TickerCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TickerCreate) Mutation

func (tc *TickerCreate) Mutation() *TickerMutation

Mutation returns the TickerMutation object of the builder.

func (*TickerCreate) OnConflict

func (tc *TickerCreate) OnConflict(opts ...sql.ConflictOption) *TickerUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Ticker.Create().
	SetBase(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.TickerUpsert) {
		SetBase(v+v).
	}).
	Exec(ctx)

func (*TickerCreate) OnConflictColumns

func (tc *TickerCreate) OnConflictColumns(columns ...string) *TickerUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Ticker.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TickerCreate) QueryContext

func (c *TickerCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerCreate) Save

func (tc *TickerCreate) Save(ctx context.Context) (*Ticker, error)

Save creates the Ticker in the database.

func (*TickerCreate) SaveX

func (tc *TickerCreate) SaveX(ctx context.Context) *Ticker

SaveX calls Save and panics if Save returns an error.

func (*TickerCreate) SetBase

func (tc *TickerCreate) SetBase(s string) *TickerCreate

SetBase sets the "base" field.

func (*TickerCreate) SetBaseCoinID

func (tc *TickerCreate) SetBaseCoinID(s string) *TickerCreate

SetBaseCoinID sets the "base_coin_id" field.

func (*TickerCreate) SetBidAskSpreadPercentage

func (tc *TickerCreate) SetBidAskSpreadPercentage(f float64) *TickerCreate

SetBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field.

func (*TickerCreate) SetConvertedLast

func (tc *TickerCreate) SetConvertedLast(md models.ConvertedDetails) *TickerCreate

SetConvertedLast sets the "converted_last" field.

func (*TickerCreate) SetConvertedVolume

func (tc *TickerCreate) SetConvertedVolume(md models.ConvertedDetails) *TickerCreate

SetConvertedVolume sets the "converted_volume" field.

func (*TickerCreate) SetCounter

func (tc *TickerCreate) SetCounter(s string) *TickerCreate

SetCounter sets the "counter" field.

func (*TickerCreate) SetCounterCoinID

func (tc *TickerCreate) SetCounterCoinID(s string) *TickerCreate

SetCounterCoinID sets the "counter_coin_id" field.

func (*TickerCreate) SetIsAnomaly

func (tc *TickerCreate) SetIsAnomaly(b bool) *TickerCreate

SetIsAnomaly sets the "is_anomaly" field.

func (*TickerCreate) SetIsStale

func (tc *TickerCreate) SetIsStale(b bool) *TickerCreate

SetIsStale sets the "is_stale" field.

func (*TickerCreate) SetLast

func (tc *TickerCreate) SetLast(f float64) *TickerCreate

SetLast sets the "last" field.

func (*TickerCreate) SetLastFetchAt

func (tc *TickerCreate) SetLastFetchAt(t time.Time) *TickerCreate

SetLastFetchAt sets the "last_fetch_at" field.

func (*TickerCreate) SetLastTradedAt

func (tc *TickerCreate) SetLastTradedAt(t time.Time) *TickerCreate

SetLastTradedAt sets the "last_traded_at" field.

func (*TickerCreate) SetMarket

func (tc *TickerCreate) SetMarket(m models.Market) *TickerCreate

SetMarket sets the "market" field.

func (*TickerCreate) SetNillableBaseCoinID

func (tc *TickerCreate) SetNillableBaseCoinID(s *string) *TickerCreate

SetNillableBaseCoinID sets the "base_coin_id" field if the given value is not nil.

func (*TickerCreate) SetNillableBidAskSpreadPercentage

func (tc *TickerCreate) SetNillableBidAskSpreadPercentage(f *float64) *TickerCreate

SetNillableBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field if the given value is not nil.

func (*TickerCreate) SetNillableConvertedLast

func (tc *TickerCreate) SetNillableConvertedLast(md *models.ConvertedDetails) *TickerCreate

SetNillableConvertedLast sets the "converted_last" field if the given value is not nil.

func (*TickerCreate) SetNillableConvertedVolume

func (tc *TickerCreate) SetNillableConvertedVolume(md *models.ConvertedDetails) *TickerCreate

SetNillableConvertedVolume sets the "converted_volume" field if the given value is not nil.

func (*TickerCreate) SetNillableCounterCoinID

func (tc *TickerCreate) SetNillableCounterCoinID(s *string) *TickerCreate

SetNillableCounterCoinID sets the "counter_coin_id" field if the given value is not nil.

func (*TickerCreate) SetNillableIsAnomaly

func (tc *TickerCreate) SetNillableIsAnomaly(b *bool) *TickerCreate

SetNillableIsAnomaly sets the "is_anomaly" field if the given value is not nil.

func (*TickerCreate) SetNillableIsStale

func (tc *TickerCreate) SetNillableIsStale(b *bool) *TickerCreate

SetNillableIsStale sets the "is_stale" field if the given value is not nil.

func (*TickerCreate) SetNillableLast

func (tc *TickerCreate) SetNillableLast(f *float64) *TickerCreate

SetNillableLast sets the "last" field if the given value is not nil.

func (*TickerCreate) SetNillableLastFetchAt

func (tc *TickerCreate) SetNillableLastFetchAt(t *time.Time) *TickerCreate

SetNillableLastFetchAt sets the "last_fetch_at" field if the given value is not nil.

func (*TickerCreate) SetNillableLastTradedAt

func (tc *TickerCreate) SetNillableLastTradedAt(t *time.Time) *TickerCreate

SetNillableLastTradedAt sets the "last_traded_at" field if the given value is not nil.

func (*TickerCreate) SetNillableMarket

func (tc *TickerCreate) SetNillableMarket(m *models.Market) *TickerCreate

SetNillableMarket sets the "market" field if the given value is not nil.

func (*TickerCreate) SetNillableTimestamp

func (tc *TickerCreate) SetNillableTimestamp(t *time.Time) *TickerCreate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*TickerCreate) SetNillableTokenInfoURL

func (tc *TickerCreate) SetNillableTokenInfoURL(s *string) *TickerCreate

SetNillableTokenInfoURL sets the "token_info_url" field if the given value is not nil.

func (*TickerCreate) SetNillableTradeURL

func (tc *TickerCreate) SetNillableTradeURL(s *string) *TickerCreate

SetNillableTradeURL sets the "trade_url" field if the given value is not nil.

func (*TickerCreate) SetNillableTrustScore

func (tc *TickerCreate) SetNillableTrustScore(s *string) *TickerCreate

SetNillableTrustScore sets the "trust_score" field if the given value is not nil.

func (*TickerCreate) SetNillableVolume

func (tc *TickerCreate) SetNillableVolume(f *float64) *TickerCreate

SetNillableVolume sets the "volume" field if the given value is not nil.

func (*TickerCreate) SetTimestamp

func (tc *TickerCreate) SetTimestamp(t time.Time) *TickerCreate

SetTimestamp sets the "timestamp" field.

func (*TickerCreate) SetTokenInfoURL

func (tc *TickerCreate) SetTokenInfoURL(s string) *TickerCreate

SetTokenInfoURL sets the "token_info_url" field.

func (*TickerCreate) SetTradeURL

func (tc *TickerCreate) SetTradeURL(s string) *TickerCreate

SetTradeURL sets the "trade_url" field.

func (*TickerCreate) SetTrustScore

func (tc *TickerCreate) SetTrustScore(s string) *TickerCreate

SetTrustScore sets the "trust_score" field.

func (*TickerCreate) SetVenue

func (tc *TickerCreate) SetVenue(v *Venue) *TickerCreate

SetVenue sets the "venue" edge to the Venue entity.

func (*TickerCreate) SetVenueID

func (tc *TickerCreate) SetVenueID(id int) *TickerCreate

SetVenueID sets the "venue" edge to the Venue entity by ID.

func (*TickerCreate) SetVolume

func (tc *TickerCreate) SetVolume(f float64) *TickerCreate

SetVolume sets the "volume" field.

type TickerCreateBulk

type TickerCreateBulk struct {
	// contains filtered or unexported fields
}

TickerCreateBulk is the builder for creating many Ticker entities in bulk.

func (*TickerCreateBulk) Exec

func (tcb *TickerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TickerCreateBulk) ExecContext

func (c *TickerCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerCreateBulk) ExecX

func (tcb *TickerCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TickerCreateBulk) OnConflict

func (tcb *TickerCreateBulk) OnConflict(opts ...sql.ConflictOption) *TickerUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Ticker.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.TickerUpsert) {
		SetBase(v+v).
	}).
	Exec(ctx)

func (*TickerCreateBulk) OnConflictColumns

func (tcb *TickerCreateBulk) OnConflictColumns(columns ...string) *TickerUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Ticker.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TickerCreateBulk) QueryContext

func (c *TickerCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerCreateBulk) Save

func (tcb *TickerCreateBulk) Save(ctx context.Context) ([]*Ticker, error)

Save creates the Ticker entities in the database.

func (*TickerCreateBulk) SaveX

func (tcb *TickerCreateBulk) SaveX(ctx context.Context) []*Ticker

SaveX is like Save, but panics if an error occurs.

type TickerDelete

type TickerDelete struct {
	// contains filtered or unexported fields
}

TickerDelete is the builder for deleting a Ticker entity.

func (*TickerDelete) Exec

func (td *TickerDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TickerDelete) ExecContext

func (c *TickerDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerDelete) ExecX

func (td *TickerDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TickerDelete) QueryContext

func (c *TickerDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerDelete) Where

func (td *TickerDelete) Where(ps ...predicate.Ticker) *TickerDelete

Where appends a list predicates to the TickerDelete builder.

type TickerDeleteOne

type TickerDeleteOne struct {
	// contains filtered or unexported fields
}

TickerDeleteOne is the builder for deleting a single Ticker entity.

func (*TickerDeleteOne) Exec

func (tdo *TickerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TickerDeleteOne) ExecX

func (tdo *TickerDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TickerDeleteOne) Where

func (tdo *TickerDeleteOne) Where(ps ...predicate.Ticker) *TickerDeleteOne

Where appends a list predicates to the TickerDelete builder.

type TickerEdge

type TickerEdge struct {
	Node   *Ticker `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

TickerEdge is the edge representation of Ticker.

type TickerEdges

type TickerEdges struct {
	// Venue holds the value of the venue edge.
	Venue *Venue `json:"venue,omitempty"`
	// contains filtered or unexported fields
}

TickerEdges holds the relations/edges for other nodes in the graph.

func (TickerEdges) VenueOrErr

func (e TickerEdges) VenueOrErr() (*Venue, error)

VenueOrErr returns the Venue value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TickerFilter

type TickerFilter struct {
	// contains filtered or unexported fields
}

TickerFilter provides a generic filtering capability at runtime for TickerQuery.

func (*TickerFilter) ExecContext

func (c *TickerFilter) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerFilter) QueryContext

func (c *TickerFilter) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerFilter) Where

func (f *TickerFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*TickerFilter) WhereBase

func (f *TickerFilter) WhereBase(p entql.StringP)

WhereBase applies the entql string predicate on the base field.

func (*TickerFilter) WhereBaseCoinID

func (f *TickerFilter) WhereBaseCoinID(p entql.StringP)

WhereBaseCoinID applies the entql string predicate on the base_coin_id field.

func (*TickerFilter) WhereBidAskSpreadPercentage

func (f *TickerFilter) WhereBidAskSpreadPercentage(p entql.Float64P)

WhereBidAskSpreadPercentage applies the entql float64 predicate on the bid_ask_spread_percentage field.

func (*TickerFilter) WhereConvertedLast

func (f *TickerFilter) WhereConvertedLast(p entql.BytesP)

WhereConvertedLast applies the entql json.RawMessage predicate on the converted_last field.

func (*TickerFilter) WhereConvertedVolume

func (f *TickerFilter) WhereConvertedVolume(p entql.BytesP)

WhereConvertedVolume applies the entql json.RawMessage predicate on the converted_volume field.

func (*TickerFilter) WhereCounter

func (f *TickerFilter) WhereCounter(p entql.StringP)

WhereCounter applies the entql string predicate on the counter field.

func (*TickerFilter) WhereCounterCoinID

func (f *TickerFilter) WhereCounterCoinID(p entql.StringP)

WhereCounterCoinID applies the entql string predicate on the counter_coin_id field.

func (*TickerFilter) WhereHasVenue

func (f *TickerFilter) WhereHasVenue()

WhereHasVenue applies a predicate to check if query has an edge venue.

func (*TickerFilter) WhereHasVenueWith

func (f *TickerFilter) WhereHasVenueWith(preds ...predicate.Venue)

WhereHasVenueWith applies a predicate to check if query has an edge venue with a given conditions (other predicates).

func (*TickerFilter) WhereID

func (f *TickerFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*TickerFilter) WhereIsAnomaly

func (f *TickerFilter) WhereIsAnomaly(p entql.BoolP)

WhereIsAnomaly applies the entql bool predicate on the is_anomaly field.

func (*TickerFilter) WhereIsStale

func (f *TickerFilter) WhereIsStale(p entql.BoolP)

WhereIsStale applies the entql bool predicate on the is_stale field.

func (*TickerFilter) WhereLast

func (f *TickerFilter) WhereLast(p entql.Float64P)

WhereLast applies the entql float64 predicate on the last field.

func (*TickerFilter) WhereLastFetchAt

func (f *TickerFilter) WhereLastFetchAt(p entql.TimeP)

WhereLastFetchAt applies the entql time.Time predicate on the last_fetch_at field.

func (*TickerFilter) WhereLastTradedAt

func (f *TickerFilter) WhereLastTradedAt(p entql.TimeP)

WhereLastTradedAt applies the entql time.Time predicate on the last_traded_at field.

func (*TickerFilter) WhereMarket

func (f *TickerFilter) WhereMarket(p entql.BytesP)

WhereMarket applies the entql json.RawMessage predicate on the market field.

func (*TickerFilter) WhereTimestamp

func (f *TickerFilter) WhereTimestamp(p entql.TimeP)

WhereTimestamp applies the entql time.Time predicate on the timestamp field.

func (*TickerFilter) WhereTokenInfoURL

func (f *TickerFilter) WhereTokenInfoURL(p entql.StringP)

WhereTokenInfoURL applies the entql string predicate on the token_info_url field.

func (*TickerFilter) WhereTradeURL

func (f *TickerFilter) WhereTradeURL(p entql.StringP)

WhereTradeURL applies the entql string predicate on the trade_url field.

func (*TickerFilter) WhereTrustScore

func (f *TickerFilter) WhereTrustScore(p entql.StringP)

WhereTrustScore applies the entql string predicate on the trust_score field.

func (*TickerFilter) WhereVolume

func (f *TickerFilter) WhereVolume(p entql.Float64P)

WhereVolume applies the entql float64 predicate on the volume field.

type TickerGroupBy

type TickerGroupBy struct {
	// contains filtered or unexported fields
}

TickerGroupBy is the group-by builder for Ticker entities.

func (*TickerGroupBy) Aggregate

func (tgb *TickerGroupBy) Aggregate(fns ...AggregateFunc) *TickerGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TickerGroupBy) Bool

func (s *TickerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TickerGroupBy) BoolX

func (s *TickerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TickerGroupBy) Bools

func (s *TickerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TickerGroupBy) BoolsX

func (s *TickerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TickerGroupBy) Float64

func (s *TickerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TickerGroupBy) Float64X

func (s *TickerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TickerGroupBy) Float64s

func (s *TickerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TickerGroupBy) Float64sX

func (s *TickerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TickerGroupBy) Int

func (s *TickerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TickerGroupBy) IntX

func (s *TickerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TickerGroupBy) Ints

func (s *TickerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TickerGroupBy) IntsX

func (s *TickerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TickerGroupBy) Scan

func (tgb *TickerGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TickerGroupBy) ScanX

func (s *TickerGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TickerGroupBy) String

func (s *TickerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TickerGroupBy) StringX

func (s *TickerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TickerGroupBy) Strings

func (s *TickerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TickerGroupBy) StringsX

func (s *TickerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TickerMutation

type TickerMutation struct {
	// contains filtered or unexported fields
}

TickerMutation represents an operation that mutates the Ticker nodes in the graph.

func (*TickerMutation) AddBidAskSpreadPercentage

func (m *TickerMutation) AddBidAskSpreadPercentage(f float64)

AddBidAskSpreadPercentage adds f to the "bid_ask_spread_percentage" field.

func (*TickerMutation) AddField

func (m *TickerMutation) 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 (*TickerMutation) AddLast

func (m *TickerMutation) AddLast(f float64)

AddLast adds f to the "last" field.

func (*TickerMutation) AddVolume

func (m *TickerMutation) AddVolume(f float64)

AddVolume adds f to the "volume" field.

func (*TickerMutation) AddedBidAskSpreadPercentage

func (m *TickerMutation) AddedBidAskSpreadPercentage() (r float64, exists bool)

AddedBidAskSpreadPercentage returns the value that was added to the "bid_ask_spread_percentage" field in this mutation.

func (*TickerMutation) AddedEdges

func (m *TickerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TickerMutation) AddedField

func (m *TickerMutation) 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 (*TickerMutation) AddedFields

func (m *TickerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TickerMutation) AddedIDs

func (m *TickerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TickerMutation) AddedLast

func (m *TickerMutation) AddedLast() (r float64, exists bool)

AddedLast returns the value that was added to the "last" field in this mutation.

func (*TickerMutation) AddedVolume

func (m *TickerMutation) AddedVolume() (r float64, exists bool)

AddedVolume returns the value that was added to the "volume" field in this mutation.

func (*TickerMutation) Base

func (m *TickerMutation) Base() (r string, exists bool)

Base returns the value of the "base" field in the mutation.

func (*TickerMutation) BaseCoinID

func (m *TickerMutation) BaseCoinID() (r string, exists bool)

BaseCoinID returns the value of the "base_coin_id" field in the mutation.

func (*TickerMutation) BaseCoinIDCleared

func (m *TickerMutation) BaseCoinIDCleared() bool

BaseCoinIDCleared returns if the "base_coin_id" field was cleared in this mutation.

func (*TickerMutation) BidAskSpreadPercentage

func (m *TickerMutation) BidAskSpreadPercentage() (r float64, exists bool)

BidAskSpreadPercentage returns the value of the "bid_ask_spread_percentage" field in the mutation.

func (*TickerMutation) BidAskSpreadPercentageCleared

func (m *TickerMutation) BidAskSpreadPercentageCleared() bool

BidAskSpreadPercentageCleared returns if the "bid_ask_spread_percentage" field was cleared in this mutation.

func (*TickerMutation) ClearBaseCoinID

func (m *TickerMutation) ClearBaseCoinID()

ClearBaseCoinID clears the value of the "base_coin_id" field.

func (*TickerMutation) ClearBidAskSpreadPercentage

func (m *TickerMutation) ClearBidAskSpreadPercentage()

ClearBidAskSpreadPercentage clears the value of the "bid_ask_spread_percentage" field.

func (*TickerMutation) ClearConvertedLast

func (m *TickerMutation) ClearConvertedLast()

ClearConvertedLast clears the value of the "converted_last" field.

func (*TickerMutation) ClearConvertedVolume

func (m *TickerMutation) ClearConvertedVolume()

ClearConvertedVolume clears the value of the "converted_volume" field.

func (*TickerMutation) ClearCounterCoinID

func (m *TickerMutation) ClearCounterCoinID()

ClearCounterCoinID clears the value of the "counter_coin_id" field.

func (*TickerMutation) ClearEdge

func (m *TickerMutation) 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 (*TickerMutation) ClearField

func (m *TickerMutation) 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 (*TickerMutation) ClearIsAnomaly

func (m *TickerMutation) ClearIsAnomaly()

ClearIsAnomaly clears the value of the "is_anomaly" field.

func (*TickerMutation) ClearIsStale

func (m *TickerMutation) ClearIsStale()

ClearIsStale clears the value of the "is_stale" field.

func (*TickerMutation) ClearLast

func (m *TickerMutation) ClearLast()

ClearLast clears the value of the "last" field.

func (*TickerMutation) ClearLastFetchAt

func (m *TickerMutation) ClearLastFetchAt()

ClearLastFetchAt clears the value of the "last_fetch_at" field.

func (*TickerMutation) ClearLastTradedAt

func (m *TickerMutation) ClearLastTradedAt()

ClearLastTradedAt clears the value of the "last_traded_at" field.

func (*TickerMutation) ClearMarket

func (m *TickerMutation) ClearMarket()

ClearMarket clears the value of the "market" field.

func (*TickerMutation) ClearTimestamp

func (m *TickerMutation) ClearTimestamp()

ClearTimestamp clears the value of the "timestamp" field.

func (*TickerMutation) ClearTokenInfoURL

func (m *TickerMutation) ClearTokenInfoURL()

ClearTokenInfoURL clears the value of the "token_info_url" field.

func (*TickerMutation) ClearTradeURL

func (m *TickerMutation) ClearTradeURL()

ClearTradeURL clears the value of the "trade_url" field.

func (*TickerMutation) ClearTrustScore

func (m *TickerMutation) ClearTrustScore()

ClearTrustScore clears the value of the "trust_score" field.

func (*TickerMutation) ClearVenue

func (m *TickerMutation) ClearVenue()

ClearVenue clears the "venue" edge to the Venue entity.

func (*TickerMutation) ClearVolume

func (m *TickerMutation) ClearVolume()

ClearVolume clears the value of the "volume" field.

func (*TickerMutation) ClearedEdges

func (m *TickerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TickerMutation) ClearedFields

func (m *TickerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TickerMutation) Client

func (m TickerMutation) 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 (*TickerMutation) ConvertedLast

func (m *TickerMutation) ConvertedLast() (r models.ConvertedDetails, exists bool)

ConvertedLast returns the value of the "converted_last" field in the mutation.

func (*TickerMutation) ConvertedLastCleared

func (m *TickerMutation) ConvertedLastCleared() bool

ConvertedLastCleared returns if the "converted_last" field was cleared in this mutation.

func (*TickerMutation) ConvertedVolume

func (m *TickerMutation) ConvertedVolume() (r models.ConvertedDetails, exists bool)

ConvertedVolume returns the value of the "converted_volume" field in the mutation.

func (*TickerMutation) ConvertedVolumeCleared

func (m *TickerMutation) ConvertedVolumeCleared() bool

ConvertedVolumeCleared returns if the "converted_volume" field was cleared in this mutation.

func (*TickerMutation) Counter

func (m *TickerMutation) Counter() (r string, exists bool)

Counter returns the value of the "counter" field in the mutation.

func (*TickerMutation) CounterCoinID

func (m *TickerMutation) CounterCoinID() (r string, exists bool)

CounterCoinID returns the value of the "counter_coin_id" field in the mutation.

func (*TickerMutation) CounterCoinIDCleared

func (m *TickerMutation) CounterCoinIDCleared() bool

CounterCoinIDCleared returns if the "counter_coin_id" field was cleared in this mutation.

func (*TickerMutation) EdgeCleared

func (m *TickerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TickerMutation) ExecContext

func (c *TickerMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerMutation) Field

func (m *TickerMutation) 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 (*TickerMutation) FieldCleared

func (m *TickerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TickerMutation) Fields

func (m *TickerMutation) 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 (*TickerMutation) Filter

func (m *TickerMutation) Filter() *TickerFilter

Filter returns an entql.Where implementation to apply filters on the TickerMutation builder.

func (*TickerMutation) ID

func (m *TickerMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TickerMutation) IDs

func (m *TickerMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TickerMutation) IsAnomaly

func (m *TickerMutation) IsAnomaly() (r bool, exists bool)

IsAnomaly returns the value of the "is_anomaly" field in the mutation.

func (*TickerMutation) IsAnomalyCleared

func (m *TickerMutation) IsAnomalyCleared() bool

IsAnomalyCleared returns if the "is_anomaly" field was cleared in this mutation.

func (*TickerMutation) IsStale

func (m *TickerMutation) IsStale() (r bool, exists bool)

IsStale returns the value of the "is_stale" field in the mutation.

func (*TickerMutation) IsStaleCleared

func (m *TickerMutation) IsStaleCleared() bool

IsStaleCleared returns if the "is_stale" field was cleared in this mutation.

func (*TickerMutation) Last

func (m *TickerMutation) Last() (r float64, exists bool)

Last returns the value of the "last" field in the mutation.

func (*TickerMutation) LastCleared

func (m *TickerMutation) LastCleared() bool

LastCleared returns if the "last" field was cleared in this mutation.

func (*TickerMutation) LastFetchAt

func (m *TickerMutation) LastFetchAt() (r time.Time, exists bool)

LastFetchAt returns the value of the "last_fetch_at" field in the mutation.

func (*TickerMutation) LastFetchAtCleared

func (m *TickerMutation) LastFetchAtCleared() bool

LastFetchAtCleared returns if the "last_fetch_at" field was cleared in this mutation.

func (*TickerMutation) LastTradedAt

func (m *TickerMutation) LastTradedAt() (r time.Time, exists bool)

LastTradedAt returns the value of the "last_traded_at" field in the mutation.

func (*TickerMutation) LastTradedAtCleared

func (m *TickerMutation) LastTradedAtCleared() bool

LastTradedAtCleared returns if the "last_traded_at" field was cleared in this mutation.

func (*TickerMutation) Market

func (m *TickerMutation) Market() (r models.Market, exists bool)

Market returns the value of the "market" field in the mutation.

func (*TickerMutation) MarketCleared

func (m *TickerMutation) MarketCleared() bool

MarketCleared returns if the "market" field was cleared in this mutation.

func (*TickerMutation) OldBase

func (m *TickerMutation) OldBase(ctx context.Context) (v string, err error)

OldBase returns the old "base" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldBaseCoinID

func (m *TickerMutation) OldBaseCoinID(ctx context.Context) (v string, err error)

OldBaseCoinID returns the old "base_coin_id" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldBidAskSpreadPercentage

func (m *TickerMutation) OldBidAskSpreadPercentage(ctx context.Context) (v float64, err error)

OldBidAskSpreadPercentage returns the old "bid_ask_spread_percentage" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldConvertedLast

func (m *TickerMutation) OldConvertedLast(ctx context.Context) (v models.ConvertedDetails, err error)

OldConvertedLast returns the old "converted_last" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldConvertedVolume

func (m *TickerMutation) OldConvertedVolume(ctx context.Context) (v models.ConvertedDetails, err error)

OldConvertedVolume returns the old "converted_volume" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldCounter

func (m *TickerMutation) OldCounter(ctx context.Context) (v string, err error)

OldCounter returns the old "counter" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldCounterCoinID

func (m *TickerMutation) OldCounterCoinID(ctx context.Context) (v string, err error)

OldCounterCoinID returns the old "counter_coin_id" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldField

func (m *TickerMutation) 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 (*TickerMutation) OldIsAnomaly

func (m *TickerMutation) OldIsAnomaly(ctx context.Context) (v bool, err error)

OldIsAnomaly returns the old "is_anomaly" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldIsStale

func (m *TickerMutation) OldIsStale(ctx context.Context) (v bool, err error)

OldIsStale returns the old "is_stale" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldLast

func (m *TickerMutation) OldLast(ctx context.Context) (v float64, err error)

OldLast returns the old "last" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldLastFetchAt

func (m *TickerMutation) OldLastFetchAt(ctx context.Context) (v time.Time, err error)

OldLastFetchAt returns the old "last_fetch_at" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldLastTradedAt

func (m *TickerMutation) OldLastTradedAt(ctx context.Context) (v time.Time, err error)

OldLastTradedAt returns the old "last_traded_at" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldMarket

func (m *TickerMutation) OldMarket(ctx context.Context) (v models.Market, err error)

OldMarket returns the old "market" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldTimestamp

func (m *TickerMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)

OldTimestamp returns the old "timestamp" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldTokenInfoURL

func (m *TickerMutation) OldTokenInfoURL(ctx context.Context) (v string, err error)

OldTokenInfoURL returns the old "token_info_url" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldTradeURL

func (m *TickerMutation) OldTradeURL(ctx context.Context) (v string, err error)

OldTradeURL returns the old "trade_url" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldTrustScore

func (m *TickerMutation) OldTrustScore(ctx context.Context) (v string, err error)

OldTrustScore returns the old "trust_score" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) OldVolume

func (m *TickerMutation) OldVolume(ctx context.Context) (v float64, err error)

OldVolume returns the old "volume" field's value of the Ticker entity. If the Ticker 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 (*TickerMutation) Op

func (m *TickerMutation) Op() Op

Op returns the operation name.

func (*TickerMutation) QueryContext

func (c *TickerMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerMutation) RemovedEdges

func (m *TickerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TickerMutation) RemovedIDs

func (m *TickerMutation) 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 (*TickerMutation) ResetBase

func (m *TickerMutation) ResetBase()

ResetBase resets all changes to the "base" field.

func (*TickerMutation) ResetBaseCoinID

func (m *TickerMutation) ResetBaseCoinID()

ResetBaseCoinID resets all changes to the "base_coin_id" field.

func (*TickerMutation) ResetBidAskSpreadPercentage

func (m *TickerMutation) ResetBidAskSpreadPercentage()

ResetBidAskSpreadPercentage resets all changes to the "bid_ask_spread_percentage" field.

func (*TickerMutation) ResetConvertedLast

func (m *TickerMutation) ResetConvertedLast()

ResetConvertedLast resets all changes to the "converted_last" field.

func (*TickerMutation) ResetConvertedVolume

func (m *TickerMutation) ResetConvertedVolume()

ResetConvertedVolume resets all changes to the "converted_volume" field.

func (*TickerMutation) ResetCounter

func (m *TickerMutation) ResetCounter()

ResetCounter resets all changes to the "counter" field.

func (*TickerMutation) ResetCounterCoinID

func (m *TickerMutation) ResetCounterCoinID()

ResetCounterCoinID resets all changes to the "counter_coin_id" field.

func (*TickerMutation) ResetEdge

func (m *TickerMutation) 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 (*TickerMutation) ResetField

func (m *TickerMutation) 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 (*TickerMutation) ResetIsAnomaly

func (m *TickerMutation) ResetIsAnomaly()

ResetIsAnomaly resets all changes to the "is_anomaly" field.

func (*TickerMutation) ResetIsStale

func (m *TickerMutation) ResetIsStale()

ResetIsStale resets all changes to the "is_stale" field.

func (*TickerMutation) ResetLast

func (m *TickerMutation) ResetLast()

ResetLast resets all changes to the "last" field.

func (*TickerMutation) ResetLastFetchAt

func (m *TickerMutation) ResetLastFetchAt()

ResetLastFetchAt resets all changes to the "last_fetch_at" field.

func (*TickerMutation) ResetLastTradedAt

func (m *TickerMutation) ResetLastTradedAt()

ResetLastTradedAt resets all changes to the "last_traded_at" field.

func (*TickerMutation) ResetMarket

func (m *TickerMutation) ResetMarket()

ResetMarket resets all changes to the "market" field.

func (*TickerMutation) ResetTimestamp

func (m *TickerMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*TickerMutation) ResetTokenInfoURL

func (m *TickerMutation) ResetTokenInfoURL()

ResetTokenInfoURL resets all changes to the "token_info_url" field.

func (*TickerMutation) ResetTradeURL

func (m *TickerMutation) ResetTradeURL()

ResetTradeURL resets all changes to the "trade_url" field.

func (*TickerMutation) ResetTrustScore

func (m *TickerMutation) ResetTrustScore()

ResetTrustScore resets all changes to the "trust_score" field.

func (*TickerMutation) ResetVenue

func (m *TickerMutation) ResetVenue()

ResetVenue resets all changes to the "venue" edge.

func (*TickerMutation) ResetVolume

func (m *TickerMutation) ResetVolume()

ResetVolume resets all changes to the "volume" field.

func (*TickerMutation) SetBase

func (m *TickerMutation) SetBase(s string)

SetBase sets the "base" field.

func (*TickerMutation) SetBaseCoinID

func (m *TickerMutation) SetBaseCoinID(s string)

SetBaseCoinID sets the "base_coin_id" field.

func (*TickerMutation) SetBidAskSpreadPercentage

func (m *TickerMutation) SetBidAskSpreadPercentage(f float64)

SetBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field.

func (*TickerMutation) SetConvertedLast

func (m *TickerMutation) SetConvertedLast(md models.ConvertedDetails)

SetConvertedLast sets the "converted_last" field.

func (*TickerMutation) SetConvertedVolume

func (m *TickerMutation) SetConvertedVolume(md models.ConvertedDetails)

SetConvertedVolume sets the "converted_volume" field.

func (*TickerMutation) SetCounter

func (m *TickerMutation) SetCounter(s string)

SetCounter sets the "counter" field.

func (*TickerMutation) SetCounterCoinID

func (m *TickerMutation) SetCounterCoinID(s string)

SetCounterCoinID sets the "counter_coin_id" field.

func (*TickerMutation) SetField

func (m *TickerMutation) 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 (*TickerMutation) SetIsAnomaly

func (m *TickerMutation) SetIsAnomaly(b bool)

SetIsAnomaly sets the "is_anomaly" field.

func (*TickerMutation) SetIsStale

func (m *TickerMutation) SetIsStale(b bool)

SetIsStale sets the "is_stale" field.

func (*TickerMutation) SetLast

func (m *TickerMutation) SetLast(f float64)

SetLast sets the "last" field.

func (*TickerMutation) SetLastFetchAt

func (m *TickerMutation) SetLastFetchAt(t time.Time)

SetLastFetchAt sets the "last_fetch_at" field.

func (*TickerMutation) SetLastTradedAt

func (m *TickerMutation) SetLastTradedAt(t time.Time)

SetLastTradedAt sets the "last_traded_at" field.

func (*TickerMutation) SetMarket

func (m *TickerMutation) SetMarket(value models.Market)

SetMarket sets the "market" field.

func (*TickerMutation) SetOp

func (m *TickerMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TickerMutation) SetTimestamp

func (m *TickerMutation) SetTimestamp(t time.Time)

SetTimestamp sets the "timestamp" field.

func (*TickerMutation) SetTokenInfoURL

func (m *TickerMutation) SetTokenInfoURL(s string)

SetTokenInfoURL sets the "token_info_url" field.

func (*TickerMutation) SetTradeURL

func (m *TickerMutation) SetTradeURL(s string)

SetTradeURL sets the "trade_url" field.

func (*TickerMutation) SetTrustScore

func (m *TickerMutation) SetTrustScore(s string)

SetTrustScore sets the "trust_score" field.

func (*TickerMutation) SetVenueID

func (m *TickerMutation) SetVenueID(id int)

SetVenueID sets the "venue" edge to the Venue entity by id.

func (*TickerMutation) SetVolume

func (m *TickerMutation) SetVolume(f float64)

SetVolume sets the "volume" field.

func (*TickerMutation) Timestamp

func (m *TickerMutation) Timestamp() (r time.Time, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (*TickerMutation) TimestampCleared

func (m *TickerMutation) TimestampCleared() bool

TimestampCleared returns if the "timestamp" field was cleared in this mutation.

func (*TickerMutation) TokenInfoURL

func (m *TickerMutation) TokenInfoURL() (r string, exists bool)

TokenInfoURL returns the value of the "token_info_url" field in the mutation.

func (*TickerMutation) TokenInfoURLCleared

func (m *TickerMutation) TokenInfoURLCleared() bool

TokenInfoURLCleared returns if the "token_info_url" field was cleared in this mutation.

func (*TickerMutation) TradeURL

func (m *TickerMutation) TradeURL() (r string, exists bool)

TradeURL returns the value of the "trade_url" field in the mutation.

func (*TickerMutation) TradeURLCleared

func (m *TickerMutation) TradeURLCleared() bool

TradeURLCleared returns if the "trade_url" field was cleared in this mutation.

func (*TickerMutation) TrustScore

func (m *TickerMutation) TrustScore() (r string, exists bool)

TrustScore returns the value of the "trust_score" field in the mutation.

func (*TickerMutation) TrustScoreCleared

func (m *TickerMutation) TrustScoreCleared() bool

TrustScoreCleared returns if the "trust_score" field was cleared in this mutation.

func (TickerMutation) Tx

func (m TickerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TickerMutation) Type

func (m *TickerMutation) Type() string

Type returns the node type of this mutation (Ticker).

func (*TickerMutation) VenueCleared

func (m *TickerMutation) VenueCleared() bool

VenueCleared reports if the "venue" edge to the Venue entity was cleared.

func (*TickerMutation) VenueID

func (m *TickerMutation) VenueID() (id int, exists bool)

VenueID returns the "venue" edge ID in the mutation.

func (*TickerMutation) VenueIDs

func (m *TickerMutation) VenueIDs() (ids []int)

VenueIDs returns the "venue" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VenueID instead. It exists only for internal usage by the builders.

func (*TickerMutation) Volume

func (m *TickerMutation) Volume() (r float64, exists bool)

Volume returns the value of the "volume" field in the mutation.

func (*TickerMutation) VolumeCleared

func (m *TickerMutation) VolumeCleared() bool

VolumeCleared returns if the "volume" field was cleared in this mutation.

func (*TickerMutation) Where

func (m *TickerMutation) Where(ps ...predicate.Ticker)

Where appends a list predicates to the TickerMutation builder.

func (*TickerMutation) WhereP

func (m *TickerMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TickerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TickerOrder

type TickerOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *TickerOrderField `json:"field"`
}

TickerOrder defines the ordering of Ticker.

type TickerOrderField

type TickerOrderField struct {
	// contains filtered or unexported fields
}

TickerOrderField defines the ordering field of Ticker.

func (TickerOrderField) MarshalGQL

func (f TickerOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (TickerOrderField) String

func (f TickerOrderField) String() string

String implement fmt.Stringer interface.

func (*TickerOrderField) UnmarshalGQL

func (f *TickerOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type TickerPaginateOption

type TickerPaginateOption func(*tickerPager) error

TickerPaginateOption enables pagination customization.

func WithTickerFilter

func WithTickerFilter(filter func(*TickerQuery) (*TickerQuery, error)) TickerPaginateOption

WithTickerFilter configures pagination filter.

func WithTickerOrder

func WithTickerOrder(order *TickerOrder) TickerPaginateOption

WithTickerOrder configures pagination ordering.

type TickerQuery

type TickerQuery struct {
	// contains filtered or unexported fields
}

TickerQuery is the builder for querying Ticker entities.

func (*TickerQuery) Aggregate

func (tq *TickerQuery) Aggregate(fns ...AggregateFunc) *TickerSelect

Aggregate returns a TickerSelect configured with the given aggregations.

func (*TickerQuery) All

func (tq *TickerQuery) All(ctx context.Context) ([]*Ticker, error)

All executes the query and returns a list of Tickers.

func (*TickerQuery) AllX

func (tq *TickerQuery) AllX(ctx context.Context) []*Ticker

AllX is like All, but panics if an error occurs.

func (*TickerQuery) Clone

func (tq *TickerQuery) Clone() *TickerQuery

Clone returns a duplicate of the TickerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TickerQuery) CollectFields

func (t *TickerQuery) CollectFields(ctx context.Context, satisfies ...string) (*TickerQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*TickerQuery) Count

func (tq *TickerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TickerQuery) CountX

func (tq *TickerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TickerQuery) ExecContext

func (c *TickerQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerQuery) Exist

func (tq *TickerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TickerQuery) ExistX

func (tq *TickerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TickerQuery) Filter

func (tq *TickerQuery) Filter() *TickerFilter

Filter returns a Filter implementation to apply filters on the TickerQuery builder.

func (*TickerQuery) First

func (tq *TickerQuery) First(ctx context.Context) (*Ticker, error)

First returns the first Ticker entity from the query. Returns a *NotFoundError when no Ticker was found.

func (*TickerQuery) FirstID

func (tq *TickerQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Ticker ID from the query. Returns a *NotFoundError when no Ticker ID was found.

func (*TickerQuery) FirstIDX

func (tq *TickerQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*TickerQuery) FirstX

func (tq *TickerQuery) FirstX(ctx context.Context) *Ticker

FirstX is like First, but panics if an error occurs.

func (*TickerQuery) ForShare

func (tq *TickerQuery) ForShare(opts ...sql.LockOption) *TickerQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*TickerQuery) ForUpdate

func (tq *TickerQuery) ForUpdate(opts ...sql.LockOption) *TickerQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*TickerQuery) GroupBy

func (tq *TickerQuery) GroupBy(field string, fields ...string) *TickerGroupBy

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 {
	Base string `json:"base,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Ticker.Query().
	GroupBy(ticker.FieldBase).
	Aggregate(entities.Count()).
	Scan(ctx, &v)

func (*TickerQuery) IDs

func (tq *TickerQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Ticker IDs.

func (*TickerQuery) IDsX

func (tq *TickerQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*TickerQuery) Limit

func (tq *TickerQuery) Limit(limit int) *TickerQuery

Limit the number of records to be returned by this query.

func (*TickerQuery) Modify

func (tq *TickerQuery) Modify(modifiers ...func(s *sql.Selector)) *TickerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TickerQuery) Offset

func (tq *TickerQuery) Offset(offset int) *TickerQuery

Offset to start from.

func (*TickerQuery) Only

func (tq *TickerQuery) Only(ctx context.Context) (*Ticker, error)

Only returns a single Ticker entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Ticker entity is found. Returns a *NotFoundError when no Ticker entities are found.

func (*TickerQuery) OnlyID

func (tq *TickerQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Ticker ID in the query. Returns a *NotSingularError when more than one Ticker ID is found. Returns a *NotFoundError when no entities are found.

func (*TickerQuery) OnlyIDX

func (tq *TickerQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TickerQuery) OnlyX

func (tq *TickerQuery) OnlyX(ctx context.Context) *Ticker

OnlyX is like Only, but panics if an error occurs.

func (*TickerQuery) Order

func (tq *TickerQuery) Order(o ...OrderFunc) *TickerQuery

Order specifies how the records should be ordered.

func (*TickerQuery) Paginate

func (t *TickerQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...TickerPaginateOption,
) (*TickerConnection, error)

Paginate executes the query and returns a relay based cursor connection to Ticker.

func (*TickerQuery) QueryContext

func (c *TickerQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerQuery) QueryVenue

func (tq *TickerQuery) QueryVenue() *VenueQuery

QueryVenue chains the current query on the "venue" edge.

func (*TickerQuery) Select

func (tq *TickerQuery) Select(fields ...string) *TickerSelect

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 {
	Base string `json:"base,omitempty"`
}

client.Ticker.Query().
	Select(ticker.FieldBase).
	Scan(ctx, &v)

func (*TickerQuery) Unique

func (tq *TickerQuery) Unique(unique bool) *TickerQuery

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 (*TickerQuery) Where

func (tq *TickerQuery) Where(ps ...predicate.Ticker) *TickerQuery

Where adds a new predicate for the TickerQuery builder.

func (*TickerQuery) WithVenue

func (tq *TickerQuery) WithVenue(opts ...func(*VenueQuery)) *TickerQuery

WithVenue tells the query-builder to eager-load the nodes that are connected to the "venue" edge. The optional arguments are used to configure the query builder of the edge.

type TickerSelect

type TickerSelect struct {
	*TickerQuery
	// contains filtered or unexported fields
}

TickerSelect is the builder for selecting fields of Ticker entities.

func (*TickerSelect) Aggregate

func (ts *TickerSelect) Aggregate(fns ...AggregateFunc) *TickerSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TickerSelect) Bool

func (s *TickerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TickerSelect) BoolX

func (s *TickerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TickerSelect) Bools

func (s *TickerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TickerSelect) BoolsX

func (s *TickerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (TickerSelect) ExecContext

func (c TickerSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerSelect) Float64

func (s *TickerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TickerSelect) Float64X

func (s *TickerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TickerSelect) Float64s

func (s *TickerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TickerSelect) Float64sX

func (s *TickerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TickerSelect) Int

func (s *TickerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TickerSelect) IntX

func (s *TickerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TickerSelect) Ints

func (s *TickerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TickerSelect) IntsX

func (s *TickerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TickerSelect) Modify

func (ts *TickerSelect) Modify(modifiers ...func(s *sql.Selector)) *TickerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (TickerSelect) QueryContext

func (c TickerSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerSelect) Scan

func (ts *TickerSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TickerSelect) ScanX

func (s *TickerSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TickerSelect) String

func (s *TickerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TickerSelect) StringX

func (s *TickerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TickerSelect) Strings

func (s *TickerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TickerSelect) StringsX

func (s *TickerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TickerUpdate

type TickerUpdate struct {
	// contains filtered or unexported fields
}

TickerUpdate is the builder for updating Ticker entities.

func (*TickerUpdate) AddBidAskSpreadPercentage

func (tu *TickerUpdate) AddBidAskSpreadPercentage(f float64) *TickerUpdate

AddBidAskSpreadPercentage adds f to the "bid_ask_spread_percentage" field.

func (*TickerUpdate) AddLast

func (tu *TickerUpdate) AddLast(f float64) *TickerUpdate

AddLast adds f to the "last" field.

func (*TickerUpdate) AddVolume

func (tu *TickerUpdate) AddVolume(f float64) *TickerUpdate

AddVolume adds f to the "volume" field.

func (*TickerUpdate) ClearBaseCoinID

func (tu *TickerUpdate) ClearBaseCoinID() *TickerUpdate

ClearBaseCoinID clears the value of the "base_coin_id" field.

func (*TickerUpdate) ClearBidAskSpreadPercentage

func (tu *TickerUpdate) ClearBidAskSpreadPercentage() *TickerUpdate

ClearBidAskSpreadPercentage clears the value of the "bid_ask_spread_percentage" field.

func (*TickerUpdate) ClearConvertedLast

func (tu *TickerUpdate) ClearConvertedLast() *TickerUpdate

ClearConvertedLast clears the value of the "converted_last" field.

func (*TickerUpdate) ClearConvertedVolume

func (tu *TickerUpdate) ClearConvertedVolume() *TickerUpdate

ClearConvertedVolume clears the value of the "converted_volume" field.

func (*TickerUpdate) ClearCounterCoinID

func (tu *TickerUpdate) ClearCounterCoinID() *TickerUpdate

ClearCounterCoinID clears the value of the "counter_coin_id" field.

func (*TickerUpdate) ClearIsAnomaly

func (tu *TickerUpdate) ClearIsAnomaly() *TickerUpdate

ClearIsAnomaly clears the value of the "is_anomaly" field.

func (*TickerUpdate) ClearIsStale

func (tu *TickerUpdate) ClearIsStale() *TickerUpdate

ClearIsStale clears the value of the "is_stale" field.

func (*TickerUpdate) ClearLast

func (tu *TickerUpdate) ClearLast() *TickerUpdate

ClearLast clears the value of the "last" field.

func (*TickerUpdate) ClearLastFetchAt

func (tu *TickerUpdate) ClearLastFetchAt() *TickerUpdate

ClearLastFetchAt clears the value of the "last_fetch_at" field.

func (*TickerUpdate) ClearLastTradedAt

func (tu *TickerUpdate) ClearLastTradedAt() *TickerUpdate

ClearLastTradedAt clears the value of the "last_traded_at" field.

func (*TickerUpdate) ClearMarket

func (tu *TickerUpdate) ClearMarket() *TickerUpdate

ClearMarket clears the value of the "market" field.

func (*TickerUpdate) ClearTimestamp

func (tu *TickerUpdate) ClearTimestamp() *TickerUpdate

ClearTimestamp clears the value of the "timestamp" field.

func (*TickerUpdate) ClearTokenInfoURL

func (tu *TickerUpdate) ClearTokenInfoURL() *TickerUpdate

ClearTokenInfoURL clears the value of the "token_info_url" field.

func (*TickerUpdate) ClearTradeURL

func (tu *TickerUpdate) ClearTradeURL() *TickerUpdate

ClearTradeURL clears the value of the "trade_url" field.

func (*TickerUpdate) ClearTrustScore

func (tu *TickerUpdate) ClearTrustScore() *TickerUpdate

ClearTrustScore clears the value of the "trust_score" field.

func (*TickerUpdate) ClearVenue

func (tu *TickerUpdate) ClearVenue() *TickerUpdate

ClearVenue clears the "venue" edge to the Venue entity.

func (*TickerUpdate) ClearVolume

func (tu *TickerUpdate) ClearVolume() *TickerUpdate

ClearVolume clears the value of the "volume" field.

func (*TickerUpdate) Exec

func (tu *TickerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TickerUpdate) ExecContext

func (c *TickerUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerUpdate) ExecX

func (tu *TickerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TickerUpdate) Modify

func (tu *TickerUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TickerUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TickerUpdate) Mutation

func (tu *TickerUpdate) Mutation() *TickerMutation

Mutation returns the TickerMutation object of the builder.

func (*TickerUpdate) QueryContext

func (c *TickerUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerUpdate) Save

func (tu *TickerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TickerUpdate) SaveX

func (tu *TickerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TickerUpdate) SetBase

func (tu *TickerUpdate) SetBase(s string) *TickerUpdate

SetBase sets the "base" field.

func (*TickerUpdate) SetBaseCoinID

func (tu *TickerUpdate) SetBaseCoinID(s string) *TickerUpdate

SetBaseCoinID sets the "base_coin_id" field.

func (*TickerUpdate) SetBidAskSpreadPercentage

func (tu *TickerUpdate) SetBidAskSpreadPercentage(f float64) *TickerUpdate

SetBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field.

func (*TickerUpdate) SetConvertedLast

func (tu *TickerUpdate) SetConvertedLast(md models.ConvertedDetails) *TickerUpdate

SetConvertedLast sets the "converted_last" field.

func (*TickerUpdate) SetConvertedVolume

func (tu *TickerUpdate) SetConvertedVolume(md models.ConvertedDetails) *TickerUpdate

SetConvertedVolume sets the "converted_volume" field.

func (*TickerUpdate) SetCounter

func (tu *TickerUpdate) SetCounter(s string) *TickerUpdate

SetCounter sets the "counter" field.

func (*TickerUpdate) SetCounterCoinID

func (tu *TickerUpdate) SetCounterCoinID(s string) *TickerUpdate

SetCounterCoinID sets the "counter_coin_id" field.

func (*TickerUpdate) SetIsAnomaly

func (tu *TickerUpdate) SetIsAnomaly(b bool) *TickerUpdate

SetIsAnomaly sets the "is_anomaly" field.

func (*TickerUpdate) SetIsStale

func (tu *TickerUpdate) SetIsStale(b bool) *TickerUpdate

SetIsStale sets the "is_stale" field.

func (*TickerUpdate) SetLast

func (tu *TickerUpdate) SetLast(f float64) *TickerUpdate

SetLast sets the "last" field.

func (*TickerUpdate) SetLastFetchAt

func (tu *TickerUpdate) SetLastFetchAt(t time.Time) *TickerUpdate

SetLastFetchAt sets the "last_fetch_at" field.

func (*TickerUpdate) SetLastTradedAt

func (tu *TickerUpdate) SetLastTradedAt(t time.Time) *TickerUpdate

SetLastTradedAt sets the "last_traded_at" field.

func (*TickerUpdate) SetMarket

func (tu *TickerUpdate) SetMarket(m models.Market) *TickerUpdate

SetMarket sets the "market" field.

func (*TickerUpdate) SetNillableBaseCoinID

func (tu *TickerUpdate) SetNillableBaseCoinID(s *string) *TickerUpdate

SetNillableBaseCoinID sets the "base_coin_id" field if the given value is not nil.

func (*TickerUpdate) SetNillableBidAskSpreadPercentage

func (tu *TickerUpdate) SetNillableBidAskSpreadPercentage(f *float64) *TickerUpdate

SetNillableBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field if the given value is not nil.

func (*TickerUpdate) SetNillableConvertedLast

func (tu *TickerUpdate) SetNillableConvertedLast(md *models.ConvertedDetails) *TickerUpdate

SetNillableConvertedLast sets the "converted_last" field if the given value is not nil.

func (*TickerUpdate) SetNillableConvertedVolume

func (tu *TickerUpdate) SetNillableConvertedVolume(md *models.ConvertedDetails) *TickerUpdate

SetNillableConvertedVolume sets the "converted_volume" field if the given value is not nil.

func (*TickerUpdate) SetNillableCounterCoinID

func (tu *TickerUpdate) SetNillableCounterCoinID(s *string) *TickerUpdate

SetNillableCounterCoinID sets the "counter_coin_id" field if the given value is not nil.

func (*TickerUpdate) SetNillableIsAnomaly

func (tu *TickerUpdate) SetNillableIsAnomaly(b *bool) *TickerUpdate

SetNillableIsAnomaly sets the "is_anomaly" field if the given value is not nil.

func (*TickerUpdate) SetNillableIsStale

func (tu *TickerUpdate) SetNillableIsStale(b *bool) *TickerUpdate

SetNillableIsStale sets the "is_stale" field if the given value is not nil.

func (*TickerUpdate) SetNillableLast

func (tu *TickerUpdate) SetNillableLast(f *float64) *TickerUpdate

SetNillableLast sets the "last" field if the given value is not nil.

func (*TickerUpdate) SetNillableLastFetchAt

func (tu *TickerUpdate) SetNillableLastFetchAt(t *time.Time) *TickerUpdate

SetNillableLastFetchAt sets the "last_fetch_at" field if the given value is not nil.

func (*TickerUpdate) SetNillableLastTradedAt

func (tu *TickerUpdate) SetNillableLastTradedAt(t *time.Time) *TickerUpdate

SetNillableLastTradedAt sets the "last_traded_at" field if the given value is not nil.

func (*TickerUpdate) SetNillableMarket

func (tu *TickerUpdate) SetNillableMarket(m *models.Market) *TickerUpdate

SetNillableMarket sets the "market" field if the given value is not nil.

func (*TickerUpdate) SetNillableTimestamp

func (tu *TickerUpdate) SetNillableTimestamp(t *time.Time) *TickerUpdate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*TickerUpdate) SetNillableTokenInfoURL

func (tu *TickerUpdate) SetNillableTokenInfoURL(s *string) *TickerUpdate

SetNillableTokenInfoURL sets the "token_info_url" field if the given value is not nil.

func (*TickerUpdate) SetNillableTradeURL

func (tu *TickerUpdate) SetNillableTradeURL(s *string) *TickerUpdate

SetNillableTradeURL sets the "trade_url" field if the given value is not nil.

func (*TickerUpdate) SetNillableTrustScore

func (tu *TickerUpdate) SetNillableTrustScore(s *string) *TickerUpdate

SetNillableTrustScore sets the "trust_score" field if the given value is not nil.

func (*TickerUpdate) SetNillableVolume

func (tu *TickerUpdate) SetNillableVolume(f *float64) *TickerUpdate

SetNillableVolume sets the "volume" field if the given value is not nil.

func (*TickerUpdate) SetTimestamp

func (tu *TickerUpdate) SetTimestamp(t time.Time) *TickerUpdate

SetTimestamp sets the "timestamp" field.

func (*TickerUpdate) SetTokenInfoURL

func (tu *TickerUpdate) SetTokenInfoURL(s string) *TickerUpdate

SetTokenInfoURL sets the "token_info_url" field.

func (*TickerUpdate) SetTradeURL

func (tu *TickerUpdate) SetTradeURL(s string) *TickerUpdate

SetTradeURL sets the "trade_url" field.

func (*TickerUpdate) SetTrustScore

func (tu *TickerUpdate) SetTrustScore(s string) *TickerUpdate

SetTrustScore sets the "trust_score" field.

func (*TickerUpdate) SetVenue

func (tu *TickerUpdate) SetVenue(v *Venue) *TickerUpdate

SetVenue sets the "venue" edge to the Venue entity.

func (*TickerUpdate) SetVenueID

func (tu *TickerUpdate) SetVenueID(id int) *TickerUpdate

SetVenueID sets the "venue" edge to the Venue entity by ID.

func (*TickerUpdate) SetVolume

func (tu *TickerUpdate) SetVolume(f float64) *TickerUpdate

SetVolume sets the "volume" field.

func (*TickerUpdate) Where

func (tu *TickerUpdate) Where(ps ...predicate.Ticker) *TickerUpdate

Where appends a list predicates to the TickerUpdate builder.

type TickerUpdateOne

type TickerUpdateOne struct {
	// contains filtered or unexported fields
}

TickerUpdateOne is the builder for updating a single Ticker entity.

func (*TickerUpdateOne) AddBidAskSpreadPercentage

func (tuo *TickerUpdateOne) AddBidAskSpreadPercentage(f float64) *TickerUpdateOne

AddBidAskSpreadPercentage adds f to the "bid_ask_spread_percentage" field.

func (*TickerUpdateOne) AddLast

func (tuo *TickerUpdateOne) AddLast(f float64) *TickerUpdateOne

AddLast adds f to the "last" field.

func (*TickerUpdateOne) AddVolume

func (tuo *TickerUpdateOne) AddVolume(f float64) *TickerUpdateOne

AddVolume adds f to the "volume" field.

func (*TickerUpdateOne) ClearBaseCoinID

func (tuo *TickerUpdateOne) ClearBaseCoinID() *TickerUpdateOne

ClearBaseCoinID clears the value of the "base_coin_id" field.

func (*TickerUpdateOne) ClearBidAskSpreadPercentage

func (tuo *TickerUpdateOne) ClearBidAskSpreadPercentage() *TickerUpdateOne

ClearBidAskSpreadPercentage clears the value of the "bid_ask_spread_percentage" field.

func (*TickerUpdateOne) ClearConvertedLast

func (tuo *TickerUpdateOne) ClearConvertedLast() *TickerUpdateOne

ClearConvertedLast clears the value of the "converted_last" field.

func (*TickerUpdateOne) ClearConvertedVolume

func (tuo *TickerUpdateOne) ClearConvertedVolume() *TickerUpdateOne

ClearConvertedVolume clears the value of the "converted_volume" field.

func (*TickerUpdateOne) ClearCounterCoinID

func (tuo *TickerUpdateOne) ClearCounterCoinID() *TickerUpdateOne

ClearCounterCoinID clears the value of the "counter_coin_id" field.

func (*TickerUpdateOne) ClearIsAnomaly

func (tuo *TickerUpdateOne) ClearIsAnomaly() *TickerUpdateOne

ClearIsAnomaly clears the value of the "is_anomaly" field.

func (*TickerUpdateOne) ClearIsStale

func (tuo *TickerUpdateOne) ClearIsStale() *TickerUpdateOne

ClearIsStale clears the value of the "is_stale" field.

func (*TickerUpdateOne) ClearLast

func (tuo *TickerUpdateOne) ClearLast() *TickerUpdateOne

ClearLast clears the value of the "last" field.

func (*TickerUpdateOne) ClearLastFetchAt

func (tuo *TickerUpdateOne) ClearLastFetchAt() *TickerUpdateOne

ClearLastFetchAt clears the value of the "last_fetch_at" field.

func (*TickerUpdateOne) ClearLastTradedAt

func (tuo *TickerUpdateOne) ClearLastTradedAt() *TickerUpdateOne

ClearLastTradedAt clears the value of the "last_traded_at" field.

func (*TickerUpdateOne) ClearMarket

func (tuo *TickerUpdateOne) ClearMarket() *TickerUpdateOne

ClearMarket clears the value of the "market" field.

func (*TickerUpdateOne) ClearTimestamp

func (tuo *TickerUpdateOne) ClearTimestamp() *TickerUpdateOne

ClearTimestamp clears the value of the "timestamp" field.

func (*TickerUpdateOne) ClearTokenInfoURL

func (tuo *TickerUpdateOne) ClearTokenInfoURL() *TickerUpdateOne

ClearTokenInfoURL clears the value of the "token_info_url" field.

func (*TickerUpdateOne) ClearTradeURL

func (tuo *TickerUpdateOne) ClearTradeURL() *TickerUpdateOne

ClearTradeURL clears the value of the "trade_url" field.

func (*TickerUpdateOne) ClearTrustScore

func (tuo *TickerUpdateOne) ClearTrustScore() *TickerUpdateOne

ClearTrustScore clears the value of the "trust_score" field.

func (*TickerUpdateOne) ClearVenue

func (tuo *TickerUpdateOne) ClearVenue() *TickerUpdateOne

ClearVenue clears the "venue" edge to the Venue entity.

func (*TickerUpdateOne) ClearVolume

func (tuo *TickerUpdateOne) ClearVolume() *TickerUpdateOne

ClearVolume clears the value of the "volume" field.

func (*TickerUpdateOne) Exec

func (tuo *TickerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TickerUpdateOne) ExecContext

func (c *TickerUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TickerUpdateOne) ExecX

func (tuo *TickerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TickerUpdateOne) Modify

func (tuo *TickerUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TickerUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TickerUpdateOne) Mutation

func (tuo *TickerUpdateOne) Mutation() *TickerMutation

Mutation returns the TickerMutation object of the builder.

func (*TickerUpdateOne) QueryContext

func (c *TickerUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TickerUpdateOne) Save

func (tuo *TickerUpdateOne) Save(ctx context.Context) (*Ticker, error)

Save executes the query and returns the updated Ticker entity.

func (*TickerUpdateOne) SaveX

func (tuo *TickerUpdateOne) SaveX(ctx context.Context) *Ticker

SaveX is like Save, but panics if an error occurs.

func (*TickerUpdateOne) Select

func (tuo *TickerUpdateOne) Select(field string, fields ...string) *TickerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TickerUpdateOne) SetBase

func (tuo *TickerUpdateOne) SetBase(s string) *TickerUpdateOne

SetBase sets the "base" field.

func (*TickerUpdateOne) SetBaseCoinID

func (tuo *TickerUpdateOne) SetBaseCoinID(s string) *TickerUpdateOne

SetBaseCoinID sets the "base_coin_id" field.

func (*TickerUpdateOne) SetBidAskSpreadPercentage

func (tuo *TickerUpdateOne) SetBidAskSpreadPercentage(f float64) *TickerUpdateOne

SetBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field.

func (*TickerUpdateOne) SetConvertedLast

func (tuo *TickerUpdateOne) SetConvertedLast(md models.ConvertedDetails) *TickerUpdateOne

SetConvertedLast sets the "converted_last" field.

func (*TickerUpdateOne) SetConvertedVolume

func (tuo *TickerUpdateOne) SetConvertedVolume(md models.ConvertedDetails) *TickerUpdateOne

SetConvertedVolume sets the "converted_volume" field.

func (*TickerUpdateOne) SetCounter

func (tuo *TickerUpdateOne) SetCounter(s string) *TickerUpdateOne

SetCounter sets the "counter" field.

func (*TickerUpdateOne) SetCounterCoinID

func (tuo *TickerUpdateOne) SetCounterCoinID(s string) *TickerUpdateOne

SetCounterCoinID sets the "counter_coin_id" field.

func (*TickerUpdateOne) SetIsAnomaly

func (tuo *TickerUpdateOne) SetIsAnomaly(b bool) *TickerUpdateOne

SetIsAnomaly sets the "is_anomaly" field.

func (*TickerUpdateOne) SetIsStale

func (tuo *TickerUpdateOne) SetIsStale(b bool) *TickerUpdateOne

SetIsStale sets the "is_stale" field.

func (*TickerUpdateOne) SetLast

func (tuo *TickerUpdateOne) SetLast(f float64) *TickerUpdateOne

SetLast sets the "last" field.

func (*TickerUpdateOne) SetLastFetchAt

func (tuo *TickerUpdateOne) SetLastFetchAt(t time.Time) *TickerUpdateOne

SetLastFetchAt sets the "last_fetch_at" field.

func (*TickerUpdateOne) SetLastTradedAt

func (tuo *TickerUpdateOne) SetLastTradedAt(t time.Time) *TickerUpdateOne

SetLastTradedAt sets the "last_traded_at" field.

func (*TickerUpdateOne) SetMarket

func (tuo *TickerUpdateOne) SetMarket(m models.Market) *TickerUpdateOne

SetMarket sets the "market" field.

func (*TickerUpdateOne) SetNillableBaseCoinID

func (tuo *TickerUpdateOne) SetNillableBaseCoinID(s *string) *TickerUpdateOne

SetNillableBaseCoinID sets the "base_coin_id" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableBidAskSpreadPercentage

func (tuo *TickerUpdateOne) SetNillableBidAskSpreadPercentage(f *float64) *TickerUpdateOne

SetNillableBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableConvertedLast

func (tuo *TickerUpdateOne) SetNillableConvertedLast(md *models.ConvertedDetails) *TickerUpdateOne

SetNillableConvertedLast sets the "converted_last" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableConvertedVolume

func (tuo *TickerUpdateOne) SetNillableConvertedVolume(md *models.ConvertedDetails) *TickerUpdateOne

SetNillableConvertedVolume sets the "converted_volume" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableCounterCoinID

func (tuo *TickerUpdateOne) SetNillableCounterCoinID(s *string) *TickerUpdateOne

SetNillableCounterCoinID sets the "counter_coin_id" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableIsAnomaly

func (tuo *TickerUpdateOne) SetNillableIsAnomaly(b *bool) *TickerUpdateOne

SetNillableIsAnomaly sets the "is_anomaly" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableIsStale

func (tuo *TickerUpdateOne) SetNillableIsStale(b *bool) *TickerUpdateOne

SetNillableIsStale sets the "is_stale" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableLast

func (tuo *TickerUpdateOne) SetNillableLast(f *float64) *TickerUpdateOne

SetNillableLast sets the "last" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableLastFetchAt

func (tuo *TickerUpdateOne) SetNillableLastFetchAt(t *time.Time) *TickerUpdateOne

SetNillableLastFetchAt sets the "last_fetch_at" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableLastTradedAt

func (tuo *TickerUpdateOne) SetNillableLastTradedAt(t *time.Time) *TickerUpdateOne

SetNillableLastTradedAt sets the "last_traded_at" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableMarket

func (tuo *TickerUpdateOne) SetNillableMarket(m *models.Market) *TickerUpdateOne

SetNillableMarket sets the "market" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableTimestamp

func (tuo *TickerUpdateOne) SetNillableTimestamp(t *time.Time) *TickerUpdateOne

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableTokenInfoURL

func (tuo *TickerUpdateOne) SetNillableTokenInfoURL(s *string) *TickerUpdateOne

SetNillableTokenInfoURL sets the "token_info_url" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableTradeURL

func (tuo *TickerUpdateOne) SetNillableTradeURL(s *string) *TickerUpdateOne

SetNillableTradeURL sets the "trade_url" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableTrustScore

func (tuo *TickerUpdateOne) SetNillableTrustScore(s *string) *TickerUpdateOne

SetNillableTrustScore sets the "trust_score" field if the given value is not nil.

func (*TickerUpdateOne) SetNillableVolume

func (tuo *TickerUpdateOne) SetNillableVolume(f *float64) *TickerUpdateOne

SetNillableVolume sets the "volume" field if the given value is not nil.

func (*TickerUpdateOne) SetTimestamp

func (tuo *TickerUpdateOne) SetTimestamp(t time.Time) *TickerUpdateOne

SetTimestamp sets the "timestamp" field.

func (*TickerUpdateOne) SetTokenInfoURL

func (tuo *TickerUpdateOne) SetTokenInfoURL(s string) *TickerUpdateOne

SetTokenInfoURL sets the "token_info_url" field.

func (*TickerUpdateOne) SetTradeURL

func (tuo *TickerUpdateOne) SetTradeURL(s string) *TickerUpdateOne

SetTradeURL sets the "trade_url" field.

func (*TickerUpdateOne) SetTrustScore

func (tuo *TickerUpdateOne) SetTrustScore(s string) *TickerUpdateOne

SetTrustScore sets the "trust_score" field.

func (*TickerUpdateOne) SetVenue

func (tuo *TickerUpdateOne) SetVenue(v *Venue) *TickerUpdateOne

SetVenue sets the "venue" edge to the Venue entity.

func (*TickerUpdateOne) SetVenueID

func (tuo *TickerUpdateOne) SetVenueID(id int) *TickerUpdateOne

SetVenueID sets the "venue" edge to the Venue entity by ID.

func (*TickerUpdateOne) SetVolume

func (tuo *TickerUpdateOne) SetVolume(f float64) *TickerUpdateOne

SetVolume sets the "volume" field.

type TickerUpsert

type TickerUpsert struct {
	*sql.UpdateSet
}

TickerUpsert is the "OnConflict" setter.

func (*TickerUpsert) AddBidAskSpreadPercentage

func (u *TickerUpsert) AddBidAskSpreadPercentage(v float64) *TickerUpsert

AddBidAskSpreadPercentage adds v to the "bid_ask_spread_percentage" field.

func (*TickerUpsert) AddLast

func (u *TickerUpsert) AddLast(v float64) *TickerUpsert

AddLast adds v to the "last" field.

func (*TickerUpsert) AddVolume

func (u *TickerUpsert) AddVolume(v float64) *TickerUpsert

AddVolume adds v to the "volume" field.

func (*TickerUpsert) ClearBaseCoinID

func (u *TickerUpsert) ClearBaseCoinID() *TickerUpsert

ClearBaseCoinID clears the value of the "base_coin_id" field.

func (*TickerUpsert) ClearBidAskSpreadPercentage

func (u *TickerUpsert) ClearBidAskSpreadPercentage() *TickerUpsert

ClearBidAskSpreadPercentage clears the value of the "bid_ask_spread_percentage" field.

func (*TickerUpsert) ClearConvertedLast

func (u *TickerUpsert) ClearConvertedLast() *TickerUpsert

ClearConvertedLast clears the value of the "converted_last" field.

func (*TickerUpsert) ClearConvertedVolume

func (u *TickerUpsert) ClearConvertedVolume() *TickerUpsert

ClearConvertedVolume clears the value of the "converted_volume" field.

func (*TickerUpsert) ClearCounterCoinID

func (u *TickerUpsert) ClearCounterCoinID() *TickerUpsert

ClearCounterCoinID clears the value of the "counter_coin_id" field.

func (*TickerUpsert) ClearIsAnomaly

func (u *TickerUpsert) ClearIsAnomaly() *TickerUpsert

ClearIsAnomaly clears the value of the "is_anomaly" field.

func (*TickerUpsert) ClearIsStale

func (u *TickerUpsert) ClearIsStale() *TickerUpsert

ClearIsStale clears the value of the "is_stale" field.

func (*TickerUpsert) ClearLast

func (u *TickerUpsert) ClearLast() *TickerUpsert

ClearLast clears the value of the "last" field.

func (*TickerUpsert) ClearLastFetchAt

func (u *TickerUpsert) ClearLastFetchAt() *TickerUpsert

ClearLastFetchAt clears the value of the "last_fetch_at" field.

func (*TickerUpsert) ClearLastTradedAt

func (u *TickerUpsert) ClearLastTradedAt() *TickerUpsert

ClearLastTradedAt clears the value of the "last_traded_at" field.

func (*TickerUpsert) ClearMarket

func (u *TickerUpsert) ClearMarket() *TickerUpsert

ClearMarket clears the value of the "market" field.

func (*TickerUpsert) ClearTimestamp

func (u *TickerUpsert) ClearTimestamp() *TickerUpsert

ClearTimestamp clears the value of the "timestamp" field.

func (*TickerUpsert) ClearTokenInfoURL

func (u *TickerUpsert) ClearTokenInfoURL() *TickerUpsert

ClearTokenInfoURL clears the value of the "token_info_url" field.

func (*TickerUpsert) ClearTradeURL

func (u *TickerUpsert) ClearTradeURL() *TickerUpsert

ClearTradeURL clears the value of the "trade_url" field.

func (*TickerUpsert) ClearTrustScore

func (u *TickerUpsert) ClearTrustScore() *TickerUpsert

ClearTrustScore clears the value of the "trust_score" field.

func (*TickerUpsert) ClearVolume

func (u *TickerUpsert) ClearVolume() *TickerUpsert

ClearVolume clears the value of the "volume" field.

func (*TickerUpsert) SetBase

func (u *TickerUpsert) SetBase(v string) *TickerUpsert

SetBase sets the "base" field.

func (*TickerUpsert) SetBaseCoinID

func (u *TickerUpsert) SetBaseCoinID(v string) *TickerUpsert

SetBaseCoinID sets the "base_coin_id" field.

func (*TickerUpsert) SetBidAskSpreadPercentage

func (u *TickerUpsert) SetBidAskSpreadPercentage(v float64) *TickerUpsert

SetBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field.

func (*TickerUpsert) SetConvertedLast

func (u *TickerUpsert) SetConvertedLast(v models.ConvertedDetails) *TickerUpsert

SetConvertedLast sets the "converted_last" field.

func (*TickerUpsert) SetConvertedVolume

func (u *TickerUpsert) SetConvertedVolume(v models.ConvertedDetails) *TickerUpsert

SetConvertedVolume sets the "converted_volume" field.

func (*TickerUpsert) SetCounter

func (u *TickerUpsert) SetCounter(v string) *TickerUpsert

SetCounter sets the "counter" field.

func (*TickerUpsert) SetCounterCoinID

func (u *TickerUpsert) SetCounterCoinID(v string) *TickerUpsert

SetCounterCoinID sets the "counter_coin_id" field.

func (*TickerUpsert) SetIsAnomaly

func (u *TickerUpsert) SetIsAnomaly(v bool) *TickerUpsert

SetIsAnomaly sets the "is_anomaly" field.

func (*TickerUpsert) SetIsStale

func (u *TickerUpsert) SetIsStale(v bool) *TickerUpsert

SetIsStale sets the "is_stale" field.

func (*TickerUpsert) SetLast

func (u *TickerUpsert) SetLast(v float64) *TickerUpsert

SetLast sets the "last" field.

func (*TickerUpsert) SetLastFetchAt

func (u *TickerUpsert) SetLastFetchAt(v time.Time) *TickerUpsert

SetLastFetchAt sets the "last_fetch_at" field.

func (*TickerUpsert) SetLastTradedAt

func (u *TickerUpsert) SetLastTradedAt(v time.Time) *TickerUpsert

SetLastTradedAt sets the "last_traded_at" field.

func (*TickerUpsert) SetMarket

func (u *TickerUpsert) SetMarket(v models.Market) *TickerUpsert

SetMarket sets the "market" field.

func (*TickerUpsert) SetTimestamp

func (u *TickerUpsert) SetTimestamp(v time.Time) *TickerUpsert

SetTimestamp sets the "timestamp" field.

func (*TickerUpsert) SetTokenInfoURL

func (u *TickerUpsert) SetTokenInfoURL(v string) *TickerUpsert

SetTokenInfoURL sets the "token_info_url" field.

func (*TickerUpsert) SetTradeURL

func (u *TickerUpsert) SetTradeURL(v string) *TickerUpsert

SetTradeURL sets the "trade_url" field.

func (*TickerUpsert) SetTrustScore

func (u *TickerUpsert) SetTrustScore(v string) *TickerUpsert

SetTrustScore sets the "trust_score" field.

func (*TickerUpsert) SetVolume

func (u *TickerUpsert) SetVolume(v float64) *TickerUpsert

SetVolume sets the "volume" field.

func (*TickerUpsert) UpdateBase

func (u *TickerUpsert) UpdateBase() *TickerUpsert

UpdateBase sets the "base" field to the value that was provided on create.

func (*TickerUpsert) UpdateBaseCoinID

func (u *TickerUpsert) UpdateBaseCoinID() *TickerUpsert

UpdateBaseCoinID sets the "base_coin_id" field to the value that was provided on create.

func (*TickerUpsert) UpdateBidAskSpreadPercentage

func (u *TickerUpsert) UpdateBidAskSpreadPercentage() *TickerUpsert

UpdateBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field to the value that was provided on create.

func (*TickerUpsert) UpdateConvertedLast

func (u *TickerUpsert) UpdateConvertedLast() *TickerUpsert

UpdateConvertedLast sets the "converted_last" field to the value that was provided on create.

func (*TickerUpsert) UpdateConvertedVolume

func (u *TickerUpsert) UpdateConvertedVolume() *TickerUpsert

UpdateConvertedVolume sets the "converted_volume" field to the value that was provided on create.

func (*TickerUpsert) UpdateCounter

func (u *TickerUpsert) UpdateCounter() *TickerUpsert

UpdateCounter sets the "counter" field to the value that was provided on create.

func (*TickerUpsert) UpdateCounterCoinID

func (u *TickerUpsert) UpdateCounterCoinID() *TickerUpsert

UpdateCounterCoinID sets the "counter_coin_id" field to the value that was provided on create.

func (*TickerUpsert) UpdateIsAnomaly

func (u *TickerUpsert) UpdateIsAnomaly() *TickerUpsert

UpdateIsAnomaly sets the "is_anomaly" field to the value that was provided on create.

func (*TickerUpsert) UpdateIsStale

func (u *TickerUpsert) UpdateIsStale() *TickerUpsert

UpdateIsStale sets the "is_stale" field to the value that was provided on create.

func (*TickerUpsert) UpdateLast

func (u *TickerUpsert) UpdateLast() *TickerUpsert

UpdateLast sets the "last" field to the value that was provided on create.

func (*TickerUpsert) UpdateLastFetchAt

func (u *TickerUpsert) UpdateLastFetchAt() *TickerUpsert

UpdateLastFetchAt sets the "last_fetch_at" field to the value that was provided on create.

func (*TickerUpsert) UpdateLastTradedAt

func (u *TickerUpsert) UpdateLastTradedAt() *TickerUpsert

UpdateLastTradedAt sets the "last_traded_at" field to the value that was provided on create.

func (*TickerUpsert) UpdateMarket

func (u *TickerUpsert) UpdateMarket() *TickerUpsert

UpdateMarket sets the "market" field to the value that was provided on create.

func (*TickerUpsert) UpdateTimestamp

func (u *TickerUpsert) UpdateTimestamp() *TickerUpsert

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*TickerUpsert) UpdateTokenInfoURL

func (u *TickerUpsert) UpdateTokenInfoURL() *TickerUpsert

UpdateTokenInfoURL sets the "token_info_url" field to the value that was provided on create.

func (*TickerUpsert) UpdateTradeURL

func (u *TickerUpsert) UpdateTradeURL() *TickerUpsert

UpdateTradeURL sets the "trade_url" field to the value that was provided on create.

func (*TickerUpsert) UpdateTrustScore

func (u *TickerUpsert) UpdateTrustScore() *TickerUpsert

UpdateTrustScore sets the "trust_score" field to the value that was provided on create.

func (*TickerUpsert) UpdateVolume

func (u *TickerUpsert) UpdateVolume() *TickerUpsert

UpdateVolume sets the "volume" field to the value that was provided on create.

type TickerUpsertBulk

type TickerUpsertBulk struct {
	// contains filtered or unexported fields
}

TickerUpsertBulk is the builder for "upsert"-ing a bulk of Ticker nodes.

func (*TickerUpsertBulk) AddBidAskSpreadPercentage

func (u *TickerUpsertBulk) AddBidAskSpreadPercentage(v float64) *TickerUpsertBulk

AddBidAskSpreadPercentage adds v to the "bid_ask_spread_percentage" field.

func (*TickerUpsertBulk) AddLast

func (u *TickerUpsertBulk) AddLast(v float64) *TickerUpsertBulk

AddLast adds v to the "last" field.

func (*TickerUpsertBulk) AddVolume

func (u *TickerUpsertBulk) AddVolume(v float64) *TickerUpsertBulk

AddVolume adds v to the "volume" field.

func (*TickerUpsertBulk) ClearBaseCoinID

func (u *TickerUpsertBulk) ClearBaseCoinID() *TickerUpsertBulk

ClearBaseCoinID clears the value of the "base_coin_id" field.

func (*TickerUpsertBulk) ClearBidAskSpreadPercentage

func (u *TickerUpsertBulk) ClearBidAskSpreadPercentage() *TickerUpsertBulk

ClearBidAskSpreadPercentage clears the value of the "bid_ask_spread_percentage" field.

func (*TickerUpsertBulk) ClearConvertedLast

func (u *TickerUpsertBulk) ClearConvertedLast() *TickerUpsertBulk

ClearConvertedLast clears the value of the "converted_last" field.

func (*TickerUpsertBulk) ClearConvertedVolume

func (u *TickerUpsertBulk) ClearConvertedVolume() *TickerUpsertBulk

ClearConvertedVolume clears the value of the "converted_volume" field.

func (*TickerUpsertBulk) ClearCounterCoinID

func (u *TickerUpsertBulk) ClearCounterCoinID() *TickerUpsertBulk

ClearCounterCoinID clears the value of the "counter_coin_id" field.

func (*TickerUpsertBulk) ClearIsAnomaly

func (u *TickerUpsertBulk) ClearIsAnomaly() *TickerUpsertBulk

ClearIsAnomaly clears the value of the "is_anomaly" field.

func (*TickerUpsertBulk) ClearIsStale

func (u *TickerUpsertBulk) ClearIsStale() *TickerUpsertBulk

ClearIsStale clears the value of the "is_stale" field.

func (*TickerUpsertBulk) ClearLast

func (u *TickerUpsertBulk) ClearLast() *TickerUpsertBulk

ClearLast clears the value of the "last" field.

func (*TickerUpsertBulk) ClearLastFetchAt

func (u *TickerUpsertBulk) ClearLastFetchAt() *TickerUpsertBulk

ClearLastFetchAt clears the value of the "last_fetch_at" field.

func (*TickerUpsertBulk) ClearLastTradedAt

func (u *TickerUpsertBulk) ClearLastTradedAt() *TickerUpsertBulk

ClearLastTradedAt clears the value of the "last_traded_at" field.

func (*TickerUpsertBulk) ClearMarket

func (u *TickerUpsertBulk) ClearMarket() *TickerUpsertBulk

ClearMarket clears the value of the "market" field.

func (*TickerUpsertBulk) ClearTimestamp

func (u *TickerUpsertBulk) ClearTimestamp() *TickerUpsertBulk

ClearTimestamp clears the value of the "timestamp" field.

func (*TickerUpsertBulk) ClearTokenInfoURL

func (u *TickerUpsertBulk) ClearTokenInfoURL() *TickerUpsertBulk

ClearTokenInfoURL clears the value of the "token_info_url" field.

func (*TickerUpsertBulk) ClearTradeURL

func (u *TickerUpsertBulk) ClearTradeURL() *TickerUpsertBulk

ClearTradeURL clears the value of the "trade_url" field.

func (*TickerUpsertBulk) ClearTrustScore

func (u *TickerUpsertBulk) ClearTrustScore() *TickerUpsertBulk

ClearTrustScore clears the value of the "trust_score" field.

func (*TickerUpsertBulk) ClearVolume

func (u *TickerUpsertBulk) ClearVolume() *TickerUpsertBulk

ClearVolume clears the value of the "volume" field.

func (*TickerUpsertBulk) DoNothing

func (u *TickerUpsertBulk) DoNothing() *TickerUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TickerUpsertBulk) Exec

func (u *TickerUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TickerUpsertBulk) ExecX

func (u *TickerUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TickerUpsertBulk) Ignore

func (u *TickerUpsertBulk) Ignore() *TickerUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Ticker.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TickerUpsertBulk) SetBase

func (u *TickerUpsertBulk) SetBase(v string) *TickerUpsertBulk

SetBase sets the "base" field.

func (*TickerUpsertBulk) SetBaseCoinID

func (u *TickerUpsertBulk) SetBaseCoinID(v string) *TickerUpsertBulk

SetBaseCoinID sets the "base_coin_id" field.

func (*TickerUpsertBulk) SetBidAskSpreadPercentage

func (u *TickerUpsertBulk) SetBidAskSpreadPercentage(v float64) *TickerUpsertBulk

SetBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field.

func (*TickerUpsertBulk) SetConvertedLast

func (u *TickerUpsertBulk) SetConvertedLast(v models.ConvertedDetails) *TickerUpsertBulk

SetConvertedLast sets the "converted_last" field.

func (*TickerUpsertBulk) SetConvertedVolume

func (u *TickerUpsertBulk) SetConvertedVolume(v models.ConvertedDetails) *TickerUpsertBulk

SetConvertedVolume sets the "converted_volume" field.

func (*TickerUpsertBulk) SetCounter

func (u *TickerUpsertBulk) SetCounter(v string) *TickerUpsertBulk

SetCounter sets the "counter" field.

func (*TickerUpsertBulk) SetCounterCoinID

func (u *TickerUpsertBulk) SetCounterCoinID(v string) *TickerUpsertBulk

SetCounterCoinID sets the "counter_coin_id" field.

func (*TickerUpsertBulk) SetIsAnomaly

func (u *TickerUpsertBulk) SetIsAnomaly(v bool) *TickerUpsertBulk

SetIsAnomaly sets the "is_anomaly" field.

func (*TickerUpsertBulk) SetIsStale

func (u *TickerUpsertBulk) SetIsStale(v bool) *TickerUpsertBulk

SetIsStale sets the "is_stale" field.

func (*TickerUpsertBulk) SetLast

func (u *TickerUpsertBulk) SetLast(v float64) *TickerUpsertBulk

SetLast sets the "last" field.

func (*TickerUpsertBulk) SetLastFetchAt

func (u *TickerUpsertBulk) SetLastFetchAt(v time.Time) *TickerUpsertBulk

SetLastFetchAt sets the "last_fetch_at" field.

func (*TickerUpsertBulk) SetLastTradedAt

func (u *TickerUpsertBulk) SetLastTradedAt(v time.Time) *TickerUpsertBulk

SetLastTradedAt sets the "last_traded_at" field.

func (*TickerUpsertBulk) SetMarket

SetMarket sets the "market" field.

func (*TickerUpsertBulk) SetTimestamp

func (u *TickerUpsertBulk) SetTimestamp(v time.Time) *TickerUpsertBulk

SetTimestamp sets the "timestamp" field.

func (*TickerUpsertBulk) SetTokenInfoURL

func (u *TickerUpsertBulk) SetTokenInfoURL(v string) *TickerUpsertBulk

SetTokenInfoURL sets the "token_info_url" field.

func (*TickerUpsertBulk) SetTradeURL

func (u *TickerUpsertBulk) SetTradeURL(v string) *TickerUpsertBulk

SetTradeURL sets the "trade_url" field.

func (*TickerUpsertBulk) SetTrustScore

func (u *TickerUpsertBulk) SetTrustScore(v string) *TickerUpsertBulk

SetTrustScore sets the "trust_score" field.

func (*TickerUpsertBulk) SetVolume

func (u *TickerUpsertBulk) SetVolume(v float64) *TickerUpsertBulk

SetVolume sets the "volume" field.

func (*TickerUpsertBulk) Update

func (u *TickerUpsertBulk) Update(set func(*TickerUpsert)) *TickerUpsertBulk

Update allows overriding fields `UPDATE` values. See the TickerCreateBulk.OnConflict documentation for more info.

func (*TickerUpsertBulk) UpdateBase

func (u *TickerUpsertBulk) UpdateBase() *TickerUpsertBulk

UpdateBase sets the "base" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateBaseCoinID

func (u *TickerUpsertBulk) UpdateBaseCoinID() *TickerUpsertBulk

UpdateBaseCoinID sets the "base_coin_id" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateBidAskSpreadPercentage

func (u *TickerUpsertBulk) UpdateBidAskSpreadPercentage() *TickerUpsertBulk

UpdateBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateConvertedLast

func (u *TickerUpsertBulk) UpdateConvertedLast() *TickerUpsertBulk

UpdateConvertedLast sets the "converted_last" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateConvertedVolume

func (u *TickerUpsertBulk) UpdateConvertedVolume() *TickerUpsertBulk

UpdateConvertedVolume sets the "converted_volume" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateCounter

func (u *TickerUpsertBulk) UpdateCounter() *TickerUpsertBulk

UpdateCounter sets the "counter" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateCounterCoinID

func (u *TickerUpsertBulk) UpdateCounterCoinID() *TickerUpsertBulk

UpdateCounterCoinID sets the "counter_coin_id" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateIsAnomaly

func (u *TickerUpsertBulk) UpdateIsAnomaly() *TickerUpsertBulk

UpdateIsAnomaly sets the "is_anomaly" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateIsStale

func (u *TickerUpsertBulk) UpdateIsStale() *TickerUpsertBulk

UpdateIsStale sets the "is_stale" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateLast

func (u *TickerUpsertBulk) UpdateLast() *TickerUpsertBulk

UpdateLast sets the "last" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateLastFetchAt

func (u *TickerUpsertBulk) UpdateLastFetchAt() *TickerUpsertBulk

UpdateLastFetchAt sets the "last_fetch_at" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateLastTradedAt

func (u *TickerUpsertBulk) UpdateLastTradedAt() *TickerUpsertBulk

UpdateLastTradedAt sets the "last_traded_at" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateMarket

func (u *TickerUpsertBulk) UpdateMarket() *TickerUpsertBulk

UpdateMarket sets the "market" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateNewValues

func (u *TickerUpsertBulk) UpdateNewValues() *TickerUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Ticker.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*TickerUpsertBulk) UpdateTimestamp

func (u *TickerUpsertBulk) UpdateTimestamp() *TickerUpsertBulk

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateTokenInfoURL

func (u *TickerUpsertBulk) UpdateTokenInfoURL() *TickerUpsertBulk

UpdateTokenInfoURL sets the "token_info_url" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateTradeURL

func (u *TickerUpsertBulk) UpdateTradeURL() *TickerUpsertBulk

UpdateTradeURL sets the "trade_url" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateTrustScore

func (u *TickerUpsertBulk) UpdateTrustScore() *TickerUpsertBulk

UpdateTrustScore sets the "trust_score" field to the value that was provided on create.

func (*TickerUpsertBulk) UpdateVolume

func (u *TickerUpsertBulk) UpdateVolume() *TickerUpsertBulk

UpdateVolume sets the "volume" field to the value that was provided on create.

type TickerUpsertOne

type TickerUpsertOne struct {
	// contains filtered or unexported fields
}

TickerUpsertOne is the builder for "upsert"-ing

one Ticker node.

func (*TickerUpsertOne) AddBidAskSpreadPercentage

func (u *TickerUpsertOne) AddBidAskSpreadPercentage(v float64) *TickerUpsertOne

AddBidAskSpreadPercentage adds v to the "bid_ask_spread_percentage" field.

func (*TickerUpsertOne) AddLast

func (u *TickerUpsertOne) AddLast(v float64) *TickerUpsertOne

AddLast adds v to the "last" field.

func (*TickerUpsertOne) AddVolume

func (u *TickerUpsertOne) AddVolume(v float64) *TickerUpsertOne

AddVolume adds v to the "volume" field.

func (*TickerUpsertOne) ClearBaseCoinID

func (u *TickerUpsertOne) ClearBaseCoinID() *TickerUpsertOne

ClearBaseCoinID clears the value of the "base_coin_id" field.

func (*TickerUpsertOne) ClearBidAskSpreadPercentage

func (u *TickerUpsertOne) ClearBidAskSpreadPercentage() *TickerUpsertOne

ClearBidAskSpreadPercentage clears the value of the "bid_ask_spread_percentage" field.

func (*TickerUpsertOne) ClearConvertedLast

func (u *TickerUpsertOne) ClearConvertedLast() *TickerUpsertOne

ClearConvertedLast clears the value of the "converted_last" field.

func (*TickerUpsertOne) ClearConvertedVolume

func (u *TickerUpsertOne) ClearConvertedVolume() *TickerUpsertOne

ClearConvertedVolume clears the value of the "converted_volume" field.

func (*TickerUpsertOne) ClearCounterCoinID

func (u *TickerUpsertOne) ClearCounterCoinID() *TickerUpsertOne

ClearCounterCoinID clears the value of the "counter_coin_id" field.

func (*TickerUpsertOne) ClearIsAnomaly

func (u *TickerUpsertOne) ClearIsAnomaly() *TickerUpsertOne

ClearIsAnomaly clears the value of the "is_anomaly" field.

func (*TickerUpsertOne) ClearIsStale

func (u *TickerUpsertOne) ClearIsStale() *TickerUpsertOne

ClearIsStale clears the value of the "is_stale" field.

func (*TickerUpsertOne) ClearLast

func (u *TickerUpsertOne) ClearLast() *TickerUpsertOne

ClearLast clears the value of the "last" field.

func (*TickerUpsertOne) ClearLastFetchAt

func (u *TickerUpsertOne) ClearLastFetchAt() *TickerUpsertOne

ClearLastFetchAt clears the value of the "last_fetch_at" field.

func (*TickerUpsertOne) ClearLastTradedAt

func (u *TickerUpsertOne) ClearLastTradedAt() *TickerUpsertOne

ClearLastTradedAt clears the value of the "last_traded_at" field.

func (*TickerUpsertOne) ClearMarket

func (u *TickerUpsertOne) ClearMarket() *TickerUpsertOne

ClearMarket clears the value of the "market" field.

func (*TickerUpsertOne) ClearTimestamp

func (u *TickerUpsertOne) ClearTimestamp() *TickerUpsertOne

ClearTimestamp clears the value of the "timestamp" field.

func (*TickerUpsertOne) ClearTokenInfoURL

func (u *TickerUpsertOne) ClearTokenInfoURL() *TickerUpsertOne

ClearTokenInfoURL clears the value of the "token_info_url" field.

func (*TickerUpsertOne) ClearTradeURL

func (u *TickerUpsertOne) ClearTradeURL() *TickerUpsertOne

ClearTradeURL clears the value of the "trade_url" field.

func (*TickerUpsertOne) ClearTrustScore

func (u *TickerUpsertOne) ClearTrustScore() *TickerUpsertOne

ClearTrustScore clears the value of the "trust_score" field.

func (*TickerUpsertOne) ClearVolume

func (u *TickerUpsertOne) ClearVolume() *TickerUpsertOne

ClearVolume clears the value of the "volume" field.

func (*TickerUpsertOne) DoNothing

func (u *TickerUpsertOne) DoNothing() *TickerUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TickerUpsertOne) Exec

func (u *TickerUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TickerUpsertOne) ExecX

func (u *TickerUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TickerUpsertOne) ID

func (u *TickerUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TickerUpsertOne) IDX

func (u *TickerUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*TickerUpsertOne) Ignore

func (u *TickerUpsertOne) Ignore() *TickerUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Ticker.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TickerUpsertOne) SetBase

func (u *TickerUpsertOne) SetBase(v string) *TickerUpsertOne

SetBase sets the "base" field.

func (*TickerUpsertOne) SetBaseCoinID

func (u *TickerUpsertOne) SetBaseCoinID(v string) *TickerUpsertOne

SetBaseCoinID sets the "base_coin_id" field.

func (*TickerUpsertOne) SetBidAskSpreadPercentage

func (u *TickerUpsertOne) SetBidAskSpreadPercentage(v float64) *TickerUpsertOne

SetBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field.

func (*TickerUpsertOne) SetConvertedLast

func (u *TickerUpsertOne) SetConvertedLast(v models.ConvertedDetails) *TickerUpsertOne

SetConvertedLast sets the "converted_last" field.

func (*TickerUpsertOne) SetConvertedVolume

func (u *TickerUpsertOne) SetConvertedVolume(v models.ConvertedDetails) *TickerUpsertOne

SetConvertedVolume sets the "converted_volume" field.

func (*TickerUpsertOne) SetCounter

func (u *TickerUpsertOne) SetCounter(v string) *TickerUpsertOne

SetCounter sets the "counter" field.

func (*TickerUpsertOne) SetCounterCoinID

func (u *TickerUpsertOne) SetCounterCoinID(v string) *TickerUpsertOne

SetCounterCoinID sets the "counter_coin_id" field.

func (*TickerUpsertOne) SetIsAnomaly

func (u *TickerUpsertOne) SetIsAnomaly(v bool) *TickerUpsertOne

SetIsAnomaly sets the "is_anomaly" field.

func (*TickerUpsertOne) SetIsStale

func (u *TickerUpsertOne) SetIsStale(v bool) *TickerUpsertOne

SetIsStale sets the "is_stale" field.

func (*TickerUpsertOne) SetLast

func (u *TickerUpsertOne) SetLast(v float64) *TickerUpsertOne

SetLast sets the "last" field.

func (*TickerUpsertOne) SetLastFetchAt

func (u *TickerUpsertOne) SetLastFetchAt(v time.Time) *TickerUpsertOne

SetLastFetchAt sets the "last_fetch_at" field.

func (*TickerUpsertOne) SetLastTradedAt

func (u *TickerUpsertOne) SetLastTradedAt(v time.Time) *TickerUpsertOne

SetLastTradedAt sets the "last_traded_at" field.

func (*TickerUpsertOne) SetMarket

func (u *TickerUpsertOne) SetMarket(v models.Market) *TickerUpsertOne

SetMarket sets the "market" field.

func (*TickerUpsertOne) SetTimestamp

func (u *TickerUpsertOne) SetTimestamp(v time.Time) *TickerUpsertOne

SetTimestamp sets the "timestamp" field.

func (*TickerUpsertOne) SetTokenInfoURL

func (u *TickerUpsertOne) SetTokenInfoURL(v string) *TickerUpsertOne

SetTokenInfoURL sets the "token_info_url" field.

func (*TickerUpsertOne) SetTradeURL

func (u *TickerUpsertOne) SetTradeURL(v string) *TickerUpsertOne

SetTradeURL sets the "trade_url" field.

func (*TickerUpsertOne) SetTrustScore

func (u *TickerUpsertOne) SetTrustScore(v string) *TickerUpsertOne

SetTrustScore sets the "trust_score" field.

func (*TickerUpsertOne) SetVolume

func (u *TickerUpsertOne) SetVolume(v float64) *TickerUpsertOne

SetVolume sets the "volume" field.

func (*TickerUpsertOne) Update

func (u *TickerUpsertOne) Update(set func(*TickerUpsert)) *TickerUpsertOne

Update allows overriding fields `UPDATE` values. See the TickerCreate.OnConflict documentation for more info.

func (*TickerUpsertOne) UpdateBase

func (u *TickerUpsertOne) UpdateBase() *TickerUpsertOne

UpdateBase sets the "base" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateBaseCoinID

func (u *TickerUpsertOne) UpdateBaseCoinID() *TickerUpsertOne

UpdateBaseCoinID sets the "base_coin_id" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateBidAskSpreadPercentage

func (u *TickerUpsertOne) UpdateBidAskSpreadPercentage() *TickerUpsertOne

UpdateBidAskSpreadPercentage sets the "bid_ask_spread_percentage" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateConvertedLast

func (u *TickerUpsertOne) UpdateConvertedLast() *TickerUpsertOne

UpdateConvertedLast sets the "converted_last" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateConvertedVolume

func (u *TickerUpsertOne) UpdateConvertedVolume() *TickerUpsertOne

UpdateConvertedVolume sets the "converted_volume" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateCounter

func (u *TickerUpsertOne) UpdateCounter() *TickerUpsertOne

UpdateCounter sets the "counter" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateCounterCoinID

func (u *TickerUpsertOne) UpdateCounterCoinID() *TickerUpsertOne

UpdateCounterCoinID sets the "counter_coin_id" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateIsAnomaly

func (u *TickerUpsertOne) UpdateIsAnomaly() *TickerUpsertOne

UpdateIsAnomaly sets the "is_anomaly" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateIsStale

func (u *TickerUpsertOne) UpdateIsStale() *TickerUpsertOne

UpdateIsStale sets the "is_stale" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateLast

func (u *TickerUpsertOne) UpdateLast() *TickerUpsertOne

UpdateLast sets the "last" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateLastFetchAt

func (u *TickerUpsertOne) UpdateLastFetchAt() *TickerUpsertOne

UpdateLastFetchAt sets the "last_fetch_at" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateLastTradedAt

func (u *TickerUpsertOne) UpdateLastTradedAt() *TickerUpsertOne

UpdateLastTradedAt sets the "last_traded_at" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateMarket

func (u *TickerUpsertOne) UpdateMarket() *TickerUpsertOne

UpdateMarket sets the "market" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateNewValues

func (u *TickerUpsertOne) UpdateNewValues() *TickerUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Ticker.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*TickerUpsertOne) UpdateTimestamp

func (u *TickerUpsertOne) UpdateTimestamp() *TickerUpsertOne

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateTokenInfoURL

func (u *TickerUpsertOne) UpdateTokenInfoURL() *TickerUpsertOne

UpdateTokenInfoURL sets the "token_info_url" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateTradeURL

func (u *TickerUpsertOne) UpdateTradeURL() *TickerUpsertOne

UpdateTradeURL sets the "trade_url" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateTrustScore

func (u *TickerUpsertOne) UpdateTrustScore() *TickerUpsertOne

UpdateTrustScore sets the "trust_score" field to the value that was provided on create.

func (*TickerUpsertOne) UpdateVolume

func (u *TickerUpsertOne) UpdateVolume() *TickerUpsertOne

UpdateVolume sets the "volume" field to the value that was provided on create.

type TickerWhereInput

type TickerWhereInput struct {
	Predicates []predicate.Ticker  `json:"-"`
	Not        *TickerWhereInput   `json:"not,omitempty"`
	Or         []*TickerWhereInput `json:"or,omitempty"`
	And        []*TickerWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "base" field predicates.
	Base             *string  `json:"base,omitempty"`
	BaseNEQ          *string  `json:"baseNEQ,omitempty"`
	BaseIn           []string `json:"baseIn,omitempty"`
	BaseNotIn        []string `json:"baseNotIn,omitempty"`
	BaseGT           *string  `json:"baseGT,omitempty"`
	BaseGTE          *string  `json:"baseGTE,omitempty"`
	BaseLT           *string  `json:"baseLT,omitempty"`
	BaseLTE          *string  `json:"baseLTE,omitempty"`
	BaseContains     *string  `json:"baseContains,omitempty"`
	BaseHasPrefix    *string  `json:"baseHasPrefix,omitempty"`
	BaseHasSuffix    *string  `json:"baseHasSuffix,omitempty"`
	BaseEqualFold    *string  `json:"baseEqualFold,omitempty"`
	BaseContainsFold *string  `json:"baseContainsFold,omitempty"`

	// "base_coin_id" field predicates.
	BaseCoinID             *string  `json:"baseCoinID,omitempty"`
	BaseCoinIDNEQ          *string  `json:"baseCoinIDNEQ,omitempty"`
	BaseCoinIDIn           []string `json:"baseCoinIDIn,omitempty"`
	BaseCoinIDNotIn        []string `json:"baseCoinIDNotIn,omitempty"`
	BaseCoinIDGT           *string  `json:"baseCoinIDGT,omitempty"`
	BaseCoinIDGTE          *string  `json:"baseCoinIDGTE,omitempty"`
	BaseCoinIDLT           *string  `json:"baseCoinIDLT,omitempty"`
	BaseCoinIDLTE          *string  `json:"baseCoinIDLTE,omitempty"`
	BaseCoinIDContains     *string  `json:"baseCoinIDContains,omitempty"`
	BaseCoinIDHasPrefix    *string  `json:"baseCoinIDHasPrefix,omitempty"`
	BaseCoinIDHasSuffix    *string  `json:"baseCoinIDHasSuffix,omitempty"`
	BaseCoinIDIsNil        bool     `json:"baseCoinIDIsNil,omitempty"`
	BaseCoinIDNotNil       bool     `json:"baseCoinIDNotNil,omitempty"`
	BaseCoinIDEqualFold    *string  `json:"baseCoinIDEqualFold,omitempty"`
	BaseCoinIDContainsFold *string  `json:"baseCoinIDContainsFold,omitempty"`

	// "counter" field predicates.
	Counter             *string  `json:"counter,omitempty"`
	CounterNEQ          *string  `json:"counterNEQ,omitempty"`
	CounterIn           []string `json:"counterIn,omitempty"`
	CounterNotIn        []string `json:"counterNotIn,omitempty"`
	CounterGT           *string  `json:"counterGT,omitempty"`
	CounterGTE          *string  `json:"counterGTE,omitempty"`
	CounterLT           *string  `json:"counterLT,omitempty"`
	CounterLTE          *string  `json:"counterLTE,omitempty"`
	CounterContains     *string  `json:"counterContains,omitempty"`
	CounterHasPrefix    *string  `json:"counterHasPrefix,omitempty"`
	CounterHasSuffix    *string  `json:"counterHasSuffix,omitempty"`
	CounterEqualFold    *string  `json:"counterEqualFold,omitempty"`
	CounterContainsFold *string  `json:"counterContainsFold,omitempty"`

	// "counter_coin_id" field predicates.
	CounterCoinID             *string  `json:"counterCoinID,omitempty"`
	CounterCoinIDNEQ          *string  `json:"counterCoinIDNEQ,omitempty"`
	CounterCoinIDIn           []string `json:"counterCoinIDIn,omitempty"`
	CounterCoinIDNotIn        []string `json:"counterCoinIDNotIn,omitempty"`
	CounterCoinIDGT           *string  `json:"counterCoinIDGT,omitempty"`
	CounterCoinIDGTE          *string  `json:"counterCoinIDGTE,omitempty"`
	CounterCoinIDLT           *string  `json:"counterCoinIDLT,omitempty"`
	CounterCoinIDLTE          *string  `json:"counterCoinIDLTE,omitempty"`
	CounterCoinIDContains     *string  `json:"counterCoinIDContains,omitempty"`
	CounterCoinIDHasPrefix    *string  `json:"counterCoinIDHasPrefix,omitempty"`
	CounterCoinIDHasSuffix    *string  `json:"counterCoinIDHasSuffix,omitempty"`
	CounterCoinIDIsNil        bool     `json:"counterCoinIDIsNil,omitempty"`
	CounterCoinIDNotNil       bool     `json:"counterCoinIDNotNil,omitempty"`
	CounterCoinIDEqualFold    *string  `json:"counterCoinIDEqualFold,omitempty"`
	CounterCoinIDContainsFold *string  `json:"counterCoinIDContainsFold,omitempty"`

	// "last" field predicates.
	Last       *float64  `json:"last,omitempty"`
	LastNEQ    *float64  `json:"lastNEQ,omitempty"`
	LastIn     []float64 `json:"lastIn,omitempty"`
	LastNotIn  []float64 `json:"lastNotIn,omitempty"`
	LastGT     *float64  `json:"lastGT,omitempty"`
	LastGTE    *float64  `json:"lastGTE,omitempty"`
	LastLT     *float64  `json:"lastLT,omitempty"`
	LastLTE    *float64  `json:"lastLTE,omitempty"`
	LastIsNil  bool      `json:"lastIsNil,omitempty"`
	LastNotNil bool      `json:"lastNotNil,omitempty"`

	// "volume" field predicates.
	Volume       *float64  `json:"volume,omitempty"`
	VolumeNEQ    *float64  `json:"volumeNEQ,omitempty"`
	VolumeIn     []float64 `json:"volumeIn,omitempty"`
	VolumeNotIn  []float64 `json:"volumeNotIn,omitempty"`
	VolumeGT     *float64  `json:"volumeGT,omitempty"`
	VolumeGTE    *float64  `json:"volumeGTE,omitempty"`
	VolumeLT     *float64  `json:"volumeLT,omitempty"`
	VolumeLTE    *float64  `json:"volumeLTE,omitempty"`
	VolumeIsNil  bool      `json:"volumeIsNil,omitempty"`
	VolumeNotNil bool      `json:"volumeNotNil,omitempty"`

	// "trust_score" field predicates.
	TrustScore             *string  `json:"trustScore,omitempty"`
	TrustScoreNEQ          *string  `json:"trustScoreNEQ,omitempty"`
	TrustScoreIn           []string `json:"trustScoreIn,omitempty"`
	TrustScoreNotIn        []string `json:"trustScoreNotIn,omitempty"`
	TrustScoreGT           *string  `json:"trustScoreGT,omitempty"`
	TrustScoreGTE          *string  `json:"trustScoreGTE,omitempty"`
	TrustScoreLT           *string  `json:"trustScoreLT,omitempty"`
	TrustScoreLTE          *string  `json:"trustScoreLTE,omitempty"`
	TrustScoreContains     *string  `json:"trustScoreContains,omitempty"`
	TrustScoreHasPrefix    *string  `json:"trustScoreHasPrefix,omitempty"`
	TrustScoreHasSuffix    *string  `json:"trustScoreHasSuffix,omitempty"`
	TrustScoreIsNil        bool     `json:"trustScoreIsNil,omitempty"`
	TrustScoreNotNil       bool     `json:"trustScoreNotNil,omitempty"`
	TrustScoreEqualFold    *string  `json:"trustScoreEqualFold,omitempty"`
	TrustScoreContainsFold *string  `json:"trustScoreContainsFold,omitempty"`

	// "bid_ask_spread_percentage" field predicates.
	BidAskSpreadPercentage       *float64  `json:"bidAskSpreadPercentage,omitempty"`
	BidAskSpreadPercentageNEQ    *float64  `json:"bidAskSpreadPercentageNEQ,omitempty"`
	BidAskSpreadPercentageIn     []float64 `json:"bidAskSpreadPercentageIn,omitempty"`
	BidAskSpreadPercentageNotIn  []float64 `json:"bidAskSpreadPercentageNotIn,omitempty"`
	BidAskSpreadPercentageGT     *float64  `json:"bidAskSpreadPercentageGT,omitempty"`
	BidAskSpreadPercentageGTE    *float64  `json:"bidAskSpreadPercentageGTE,omitempty"`
	BidAskSpreadPercentageLT     *float64  `json:"bidAskSpreadPercentageLT,omitempty"`
	BidAskSpreadPercentageLTE    *float64  `json:"bidAskSpreadPercentageLTE,omitempty"`
	BidAskSpreadPercentageIsNil  bool      `json:"bidAskSpreadPercentageIsNil,omitempty"`
	BidAskSpreadPercentageNotNil bool      `json:"bidAskSpreadPercentageNotNil,omitempty"`

	// "timestamp" field predicates.
	Timestamp       *time.Time  `json:"timestamp,omitempty"`
	TimestampNEQ    *time.Time  `json:"timestampNEQ,omitempty"`
	TimestampIn     []time.Time `json:"timestampIn,omitempty"`
	TimestampNotIn  []time.Time `json:"timestampNotIn,omitempty"`
	TimestampGT     *time.Time  `json:"timestampGT,omitempty"`
	TimestampGTE    *time.Time  `json:"timestampGTE,omitempty"`
	TimestampLT     *time.Time  `json:"timestampLT,omitempty"`
	TimestampLTE    *time.Time  `json:"timestampLTE,omitempty"`
	TimestampIsNil  bool        `json:"timestampIsNil,omitempty"`
	TimestampNotNil bool        `json:"timestampNotNil,omitempty"`

	// "last_traded_at" field predicates.
	LastTradedAt       *time.Time  `json:"lastTradedAt,omitempty"`
	LastTradedAtNEQ    *time.Time  `json:"lastTradedAtNEQ,omitempty"`
	LastTradedAtIn     []time.Time `json:"lastTradedAtIn,omitempty"`
	LastTradedAtNotIn  []time.Time `json:"lastTradedAtNotIn,omitempty"`
	LastTradedAtGT     *time.Time  `json:"lastTradedAtGT,omitempty"`
	LastTradedAtGTE    *time.Time  `json:"lastTradedAtGTE,omitempty"`
	LastTradedAtLT     *time.Time  `json:"lastTradedAtLT,omitempty"`
	LastTradedAtLTE    *time.Time  `json:"lastTradedAtLTE,omitempty"`
	LastTradedAtIsNil  bool        `json:"lastTradedAtIsNil,omitempty"`
	LastTradedAtNotNil bool        `json:"lastTradedAtNotNil,omitempty"`

	// "last_fetch_at" field predicates.
	LastFetchAt       *time.Time  `json:"lastFetchAt,omitempty"`
	LastFetchAtNEQ    *time.Time  `json:"lastFetchAtNEQ,omitempty"`
	LastFetchAtIn     []time.Time `json:"lastFetchAtIn,omitempty"`
	LastFetchAtNotIn  []time.Time `json:"lastFetchAtNotIn,omitempty"`
	LastFetchAtGT     *time.Time  `json:"lastFetchAtGT,omitempty"`
	LastFetchAtGTE    *time.Time  `json:"lastFetchAtGTE,omitempty"`
	LastFetchAtLT     *time.Time  `json:"lastFetchAtLT,omitempty"`
	LastFetchAtLTE    *time.Time  `json:"lastFetchAtLTE,omitempty"`
	LastFetchAtIsNil  bool        `json:"lastFetchAtIsNil,omitempty"`
	LastFetchAtNotNil bool        `json:"lastFetchAtNotNil,omitempty"`

	// "is_anomaly" field predicates.
	IsAnomaly       *bool `json:"isAnomaly,omitempty"`
	IsAnomalyNEQ    *bool `json:"isAnomalyNEQ,omitempty"`
	IsAnomalyIsNil  bool  `json:"isAnomalyIsNil,omitempty"`
	IsAnomalyNotNil bool  `json:"isAnomalyNotNil,omitempty"`

	// "is_stale" field predicates.
	IsStale       *bool `json:"isStale,omitempty"`
	IsStaleNEQ    *bool `json:"isStaleNEQ,omitempty"`
	IsStaleIsNil  bool  `json:"isStaleIsNil,omitempty"`
	IsStaleNotNil bool  `json:"isStaleNotNil,omitempty"`

	// "trade_url" field predicates.
	TradeURL             *string  `json:"tradeURL,omitempty"`
	TradeURLNEQ          *string  `json:"tradeURLNEQ,omitempty"`
	TradeURLIn           []string `json:"tradeURLIn,omitempty"`
	TradeURLNotIn        []string `json:"tradeURLNotIn,omitempty"`
	TradeURLGT           *string  `json:"tradeURLGT,omitempty"`
	TradeURLGTE          *string  `json:"tradeURLGTE,omitempty"`
	TradeURLLT           *string  `json:"tradeURLLT,omitempty"`
	TradeURLLTE          *string  `json:"tradeURLLTE,omitempty"`
	TradeURLContains     *string  `json:"tradeURLContains,omitempty"`
	TradeURLHasPrefix    *string  `json:"tradeURLHasPrefix,omitempty"`
	TradeURLHasSuffix    *string  `json:"tradeURLHasSuffix,omitempty"`
	TradeURLIsNil        bool     `json:"tradeURLIsNil,omitempty"`
	TradeURLNotNil       bool     `json:"tradeURLNotNil,omitempty"`
	TradeURLEqualFold    *string  `json:"tradeURLEqualFold,omitempty"`
	TradeURLContainsFold *string  `json:"tradeURLContainsFold,omitempty"`

	// "token_info_url" field predicates.
	TokenInfoURL             *string  `json:"tokenInfoURL,omitempty"`
	TokenInfoURLNEQ          *string  `json:"tokenInfoURLNEQ,omitempty"`
	TokenInfoURLIn           []string `json:"tokenInfoURLIn,omitempty"`
	TokenInfoURLNotIn        []string `json:"tokenInfoURLNotIn,omitempty"`
	TokenInfoURLGT           *string  `json:"tokenInfoURLGT,omitempty"`
	TokenInfoURLGTE          *string  `json:"tokenInfoURLGTE,omitempty"`
	TokenInfoURLLT           *string  `json:"tokenInfoURLLT,omitempty"`
	TokenInfoURLLTE          *string  `json:"tokenInfoURLLTE,omitempty"`
	TokenInfoURLContains     *string  `json:"tokenInfoURLContains,omitempty"`
	TokenInfoURLHasPrefix    *string  `json:"tokenInfoURLHasPrefix,omitempty"`
	TokenInfoURLHasSuffix    *string  `json:"tokenInfoURLHasSuffix,omitempty"`
	TokenInfoURLIsNil        bool     `json:"tokenInfoURLIsNil,omitempty"`
	TokenInfoURLNotNil       bool     `json:"tokenInfoURLNotNil,omitempty"`
	TokenInfoURLEqualFold    *string  `json:"tokenInfoURLEqualFold,omitempty"`
	TokenInfoURLContainsFold *string  `json:"tokenInfoURLContainsFold,omitempty"`

	// "venue" edge predicates.
	HasVenue     *bool              `json:"hasVenue,omitempty"`
	HasVenueWith []*VenueWhereInput `json:"hasVenueWith,omitempty"`
}

TickerWhereInput represents a where input for filtering Ticker queries.

func (*TickerWhereInput) AddPredicates

func (i *TickerWhereInput) AddPredicates(predicates ...predicate.Ticker)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*TickerWhereInput) Filter

func (i *TickerWhereInput) Filter(q *TickerQuery) (*TickerQuery, error)

Filter applies the TickerWhereInput filter on the TickerQuery builder.

func (*TickerWhereInput) P

P returns a predicate for filtering tickers. An error is returned if the input is empty or invalid.

type Tickers

type Tickers []*Ticker

Tickers is a parsable slice of Ticker.

type TradingPair

type TradingPair struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Symbol holds the value of the "symbol" field.
	Symbol string `json:"symbol,omitempty"`
	// BasePriceMinPrecision holds the value of the "base_price_min_precision" field.
	BasePriceMinPrecision int `json:"base_price_min_precision,omitempty"`
	// BasePriceMaxPrecision holds the value of the "base_price_max_precision" field.
	BasePriceMaxPrecision int `json:"base_price_max_precision,omitempty"`
	// BaseQuantityMinPrecision holds the value of the "base_quantity_min_precision" field.
	BaseQuantityMinPrecision int `json:"base_quantity_min_precision,omitempty"`
	// BaseQuantityMaxPrecision holds the value of the "base_quantity_max_precision" field.
	BaseQuantityMaxPrecision int `json:"base_quantity_max_precision,omitempty"`
	// CounterPriceMinPrecision holds the value of the "counter_price_min_precision" field.
	CounterPriceMinPrecision int `json:"counter_price_min_precision,omitempty"`
	// CounterPriceMaxPrecision holds the value of the "counter_price_max_precision" field.
	CounterPriceMaxPrecision int `json:"counter_price_max_precision,omitempty"`
	// CounterQuantityMinPrecision holds the value of the "counter_quantity_min_precision" field.
	CounterQuantityMinPrecision int `json:"counter_quantity_min_precision,omitempty"`
	// CounterQuantityMaxPrecision holds the value of the "counter_quantity_max_precision" field.
	CounterQuantityMaxPrecision int `json:"counter_quantity_max_precision,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TradingPairQuery when eager-loading is set.
	Edges TradingPairEdges `json:"edges"`
	// contains filtered or unexported fields
}

TradingPair is the model entity for the TradingPair schema.

func (*TradingPair) Base

func (tp *TradingPair) Base(ctx context.Context) (*Currency, error)

func (*TradingPair) Counter

func (tp *TradingPair) Counter(ctx context.Context) (*Currency, error)

func (*TradingPair) ExecContext

func (c *TradingPair) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPair) IsNode

func (n *TradingPair) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*TradingPair) Market

func (tp *TradingPair) Market(ctx context.Context) (result []*Market, err error)

func (*TradingPair) NamedMarket

func (tp *TradingPair) NamedMarket(name string) ([]*Market, error)

NamedMarket returns the Market named value or an error if the edge was not loaded in eager-loading with this name.

func (*TradingPair) QueryBase

func (tp *TradingPair) QueryBase() *CurrencyQuery

QueryBase queries the "base" edge of the TradingPair entity.

func (*TradingPair) QueryContext

func (c *TradingPair) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPair) QueryCounter

func (tp *TradingPair) QueryCounter() *CurrencyQuery

QueryCounter queries the "counter" edge of the TradingPair entity.

func (*TradingPair) QueryMarket

func (tp *TradingPair) QueryMarket() *MarketQuery

QueryMarket queries the "market" edge of the TradingPair entity.

func (*TradingPair) QueryVenue

func (tp *TradingPair) QueryVenue() *VenueQuery

QueryVenue queries the "venue" edge of the TradingPair entity.

func (*TradingPair) String

func (tp *TradingPair) String() string

String implements the fmt.Stringer.

func (*TradingPair) ToEdge

func (tp *TradingPair) ToEdge(order *TradingPairOrder) *TradingPairEdge

ToEdge converts TradingPair into TradingPairEdge.

func (*TradingPair) Unwrap

func (tp *TradingPair) Unwrap() *TradingPair

Unwrap unwraps the TradingPair 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 (*TradingPair) Update

func (tp *TradingPair) Update() *TradingPairUpdateOne

Update returns a builder for updating this TradingPair. Note that you need to call TradingPair.Unwrap() before calling this method if this TradingPair was returned from a transaction, and the transaction was committed or rolled back.

func (*TradingPair) Venue

func (tp *TradingPair) Venue(ctx context.Context) (*Venue, error)

type TradingPairClient

type TradingPairClient struct {
	// contains filtered or unexported fields
}

TradingPairClient is a client for the TradingPair schema.

func NewTradingPairClient

func NewTradingPairClient(c config) *TradingPairClient

NewTradingPairClient returns a client for the TradingPair from the given config.

func (*TradingPairClient) Create

func (c *TradingPairClient) Create() *TradingPairCreate

Create returns a builder for creating a TradingPair entity.

func (*TradingPairClient) CreateBulk

func (c *TradingPairClient) CreateBulk(builders ...*TradingPairCreate) *TradingPairCreateBulk

CreateBulk returns a builder for creating a bulk of TradingPair entities.

func (*TradingPairClient) Delete

func (c *TradingPairClient) Delete() *TradingPairDelete

Delete returns a delete builder for TradingPair.

func (*TradingPairClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TradingPairClient) DeleteOneID

func (c *TradingPairClient) DeleteOneID(id int) *TradingPairDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TradingPairClient) ExecContext

func (c *TradingPairClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairClient) Get

func (c *TradingPairClient) Get(ctx context.Context, id int) (*TradingPair, error)

Get returns a TradingPair entity by its id.

func (*TradingPairClient) GetX

func (c *TradingPairClient) GetX(ctx context.Context, id int) *TradingPair

GetX is like Get, but panics if an error occurs.

func (*TradingPairClient) Hooks

func (c *TradingPairClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TradingPairClient) Intercept

func (c *TradingPairClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tradingpair.Intercept(f(g(h())))`.

func (*TradingPairClient) Interceptors

func (c *TradingPairClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TradingPairClient) Query

func (c *TradingPairClient) Query() *TradingPairQuery

Query returns a query builder for TradingPair.

func (*TradingPairClient) QueryBase

func (c *TradingPairClient) QueryBase(tp *TradingPair) *CurrencyQuery

QueryBase queries the base edge of a TradingPair.

func (*TradingPairClient) QueryContext

func (c *TradingPairClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairClient) QueryCounter

func (c *TradingPairClient) QueryCounter(tp *TradingPair) *CurrencyQuery

QueryCounter queries the counter edge of a TradingPair.

func (*TradingPairClient) QueryMarket

func (c *TradingPairClient) QueryMarket(tp *TradingPair) *MarketQuery

QueryMarket queries the market edge of a TradingPair.

func (*TradingPairClient) QueryVenue

func (c *TradingPairClient) QueryVenue(tp *TradingPair) *VenueQuery

QueryVenue queries the venue edge of a TradingPair.

func (*TradingPairClient) Update

func (c *TradingPairClient) Update() *TradingPairUpdate

Update returns an update builder for TradingPair.

func (*TradingPairClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TradingPairClient) UpdateOneID

func (c *TradingPairClient) UpdateOneID(id int) *TradingPairUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TradingPairClient) Use

func (c *TradingPairClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tradingpair.Hooks(f(g(h())))`.

type TradingPairConnection

type TradingPairConnection struct {
	Edges      []*TradingPairEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

TradingPairConnection is the connection containing edges to TradingPair.

type TradingPairCreate

type TradingPairCreate struct {
	// contains filtered or unexported fields
}

TradingPairCreate is the builder for creating a TradingPair entity.

func (*TradingPairCreate) AddMarket

func (tpc *TradingPairCreate) AddMarket(m ...*Market) *TradingPairCreate

AddMarket adds the "market" edges to the Market entity.

func (*TradingPairCreate) AddMarketIDs

func (tpc *TradingPairCreate) AddMarketIDs(ids ...int) *TradingPairCreate

AddMarketIDs adds the "market" edge to the Market entity by IDs.

func (*TradingPairCreate) Exec

func (tpc *TradingPairCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TradingPairCreate) ExecContext

func (c *TradingPairCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairCreate) ExecX

func (tpc *TradingPairCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TradingPairCreate) Mutation

func (tpc *TradingPairCreate) Mutation() *TradingPairMutation

Mutation returns the TradingPairMutation object of the builder.

func (*TradingPairCreate) OnConflict

func (tpc *TradingPairCreate) OnConflict(opts ...sql.ConflictOption) *TradingPairUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TradingPair.Create().
	SetSymbol(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.TradingPairUpsert) {
		SetSymbol(v+v).
	}).
	Exec(ctx)

func (*TradingPairCreate) OnConflictColumns

func (tpc *TradingPairCreate) OnConflictColumns(columns ...string) *TradingPairUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TradingPair.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TradingPairCreate) QueryContext

func (c *TradingPairCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairCreate) Save

func (tpc *TradingPairCreate) Save(ctx context.Context) (*TradingPair, error)

Save creates the TradingPair in the database.

func (*TradingPairCreate) SaveX

func (tpc *TradingPairCreate) SaveX(ctx context.Context) *TradingPair

SaveX calls Save and panics if Save returns an error.

func (*TradingPairCreate) SetBase

func (tpc *TradingPairCreate) SetBase(c *Currency) *TradingPairCreate

SetBase sets the "base" edge to the Currency entity.

func (*TradingPairCreate) SetBaseID

func (tpc *TradingPairCreate) SetBaseID(id int) *TradingPairCreate

SetBaseID sets the "base" edge to the Currency entity by ID.

func (*TradingPairCreate) SetBasePriceMaxPrecision

func (tpc *TradingPairCreate) SetBasePriceMaxPrecision(i int) *TradingPairCreate

SetBasePriceMaxPrecision sets the "base_price_max_precision" field.

func (*TradingPairCreate) SetBasePriceMinPrecision

func (tpc *TradingPairCreate) SetBasePriceMinPrecision(i int) *TradingPairCreate

SetBasePriceMinPrecision sets the "base_price_min_precision" field.

func (*TradingPairCreate) SetBaseQuantityMaxPrecision

func (tpc *TradingPairCreate) SetBaseQuantityMaxPrecision(i int) *TradingPairCreate

SetBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field.

func (*TradingPairCreate) SetBaseQuantityMinPrecision

func (tpc *TradingPairCreate) SetBaseQuantityMinPrecision(i int) *TradingPairCreate

SetBaseQuantityMinPrecision sets the "base_quantity_min_precision" field.

func (*TradingPairCreate) SetCounter

func (tpc *TradingPairCreate) SetCounter(c *Currency) *TradingPairCreate

SetCounter sets the "counter" edge to the Currency entity.

func (*TradingPairCreate) SetCounterID

func (tpc *TradingPairCreate) SetCounterID(id int) *TradingPairCreate

SetCounterID sets the "counter" edge to the Currency entity by ID.

func (*TradingPairCreate) SetCounterPriceMaxPrecision

func (tpc *TradingPairCreate) SetCounterPriceMaxPrecision(i int) *TradingPairCreate

SetCounterPriceMaxPrecision sets the "counter_price_max_precision" field.

func (*TradingPairCreate) SetCounterPriceMinPrecision

func (tpc *TradingPairCreate) SetCounterPriceMinPrecision(i int) *TradingPairCreate

SetCounterPriceMinPrecision sets the "counter_price_min_precision" field.

func (*TradingPairCreate) SetCounterQuantityMaxPrecision

func (tpc *TradingPairCreate) SetCounterQuantityMaxPrecision(i int) *TradingPairCreate

SetCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field.

func (*TradingPairCreate) SetCounterQuantityMinPrecision

func (tpc *TradingPairCreate) SetCounterQuantityMinPrecision(i int) *TradingPairCreate

SetCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field.

func (*TradingPairCreate) SetNillableBasePriceMaxPrecision

func (tpc *TradingPairCreate) SetNillableBasePriceMaxPrecision(i *int) *TradingPairCreate

SetNillableBasePriceMaxPrecision sets the "base_price_max_precision" field if the given value is not nil.

func (*TradingPairCreate) SetNillableBasePriceMinPrecision

func (tpc *TradingPairCreate) SetNillableBasePriceMinPrecision(i *int) *TradingPairCreate

SetNillableBasePriceMinPrecision sets the "base_price_min_precision" field if the given value is not nil.

func (*TradingPairCreate) SetNillableBaseQuantityMaxPrecision

func (tpc *TradingPairCreate) SetNillableBaseQuantityMaxPrecision(i *int) *TradingPairCreate

SetNillableBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field if the given value is not nil.

func (*TradingPairCreate) SetNillableBaseQuantityMinPrecision

func (tpc *TradingPairCreate) SetNillableBaseQuantityMinPrecision(i *int) *TradingPairCreate

SetNillableBaseQuantityMinPrecision sets the "base_quantity_min_precision" field if the given value is not nil.

func (*TradingPairCreate) SetNillableCounterPriceMaxPrecision

func (tpc *TradingPairCreate) SetNillableCounterPriceMaxPrecision(i *int) *TradingPairCreate

SetNillableCounterPriceMaxPrecision sets the "counter_price_max_precision" field if the given value is not nil.

func (*TradingPairCreate) SetNillableCounterPriceMinPrecision

func (tpc *TradingPairCreate) SetNillableCounterPriceMinPrecision(i *int) *TradingPairCreate

SetNillableCounterPriceMinPrecision sets the "counter_price_min_precision" field if the given value is not nil.

func (*TradingPairCreate) SetNillableCounterQuantityMaxPrecision

func (tpc *TradingPairCreate) SetNillableCounterQuantityMaxPrecision(i *int) *TradingPairCreate

SetNillableCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field if the given value is not nil.

func (*TradingPairCreate) SetNillableCounterQuantityMinPrecision

func (tpc *TradingPairCreate) SetNillableCounterQuantityMinPrecision(i *int) *TradingPairCreate

SetNillableCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field if the given value is not nil.

func (*TradingPairCreate) SetSymbol

func (tpc *TradingPairCreate) SetSymbol(s string) *TradingPairCreate

SetSymbol sets the "symbol" field.

func (*TradingPairCreate) SetVenue

func (tpc *TradingPairCreate) SetVenue(v *Venue) *TradingPairCreate

SetVenue sets the "venue" edge to the Venue entity.

func (*TradingPairCreate) SetVenueID

func (tpc *TradingPairCreate) SetVenueID(id int) *TradingPairCreate

SetVenueID sets the "venue" edge to the Venue entity by ID.

type TradingPairCreateBulk

type TradingPairCreateBulk struct {
	// contains filtered or unexported fields
}

TradingPairCreateBulk is the builder for creating many TradingPair entities in bulk.

func (*TradingPairCreateBulk) Exec

func (tpcb *TradingPairCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TradingPairCreateBulk) ExecContext

func (c *TradingPairCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairCreateBulk) ExecX

func (tpcb *TradingPairCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TradingPairCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TradingPair.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.TradingPairUpsert) {
		SetSymbol(v+v).
	}).
	Exec(ctx)

func (*TradingPairCreateBulk) OnConflictColumns

func (tpcb *TradingPairCreateBulk) OnConflictColumns(columns ...string) *TradingPairUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TradingPair.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TradingPairCreateBulk) QueryContext

func (c *TradingPairCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairCreateBulk) Save

func (tpcb *TradingPairCreateBulk) Save(ctx context.Context) ([]*TradingPair, error)

Save creates the TradingPair entities in the database.

func (*TradingPairCreateBulk) SaveX

func (tpcb *TradingPairCreateBulk) SaveX(ctx context.Context) []*TradingPair

SaveX is like Save, but panics if an error occurs.

type TradingPairDelete

type TradingPairDelete struct {
	// contains filtered or unexported fields
}

TradingPairDelete is the builder for deleting a TradingPair entity.

func (*TradingPairDelete) Exec

func (tpd *TradingPairDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TradingPairDelete) ExecContext

func (c *TradingPairDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairDelete) ExecX

func (tpd *TradingPairDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TradingPairDelete) QueryContext

func (c *TradingPairDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairDelete) Where

Where appends a list predicates to the TradingPairDelete builder.

type TradingPairDeleteOne

type TradingPairDeleteOne struct {
	// contains filtered or unexported fields
}

TradingPairDeleteOne is the builder for deleting a single TradingPair entity.

func (*TradingPairDeleteOne) Exec

func (tpdo *TradingPairDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TradingPairDeleteOne) ExecX

func (tpdo *TradingPairDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TradingPairDeleteOne) Where

Where appends a list predicates to the TradingPairDelete builder.

type TradingPairEdge

type TradingPairEdge struct {
	Node   *TradingPair `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

TradingPairEdge is the edge representation of TradingPair.

type TradingPairEdges

type TradingPairEdges struct {
	// Venue holds the value of the venue edge.
	Venue *Venue `json:"venue,omitempty"`
	// Base holds the value of the base edge.
	Base *Currency `json:"base,omitempty"`
	// Counter holds the value of the counter edge.
	Counter *Currency `json:"counter,omitempty"`
	// Market holds the value of the market edge.
	Market []*Market `json:"market,omitempty"`
	// contains filtered or unexported fields
}

TradingPairEdges holds the relations/edges for other nodes in the graph.

func (TradingPairEdges) BaseOrErr

func (e TradingPairEdges) BaseOrErr() (*Currency, 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 (TradingPairEdges) CounterOrErr

func (e TradingPairEdges) CounterOrErr() (*Currency, error)

CounterOrErr returns the Counter value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TradingPairEdges) MarketOrErr

func (e TradingPairEdges) MarketOrErr() ([]*Market, error)

MarketOrErr returns the Market value or an error if the edge was not loaded in eager-loading.

func (TradingPairEdges) VenueOrErr

func (e TradingPairEdges) VenueOrErr() (*Venue, error)

VenueOrErr returns the Venue value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TradingPairFilter

type TradingPairFilter struct {
	// contains filtered or unexported fields
}

TradingPairFilter provides a generic filtering capability at runtime for TradingPairQuery.

func (*TradingPairFilter) ExecContext

func (c *TradingPairFilter) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairFilter) QueryContext

func (c *TradingPairFilter) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairFilter) Where

func (f *TradingPairFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*TradingPairFilter) WhereBasePriceMaxPrecision

func (f *TradingPairFilter) WhereBasePriceMaxPrecision(p entql.IntP)

WhereBasePriceMaxPrecision applies the entql int predicate on the base_price_max_precision field.

func (*TradingPairFilter) WhereBasePriceMinPrecision

func (f *TradingPairFilter) WhereBasePriceMinPrecision(p entql.IntP)

WhereBasePriceMinPrecision applies the entql int predicate on the base_price_min_precision field.

func (*TradingPairFilter) WhereBaseQuantityMaxPrecision

func (f *TradingPairFilter) WhereBaseQuantityMaxPrecision(p entql.IntP)

WhereBaseQuantityMaxPrecision applies the entql int predicate on the base_quantity_max_precision field.

func (*TradingPairFilter) WhereBaseQuantityMinPrecision

func (f *TradingPairFilter) WhereBaseQuantityMinPrecision(p entql.IntP)

WhereBaseQuantityMinPrecision applies the entql int predicate on the base_quantity_min_precision field.

func (*TradingPairFilter) WhereCounterPriceMaxPrecision

func (f *TradingPairFilter) WhereCounterPriceMaxPrecision(p entql.IntP)

WhereCounterPriceMaxPrecision applies the entql int predicate on the counter_price_max_precision field.

func (*TradingPairFilter) WhereCounterPriceMinPrecision

func (f *TradingPairFilter) WhereCounterPriceMinPrecision(p entql.IntP)

WhereCounterPriceMinPrecision applies the entql int predicate on the counter_price_min_precision field.

func (*TradingPairFilter) WhereCounterQuantityMaxPrecision

func (f *TradingPairFilter) WhereCounterQuantityMaxPrecision(p entql.IntP)

WhereCounterQuantityMaxPrecision applies the entql int predicate on the counter_quantity_max_precision field.

func (*TradingPairFilter) WhereCounterQuantityMinPrecision

func (f *TradingPairFilter) WhereCounterQuantityMinPrecision(p entql.IntP)

WhereCounterQuantityMinPrecision applies the entql int predicate on the counter_quantity_min_precision field.

func (*TradingPairFilter) WhereHasBase

func (f *TradingPairFilter) WhereHasBase()

WhereHasBase applies a predicate to check if query has an edge base.

func (*TradingPairFilter) WhereHasBaseWith

func (f *TradingPairFilter) WhereHasBaseWith(preds ...predicate.Currency)

WhereHasBaseWith applies a predicate to check if query has an edge base with a given conditions (other predicates).

func (*TradingPairFilter) WhereHasCounter

func (f *TradingPairFilter) WhereHasCounter()

WhereHasCounter applies a predicate to check if query has an edge counter.

func (*TradingPairFilter) WhereHasCounterWith

func (f *TradingPairFilter) WhereHasCounterWith(preds ...predicate.Currency)

WhereHasCounterWith applies a predicate to check if query has an edge counter with a given conditions (other predicates).

func (*TradingPairFilter) WhereHasMarket

func (f *TradingPairFilter) WhereHasMarket()

WhereHasMarket applies a predicate to check if query has an edge market.

func (*TradingPairFilter) WhereHasMarketWith

func (f *TradingPairFilter) WhereHasMarketWith(preds ...predicate.Market)

WhereHasMarketWith applies a predicate to check if query has an edge market with a given conditions (other predicates).

func (*TradingPairFilter) WhereHasVenue

func (f *TradingPairFilter) WhereHasVenue()

WhereHasVenue applies a predicate to check if query has an edge venue.

func (*TradingPairFilter) WhereHasVenueWith

func (f *TradingPairFilter) WhereHasVenueWith(preds ...predicate.Venue)

WhereHasVenueWith applies a predicate to check if query has an edge venue with a given conditions (other predicates).

func (*TradingPairFilter) WhereID

func (f *TradingPairFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*TradingPairFilter) WhereSymbol

func (f *TradingPairFilter) WhereSymbol(p entql.StringP)

WhereSymbol applies the entql string predicate on the symbol field.

type TradingPairGroupBy

type TradingPairGroupBy struct {
	// contains filtered or unexported fields
}

TradingPairGroupBy is the group-by builder for TradingPair entities.

func (*TradingPairGroupBy) Aggregate

func (tpgb *TradingPairGroupBy) Aggregate(fns ...AggregateFunc) *TradingPairGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TradingPairGroupBy) Bool

func (s *TradingPairGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TradingPairGroupBy) BoolX

func (s *TradingPairGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TradingPairGroupBy) Bools

func (s *TradingPairGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TradingPairGroupBy) BoolsX

func (s *TradingPairGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TradingPairGroupBy) Float64

func (s *TradingPairGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TradingPairGroupBy) Float64X

func (s *TradingPairGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TradingPairGroupBy) Float64s

func (s *TradingPairGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TradingPairGroupBy) Float64sX

func (s *TradingPairGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TradingPairGroupBy) Int

func (s *TradingPairGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TradingPairGroupBy) IntX

func (s *TradingPairGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TradingPairGroupBy) Ints

func (s *TradingPairGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TradingPairGroupBy) IntsX

func (s *TradingPairGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TradingPairGroupBy) Scan

func (tpgb *TradingPairGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TradingPairGroupBy) ScanX

func (s *TradingPairGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TradingPairGroupBy) String

func (s *TradingPairGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TradingPairGroupBy) StringX

func (s *TradingPairGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TradingPairGroupBy) Strings

func (s *TradingPairGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TradingPairGroupBy) StringsX

func (s *TradingPairGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TradingPairMutation

type TradingPairMutation struct {
	// contains filtered or unexported fields
}

TradingPairMutation represents an operation that mutates the TradingPair nodes in the graph.

func (*TradingPairMutation) AddBasePriceMaxPrecision

func (m *TradingPairMutation) AddBasePriceMaxPrecision(i int)

AddBasePriceMaxPrecision adds i to the "base_price_max_precision" field.

func (*TradingPairMutation) AddBasePriceMinPrecision

func (m *TradingPairMutation) AddBasePriceMinPrecision(i int)

AddBasePriceMinPrecision adds i to the "base_price_min_precision" field.

func (*TradingPairMutation) AddBaseQuantityMaxPrecision

func (m *TradingPairMutation) AddBaseQuantityMaxPrecision(i int)

AddBaseQuantityMaxPrecision adds i to the "base_quantity_max_precision" field.

func (*TradingPairMutation) AddBaseQuantityMinPrecision

func (m *TradingPairMutation) AddBaseQuantityMinPrecision(i int)

AddBaseQuantityMinPrecision adds i to the "base_quantity_min_precision" field.

func (*TradingPairMutation) AddCounterPriceMaxPrecision

func (m *TradingPairMutation) AddCounterPriceMaxPrecision(i int)

AddCounterPriceMaxPrecision adds i to the "counter_price_max_precision" field.

func (*TradingPairMutation) AddCounterPriceMinPrecision

func (m *TradingPairMutation) AddCounterPriceMinPrecision(i int)

AddCounterPriceMinPrecision adds i to the "counter_price_min_precision" field.

func (*TradingPairMutation) AddCounterQuantityMaxPrecision

func (m *TradingPairMutation) AddCounterQuantityMaxPrecision(i int)

AddCounterQuantityMaxPrecision adds i to the "counter_quantity_max_precision" field.

func (*TradingPairMutation) AddCounterQuantityMinPrecision

func (m *TradingPairMutation) AddCounterQuantityMinPrecision(i int)

AddCounterQuantityMinPrecision adds i to the "counter_quantity_min_precision" field.

func (*TradingPairMutation) AddField

func (m *TradingPairMutation) 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 (*TradingPairMutation) AddMarketIDs

func (m *TradingPairMutation) AddMarketIDs(ids ...int)

AddMarketIDs adds the "market" edge to the Market entity by ids.

func (*TradingPairMutation) AddedBasePriceMaxPrecision

func (m *TradingPairMutation) AddedBasePriceMaxPrecision() (r int, exists bool)

AddedBasePriceMaxPrecision returns the value that was added to the "base_price_max_precision" field in this mutation.

func (*TradingPairMutation) AddedBasePriceMinPrecision

func (m *TradingPairMutation) AddedBasePriceMinPrecision() (r int, exists bool)

AddedBasePriceMinPrecision returns the value that was added to the "base_price_min_precision" field in this mutation.

func (*TradingPairMutation) AddedBaseQuantityMaxPrecision

func (m *TradingPairMutation) AddedBaseQuantityMaxPrecision() (r int, exists bool)

AddedBaseQuantityMaxPrecision returns the value that was added to the "base_quantity_max_precision" field in this mutation.

func (*TradingPairMutation) AddedBaseQuantityMinPrecision

func (m *TradingPairMutation) AddedBaseQuantityMinPrecision() (r int, exists bool)

AddedBaseQuantityMinPrecision returns the value that was added to the "base_quantity_min_precision" field in this mutation.

func (*TradingPairMutation) AddedCounterPriceMaxPrecision

func (m *TradingPairMutation) AddedCounterPriceMaxPrecision() (r int, exists bool)

AddedCounterPriceMaxPrecision returns the value that was added to the "counter_price_max_precision" field in this mutation.

func (*TradingPairMutation) AddedCounterPriceMinPrecision

func (m *TradingPairMutation) AddedCounterPriceMinPrecision() (r int, exists bool)

AddedCounterPriceMinPrecision returns the value that was added to the "counter_price_min_precision" field in this mutation.

func (*TradingPairMutation) AddedCounterQuantityMaxPrecision

func (m *TradingPairMutation) AddedCounterQuantityMaxPrecision() (r int, exists bool)

AddedCounterQuantityMaxPrecision returns the value that was added to the "counter_quantity_max_precision" field in this mutation.

func (*TradingPairMutation) AddedCounterQuantityMinPrecision

func (m *TradingPairMutation) AddedCounterQuantityMinPrecision() (r int, exists bool)

AddedCounterQuantityMinPrecision returns the value that was added to the "counter_quantity_min_precision" field in this mutation.

func (*TradingPairMutation) AddedEdges

func (m *TradingPairMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TradingPairMutation) AddedField

func (m *TradingPairMutation) 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 (*TradingPairMutation) AddedFields

func (m *TradingPairMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TradingPairMutation) AddedIDs

func (m *TradingPairMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TradingPairMutation) BaseCleared

func (m *TradingPairMutation) BaseCleared() bool

BaseCleared reports if the "base" edge to the Currency entity was cleared.

func (*TradingPairMutation) BaseID

func (m *TradingPairMutation) BaseID() (id int, exists bool)

BaseID returns the "base" edge ID in the mutation.

func (*TradingPairMutation) BaseIDs

func (m *TradingPairMutation) BaseIDs() (ids []int)

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 (*TradingPairMutation) BasePriceMaxPrecision

func (m *TradingPairMutation) BasePriceMaxPrecision() (r int, exists bool)

BasePriceMaxPrecision returns the value of the "base_price_max_precision" field in the mutation.

func (*TradingPairMutation) BasePriceMaxPrecisionCleared

func (m *TradingPairMutation) BasePriceMaxPrecisionCleared() bool

BasePriceMaxPrecisionCleared returns if the "base_price_max_precision" field was cleared in this mutation.

func (*TradingPairMutation) BasePriceMinPrecision

func (m *TradingPairMutation) BasePriceMinPrecision() (r int, exists bool)

BasePriceMinPrecision returns the value of the "base_price_min_precision" field in the mutation.

func (*TradingPairMutation) BasePriceMinPrecisionCleared

func (m *TradingPairMutation) BasePriceMinPrecisionCleared() bool

BasePriceMinPrecisionCleared returns if the "base_price_min_precision" field was cleared in this mutation.

func (*TradingPairMutation) BaseQuantityMaxPrecision

func (m *TradingPairMutation) BaseQuantityMaxPrecision() (r int, exists bool)

BaseQuantityMaxPrecision returns the value of the "base_quantity_max_precision" field in the mutation.

func (*TradingPairMutation) BaseQuantityMaxPrecisionCleared

func (m *TradingPairMutation) BaseQuantityMaxPrecisionCleared() bool

BaseQuantityMaxPrecisionCleared returns if the "base_quantity_max_precision" field was cleared in this mutation.

func (*TradingPairMutation) BaseQuantityMinPrecision

func (m *TradingPairMutation) BaseQuantityMinPrecision() (r int, exists bool)

BaseQuantityMinPrecision returns the value of the "base_quantity_min_precision" field in the mutation.

func (*TradingPairMutation) BaseQuantityMinPrecisionCleared

func (m *TradingPairMutation) BaseQuantityMinPrecisionCleared() bool

BaseQuantityMinPrecisionCleared returns if the "base_quantity_min_precision" field was cleared in this mutation.

func (*TradingPairMutation) ClearBase

func (m *TradingPairMutation) ClearBase()

ClearBase clears the "base" edge to the Currency entity.

func (*TradingPairMutation) ClearBasePriceMaxPrecision

func (m *TradingPairMutation) ClearBasePriceMaxPrecision()

ClearBasePriceMaxPrecision clears the value of the "base_price_max_precision" field.

func (*TradingPairMutation) ClearBasePriceMinPrecision

func (m *TradingPairMutation) ClearBasePriceMinPrecision()

ClearBasePriceMinPrecision clears the value of the "base_price_min_precision" field.

func (*TradingPairMutation) ClearBaseQuantityMaxPrecision

func (m *TradingPairMutation) ClearBaseQuantityMaxPrecision()

ClearBaseQuantityMaxPrecision clears the value of the "base_quantity_max_precision" field.

func (*TradingPairMutation) ClearBaseQuantityMinPrecision

func (m *TradingPairMutation) ClearBaseQuantityMinPrecision()

ClearBaseQuantityMinPrecision clears the value of the "base_quantity_min_precision" field.

func (*TradingPairMutation) ClearCounter

func (m *TradingPairMutation) ClearCounter()

ClearCounter clears the "counter" edge to the Currency entity.

func (*TradingPairMutation) ClearCounterPriceMaxPrecision

func (m *TradingPairMutation) ClearCounterPriceMaxPrecision()

ClearCounterPriceMaxPrecision clears the value of the "counter_price_max_precision" field.

func (*TradingPairMutation) ClearCounterPriceMinPrecision

func (m *TradingPairMutation) ClearCounterPriceMinPrecision()

ClearCounterPriceMinPrecision clears the value of the "counter_price_min_precision" field.

func (*TradingPairMutation) ClearCounterQuantityMaxPrecision

func (m *TradingPairMutation) ClearCounterQuantityMaxPrecision()

ClearCounterQuantityMaxPrecision clears the value of the "counter_quantity_max_precision" field.

func (*TradingPairMutation) ClearCounterQuantityMinPrecision

func (m *TradingPairMutation) ClearCounterQuantityMinPrecision()

ClearCounterQuantityMinPrecision clears the value of the "counter_quantity_min_precision" field.

func (*TradingPairMutation) ClearEdge

func (m *TradingPairMutation) 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 (*TradingPairMutation) ClearField

func (m *TradingPairMutation) 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 (*TradingPairMutation) ClearMarket

func (m *TradingPairMutation) ClearMarket()

ClearMarket clears the "market" edge to the Market entity.

func (*TradingPairMutation) ClearVenue

func (m *TradingPairMutation) ClearVenue()

ClearVenue clears the "venue" edge to the Venue entity.

func (*TradingPairMutation) ClearedEdges

func (m *TradingPairMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TradingPairMutation) ClearedFields

func (m *TradingPairMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TradingPairMutation) Client

func (m TradingPairMutation) 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 (*TradingPairMutation) CounterCleared

func (m *TradingPairMutation) CounterCleared() bool

CounterCleared reports if the "counter" edge to the Currency entity was cleared.

func (*TradingPairMutation) CounterID

func (m *TradingPairMutation) CounterID() (id int, exists bool)

CounterID returns the "counter" edge ID in the mutation.

func (*TradingPairMutation) CounterIDs

func (m *TradingPairMutation) CounterIDs() (ids []int)

CounterIDs returns the "counter" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CounterID instead. It exists only for internal usage by the builders.

func (*TradingPairMutation) CounterPriceMaxPrecision

func (m *TradingPairMutation) CounterPriceMaxPrecision() (r int, exists bool)

CounterPriceMaxPrecision returns the value of the "counter_price_max_precision" field in the mutation.

func (*TradingPairMutation) CounterPriceMaxPrecisionCleared

func (m *TradingPairMutation) CounterPriceMaxPrecisionCleared() bool

CounterPriceMaxPrecisionCleared returns if the "counter_price_max_precision" field was cleared in this mutation.

func (*TradingPairMutation) CounterPriceMinPrecision

func (m *TradingPairMutation) CounterPriceMinPrecision() (r int, exists bool)

CounterPriceMinPrecision returns the value of the "counter_price_min_precision" field in the mutation.

func (*TradingPairMutation) CounterPriceMinPrecisionCleared

func (m *TradingPairMutation) CounterPriceMinPrecisionCleared() bool

CounterPriceMinPrecisionCleared returns if the "counter_price_min_precision" field was cleared in this mutation.

func (*TradingPairMutation) CounterQuantityMaxPrecision

func (m *TradingPairMutation) CounterQuantityMaxPrecision() (r int, exists bool)

CounterQuantityMaxPrecision returns the value of the "counter_quantity_max_precision" field in the mutation.

func (*TradingPairMutation) CounterQuantityMaxPrecisionCleared

func (m *TradingPairMutation) CounterQuantityMaxPrecisionCleared() bool

CounterQuantityMaxPrecisionCleared returns if the "counter_quantity_max_precision" field was cleared in this mutation.

func (*TradingPairMutation) CounterQuantityMinPrecision

func (m *TradingPairMutation) CounterQuantityMinPrecision() (r int, exists bool)

CounterQuantityMinPrecision returns the value of the "counter_quantity_min_precision" field in the mutation.

func (*TradingPairMutation) CounterQuantityMinPrecisionCleared

func (m *TradingPairMutation) CounterQuantityMinPrecisionCleared() bool

CounterQuantityMinPrecisionCleared returns if the "counter_quantity_min_precision" field was cleared in this mutation.

func (*TradingPairMutation) EdgeCleared

func (m *TradingPairMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TradingPairMutation) ExecContext

func (c *TradingPairMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairMutation) Field

func (m *TradingPairMutation) 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 (*TradingPairMutation) FieldCleared

func (m *TradingPairMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TradingPairMutation) Fields

func (m *TradingPairMutation) 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 (*TradingPairMutation) Filter

Filter returns an entql.Where implementation to apply filters on the TradingPairMutation builder.

func (*TradingPairMutation) ID

func (m *TradingPairMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TradingPairMutation) IDs

func (m *TradingPairMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TradingPairMutation) MarketCleared

func (m *TradingPairMutation) MarketCleared() bool

MarketCleared reports if the "market" edge to the Market entity was cleared.

func (*TradingPairMutation) MarketIDs

func (m *TradingPairMutation) MarketIDs() (ids []int)

MarketIDs returns the "market" edge IDs in the mutation.

func (*TradingPairMutation) OldBasePriceMaxPrecision

func (m *TradingPairMutation) OldBasePriceMaxPrecision(ctx context.Context) (v int, err error)

OldBasePriceMaxPrecision returns the old "base_price_max_precision" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) OldBasePriceMinPrecision

func (m *TradingPairMutation) OldBasePriceMinPrecision(ctx context.Context) (v int, err error)

OldBasePriceMinPrecision returns the old "base_price_min_precision" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) OldBaseQuantityMaxPrecision

func (m *TradingPairMutation) OldBaseQuantityMaxPrecision(ctx context.Context) (v int, err error)

OldBaseQuantityMaxPrecision returns the old "base_quantity_max_precision" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) OldBaseQuantityMinPrecision

func (m *TradingPairMutation) OldBaseQuantityMinPrecision(ctx context.Context) (v int, err error)

OldBaseQuantityMinPrecision returns the old "base_quantity_min_precision" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) OldCounterPriceMaxPrecision

func (m *TradingPairMutation) OldCounterPriceMaxPrecision(ctx context.Context) (v int, err error)

OldCounterPriceMaxPrecision returns the old "counter_price_max_precision" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) OldCounterPriceMinPrecision

func (m *TradingPairMutation) OldCounterPriceMinPrecision(ctx context.Context) (v int, err error)

OldCounterPriceMinPrecision returns the old "counter_price_min_precision" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) OldCounterQuantityMaxPrecision

func (m *TradingPairMutation) OldCounterQuantityMaxPrecision(ctx context.Context) (v int, err error)

OldCounterQuantityMaxPrecision returns the old "counter_quantity_max_precision" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) OldCounterQuantityMinPrecision

func (m *TradingPairMutation) OldCounterQuantityMinPrecision(ctx context.Context) (v int, err error)

OldCounterQuantityMinPrecision returns the old "counter_quantity_min_precision" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) OldField

func (m *TradingPairMutation) 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 (*TradingPairMutation) OldSymbol

func (m *TradingPairMutation) OldSymbol(ctx context.Context) (v string, err error)

OldSymbol returns the old "symbol" field's value of the TradingPair entity. If the TradingPair 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 (*TradingPairMutation) Op

func (m *TradingPairMutation) Op() Op

Op returns the operation name.

func (*TradingPairMutation) QueryContext

func (c *TradingPairMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairMutation) RemoveMarketIDs

func (m *TradingPairMutation) RemoveMarketIDs(ids ...int)

RemoveMarketIDs removes the "market" edge to the Market entity by IDs.

func (*TradingPairMutation) RemovedEdges

func (m *TradingPairMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TradingPairMutation) RemovedIDs

func (m *TradingPairMutation) 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 (*TradingPairMutation) RemovedMarketIDs

func (m *TradingPairMutation) RemovedMarketIDs() (ids []int)

RemovedMarket returns the removed IDs of the "market" edge to the Market entity.

func (*TradingPairMutation) ResetBase

func (m *TradingPairMutation) ResetBase()

ResetBase resets all changes to the "base" edge.

func (*TradingPairMutation) ResetBasePriceMaxPrecision

func (m *TradingPairMutation) ResetBasePriceMaxPrecision()

ResetBasePriceMaxPrecision resets all changes to the "base_price_max_precision" field.

func (*TradingPairMutation) ResetBasePriceMinPrecision

func (m *TradingPairMutation) ResetBasePriceMinPrecision()

ResetBasePriceMinPrecision resets all changes to the "base_price_min_precision" field.

func (*TradingPairMutation) ResetBaseQuantityMaxPrecision

func (m *TradingPairMutation) ResetBaseQuantityMaxPrecision()

ResetBaseQuantityMaxPrecision resets all changes to the "base_quantity_max_precision" field.

func (*TradingPairMutation) ResetBaseQuantityMinPrecision

func (m *TradingPairMutation) ResetBaseQuantityMinPrecision()

ResetBaseQuantityMinPrecision resets all changes to the "base_quantity_min_precision" field.

func (*TradingPairMutation) ResetCounter

func (m *TradingPairMutation) ResetCounter()

ResetCounter resets all changes to the "counter" edge.

func (*TradingPairMutation) ResetCounterPriceMaxPrecision

func (m *TradingPairMutation) ResetCounterPriceMaxPrecision()

ResetCounterPriceMaxPrecision resets all changes to the "counter_price_max_precision" field.

func (*TradingPairMutation) ResetCounterPriceMinPrecision

func (m *TradingPairMutation) ResetCounterPriceMinPrecision()

ResetCounterPriceMinPrecision resets all changes to the "counter_price_min_precision" field.

func (*TradingPairMutation) ResetCounterQuantityMaxPrecision

func (m *TradingPairMutation) ResetCounterQuantityMaxPrecision()

ResetCounterQuantityMaxPrecision resets all changes to the "counter_quantity_max_precision" field.

func (*TradingPairMutation) ResetCounterQuantityMinPrecision

func (m *TradingPairMutation) ResetCounterQuantityMinPrecision()

ResetCounterQuantityMinPrecision resets all changes to the "counter_quantity_min_precision" field.

func (*TradingPairMutation) ResetEdge

func (m *TradingPairMutation) 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 (*TradingPairMutation) ResetField

func (m *TradingPairMutation) 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 (*TradingPairMutation) ResetMarket

func (m *TradingPairMutation) ResetMarket()

ResetMarket resets all changes to the "market" edge.

func (*TradingPairMutation) ResetSymbol

func (m *TradingPairMutation) ResetSymbol()

ResetSymbol resets all changes to the "symbol" field.

func (*TradingPairMutation) ResetVenue

func (m *TradingPairMutation) ResetVenue()

ResetVenue resets all changes to the "venue" edge.

func (*TradingPairMutation) SetBaseID

func (m *TradingPairMutation) SetBaseID(id int)

SetBaseID sets the "base" edge to the Currency entity by id.

func (*TradingPairMutation) SetBasePriceMaxPrecision

func (m *TradingPairMutation) SetBasePriceMaxPrecision(i int)

SetBasePriceMaxPrecision sets the "base_price_max_precision" field.

func (*TradingPairMutation) SetBasePriceMinPrecision

func (m *TradingPairMutation) SetBasePriceMinPrecision(i int)

SetBasePriceMinPrecision sets the "base_price_min_precision" field.

func (*TradingPairMutation) SetBaseQuantityMaxPrecision

func (m *TradingPairMutation) SetBaseQuantityMaxPrecision(i int)

SetBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field.

func (*TradingPairMutation) SetBaseQuantityMinPrecision

func (m *TradingPairMutation) SetBaseQuantityMinPrecision(i int)

SetBaseQuantityMinPrecision sets the "base_quantity_min_precision" field.

func (*TradingPairMutation) SetCounterID

func (m *TradingPairMutation) SetCounterID(id int)

SetCounterID sets the "counter" edge to the Currency entity by id.

func (*TradingPairMutation) SetCounterPriceMaxPrecision

func (m *TradingPairMutation) SetCounterPriceMaxPrecision(i int)

SetCounterPriceMaxPrecision sets the "counter_price_max_precision" field.

func (*TradingPairMutation) SetCounterPriceMinPrecision

func (m *TradingPairMutation) SetCounterPriceMinPrecision(i int)

SetCounterPriceMinPrecision sets the "counter_price_min_precision" field.

func (*TradingPairMutation) SetCounterQuantityMaxPrecision

func (m *TradingPairMutation) SetCounterQuantityMaxPrecision(i int)

SetCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field.

func (*TradingPairMutation) SetCounterQuantityMinPrecision

func (m *TradingPairMutation) SetCounterQuantityMinPrecision(i int)

SetCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field.

func (*TradingPairMutation) SetField

func (m *TradingPairMutation) 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 (*TradingPairMutation) SetOp

func (m *TradingPairMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TradingPairMutation) SetSymbol

func (m *TradingPairMutation) SetSymbol(s string)

SetSymbol sets the "symbol" field.

func (*TradingPairMutation) SetVenueID

func (m *TradingPairMutation) SetVenueID(id int)

SetVenueID sets the "venue" edge to the Venue entity by id.

func (*TradingPairMutation) Symbol

func (m *TradingPairMutation) Symbol() (r string, exists bool)

Symbol returns the value of the "symbol" field in the mutation.

func (TradingPairMutation) Tx

func (m TradingPairMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TradingPairMutation) Type

func (m *TradingPairMutation) Type() string

Type returns the node type of this mutation (TradingPair).

func (*TradingPairMutation) VenueCleared

func (m *TradingPairMutation) VenueCleared() bool

VenueCleared reports if the "venue" edge to the Venue entity was cleared.

func (*TradingPairMutation) VenueID

func (m *TradingPairMutation) VenueID() (id int, exists bool)

VenueID returns the "venue" edge ID in the mutation.

func (*TradingPairMutation) VenueIDs

func (m *TradingPairMutation) VenueIDs() (ids []int)

VenueIDs returns the "venue" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VenueID instead. It exists only for internal usage by the builders.

func (*TradingPairMutation) Where

func (m *TradingPairMutation) Where(ps ...predicate.TradingPair)

Where appends a list predicates to the TradingPairMutation builder.

func (*TradingPairMutation) WhereP

func (m *TradingPairMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TradingPairMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TradingPairOrder

type TradingPairOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *TradingPairOrderField `json:"field"`
}

TradingPairOrder defines the ordering of TradingPair.

type TradingPairOrderField

type TradingPairOrderField struct {
	// contains filtered or unexported fields
}

TradingPairOrderField defines the ordering field of TradingPair.

func (TradingPairOrderField) MarshalGQL

func (f TradingPairOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (TradingPairOrderField) String

func (f TradingPairOrderField) String() string

String implement fmt.Stringer interface.

func (*TradingPairOrderField) UnmarshalGQL

func (f *TradingPairOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type TradingPairPaginateOption

type TradingPairPaginateOption func(*tradingpairPager) error

TradingPairPaginateOption enables pagination customization.

func WithTradingPairFilter

func WithTradingPairFilter(filter func(*TradingPairQuery) (*TradingPairQuery, error)) TradingPairPaginateOption

WithTradingPairFilter configures pagination filter.

func WithTradingPairOrder

func WithTradingPairOrder(order *TradingPairOrder) TradingPairPaginateOption

WithTradingPairOrder configures pagination ordering.

type TradingPairQuery

type TradingPairQuery struct {
	// contains filtered or unexported fields
}

TradingPairQuery is the builder for querying TradingPair entities.

func (*TradingPairQuery) Aggregate

func (tpq *TradingPairQuery) Aggregate(fns ...AggregateFunc) *TradingPairSelect

Aggregate returns a TradingPairSelect configured with the given aggregations.

func (*TradingPairQuery) All

func (tpq *TradingPairQuery) All(ctx context.Context) ([]*TradingPair, error)

All executes the query and returns a list of TradingPairs.

func (*TradingPairQuery) AllX

func (tpq *TradingPairQuery) AllX(ctx context.Context) []*TradingPair

AllX is like All, but panics if an error occurs.

func (*TradingPairQuery) Clone

func (tpq *TradingPairQuery) Clone() *TradingPairQuery

Clone returns a duplicate of the TradingPairQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TradingPairQuery) CollectFields

func (tp *TradingPairQuery) CollectFields(ctx context.Context, satisfies ...string) (*TradingPairQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*TradingPairQuery) Count

func (tpq *TradingPairQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TradingPairQuery) CountX

func (tpq *TradingPairQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TradingPairQuery) ExecContext

func (c *TradingPairQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairQuery) Exist

func (tpq *TradingPairQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TradingPairQuery) ExistX

func (tpq *TradingPairQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TradingPairQuery) Filter

func (tpq *TradingPairQuery) Filter() *TradingPairFilter

Filter returns a Filter implementation to apply filters on the TradingPairQuery builder.

func (*TradingPairQuery) First

func (tpq *TradingPairQuery) First(ctx context.Context) (*TradingPair, error)

First returns the first TradingPair entity from the query. Returns a *NotFoundError when no TradingPair was found.

func (*TradingPairQuery) FirstID

func (tpq *TradingPairQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first TradingPair ID from the query. Returns a *NotFoundError when no TradingPair ID was found.

func (*TradingPairQuery) FirstIDX

func (tpq *TradingPairQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*TradingPairQuery) FirstX

func (tpq *TradingPairQuery) FirstX(ctx context.Context) *TradingPair

FirstX is like First, but panics if an error occurs.

func (*TradingPairQuery) ForShare

func (tpq *TradingPairQuery) ForShare(opts ...sql.LockOption) *TradingPairQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*TradingPairQuery) ForUpdate

func (tpq *TradingPairQuery) ForUpdate(opts ...sql.LockOption) *TradingPairQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*TradingPairQuery) GroupBy

func (tpq *TradingPairQuery) GroupBy(field string, fields ...string) *TradingPairGroupBy

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 {
	Symbol string `json:"symbol,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TradingPair.Query().
	GroupBy(tradingpair.FieldSymbol).
	Aggregate(entities.Count()).
	Scan(ctx, &v)

func (*TradingPairQuery) IDs

func (tpq *TradingPairQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of TradingPair IDs.

func (*TradingPairQuery) IDsX

func (tpq *TradingPairQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*TradingPairQuery) Limit

func (tpq *TradingPairQuery) Limit(limit int) *TradingPairQuery

Limit the number of records to be returned by this query.

func (*TradingPairQuery) Modify

func (tpq *TradingPairQuery) Modify(modifiers ...func(s *sql.Selector)) *TradingPairSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TradingPairQuery) Offset

func (tpq *TradingPairQuery) Offset(offset int) *TradingPairQuery

Offset to start from.

func (*TradingPairQuery) Only

func (tpq *TradingPairQuery) Only(ctx context.Context) (*TradingPair, error)

Only returns a single TradingPair entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TradingPair entity is found. Returns a *NotFoundError when no TradingPair entities are found.

func (*TradingPairQuery) OnlyID

func (tpq *TradingPairQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only TradingPair ID in the query. Returns a *NotSingularError when more than one TradingPair ID is found. Returns a *NotFoundError when no entities are found.

func (*TradingPairQuery) OnlyIDX

func (tpq *TradingPairQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TradingPairQuery) OnlyX

func (tpq *TradingPairQuery) OnlyX(ctx context.Context) *TradingPair

OnlyX is like Only, but panics if an error occurs.

func (*TradingPairQuery) Order

func (tpq *TradingPairQuery) Order(o ...OrderFunc) *TradingPairQuery

Order specifies how the records should be ordered.

func (*TradingPairQuery) Paginate

func (tp *TradingPairQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...TradingPairPaginateOption,
) (*TradingPairConnection, error)

Paginate executes the query and returns a relay based cursor connection to TradingPair.

func (*TradingPairQuery) QueryBase

func (tpq *TradingPairQuery) QueryBase() *CurrencyQuery

QueryBase chains the current query on the "base" edge.

func (*TradingPairQuery) QueryContext

func (c *TradingPairQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairQuery) QueryCounter

func (tpq *TradingPairQuery) QueryCounter() *CurrencyQuery

QueryCounter chains the current query on the "counter" edge.

func (*TradingPairQuery) QueryMarket

func (tpq *TradingPairQuery) QueryMarket() *MarketQuery

QueryMarket chains the current query on the "market" edge.

func (*TradingPairQuery) QueryVenue

func (tpq *TradingPairQuery) QueryVenue() *VenueQuery

QueryVenue chains the current query on the "venue" edge.

func (*TradingPairQuery) Select

func (tpq *TradingPairQuery) Select(fields ...string) *TradingPairSelect

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 {
	Symbol string `json:"symbol,omitempty"`
}

client.TradingPair.Query().
	Select(tradingpair.FieldSymbol).
	Scan(ctx, &v)

func (*TradingPairQuery) Unique

func (tpq *TradingPairQuery) Unique(unique bool) *TradingPairQuery

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 (*TradingPairQuery) Where

Where adds a new predicate for the TradingPairQuery builder.

func (*TradingPairQuery) WithBase

func (tpq *TradingPairQuery) WithBase(opts ...func(*CurrencyQuery)) *TradingPairQuery

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 (*TradingPairQuery) WithCounter

func (tpq *TradingPairQuery) WithCounter(opts ...func(*CurrencyQuery)) *TradingPairQuery

WithCounter tells the query-builder to eager-load the nodes that are connected to the "counter" edge. The optional arguments are used to configure the query builder of the edge.

func (*TradingPairQuery) WithMarket

func (tpq *TradingPairQuery) WithMarket(opts ...func(*MarketQuery)) *TradingPairQuery

WithMarket tells the query-builder to eager-load the nodes that are connected to the "market" edge. The optional arguments are used to configure the query builder of the edge.

func (*TradingPairQuery) WithNamedMarket

func (tpq *TradingPairQuery) WithNamedMarket(name string, opts ...func(*MarketQuery)) *TradingPairQuery

WithNamedMarket tells the query-builder to eager-load the nodes that are connected to the "market" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*TradingPairQuery) WithVenue

func (tpq *TradingPairQuery) WithVenue(opts ...func(*VenueQuery)) *TradingPairQuery

WithVenue tells the query-builder to eager-load the nodes that are connected to the "venue" edge. The optional arguments are used to configure the query builder of the edge.

type TradingPairSelect

type TradingPairSelect struct {
	*TradingPairQuery
	// contains filtered or unexported fields
}

TradingPairSelect is the builder for selecting fields of TradingPair entities.

func (*TradingPairSelect) Aggregate

func (tps *TradingPairSelect) Aggregate(fns ...AggregateFunc) *TradingPairSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TradingPairSelect) Bool

func (s *TradingPairSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TradingPairSelect) BoolX

func (s *TradingPairSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TradingPairSelect) Bools

func (s *TradingPairSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TradingPairSelect) BoolsX

func (s *TradingPairSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (TradingPairSelect) ExecContext

func (c TradingPairSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairSelect) Float64

func (s *TradingPairSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TradingPairSelect) Float64X

func (s *TradingPairSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TradingPairSelect) Float64s

func (s *TradingPairSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TradingPairSelect) Float64sX

func (s *TradingPairSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TradingPairSelect) Int

func (s *TradingPairSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TradingPairSelect) IntX

func (s *TradingPairSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TradingPairSelect) Ints

func (s *TradingPairSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TradingPairSelect) IntsX

func (s *TradingPairSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TradingPairSelect) Modify

func (tps *TradingPairSelect) Modify(modifiers ...func(s *sql.Selector)) *TradingPairSelect

Modify adds a query modifier for attaching custom logic to queries.

func (TradingPairSelect) QueryContext

func (c TradingPairSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairSelect) Scan

func (tps *TradingPairSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TradingPairSelect) ScanX

func (s *TradingPairSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TradingPairSelect) String

func (s *TradingPairSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TradingPairSelect) StringX

func (s *TradingPairSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TradingPairSelect) Strings

func (s *TradingPairSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TradingPairSelect) StringsX

func (s *TradingPairSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TradingPairUpdate

type TradingPairUpdate struct {
	// contains filtered or unexported fields
}

TradingPairUpdate is the builder for updating TradingPair entities.

func (*TradingPairUpdate) AddBasePriceMaxPrecision

func (tpu *TradingPairUpdate) AddBasePriceMaxPrecision(i int) *TradingPairUpdate

AddBasePriceMaxPrecision adds i to the "base_price_max_precision" field.

func (*TradingPairUpdate) AddBasePriceMinPrecision

func (tpu *TradingPairUpdate) AddBasePriceMinPrecision(i int) *TradingPairUpdate

AddBasePriceMinPrecision adds i to the "base_price_min_precision" field.

func (*TradingPairUpdate) AddBaseQuantityMaxPrecision

func (tpu *TradingPairUpdate) AddBaseQuantityMaxPrecision(i int) *TradingPairUpdate

AddBaseQuantityMaxPrecision adds i to the "base_quantity_max_precision" field.

func (*TradingPairUpdate) AddBaseQuantityMinPrecision

func (tpu *TradingPairUpdate) AddBaseQuantityMinPrecision(i int) *TradingPairUpdate

AddBaseQuantityMinPrecision adds i to the "base_quantity_min_precision" field.

func (*TradingPairUpdate) AddCounterPriceMaxPrecision

func (tpu *TradingPairUpdate) AddCounterPriceMaxPrecision(i int) *TradingPairUpdate

AddCounterPriceMaxPrecision adds i to the "counter_price_max_precision" field.

func (*TradingPairUpdate) AddCounterPriceMinPrecision

func (tpu *TradingPairUpdate) AddCounterPriceMinPrecision(i int) *TradingPairUpdate

AddCounterPriceMinPrecision adds i to the "counter_price_min_precision" field.

func (*TradingPairUpdate) AddCounterQuantityMaxPrecision

func (tpu *TradingPairUpdate) AddCounterQuantityMaxPrecision(i int) *TradingPairUpdate

AddCounterQuantityMaxPrecision adds i to the "counter_quantity_max_precision" field.

func (*TradingPairUpdate) AddCounterQuantityMinPrecision

func (tpu *TradingPairUpdate) AddCounterQuantityMinPrecision(i int) *TradingPairUpdate

AddCounterQuantityMinPrecision adds i to the "counter_quantity_min_precision" field.

func (*TradingPairUpdate) AddMarket

func (tpu *TradingPairUpdate) AddMarket(m ...*Market) *TradingPairUpdate

AddMarket adds the "market" edges to the Market entity.

func (*TradingPairUpdate) AddMarketIDs

func (tpu *TradingPairUpdate) AddMarketIDs(ids ...int) *TradingPairUpdate

AddMarketIDs adds the "market" edge to the Market entity by IDs.

func (*TradingPairUpdate) ClearBase

func (tpu *TradingPairUpdate) ClearBase() *TradingPairUpdate

ClearBase clears the "base" edge to the Currency entity.

func (*TradingPairUpdate) ClearBasePriceMaxPrecision

func (tpu *TradingPairUpdate) ClearBasePriceMaxPrecision() *TradingPairUpdate

ClearBasePriceMaxPrecision clears the value of the "base_price_max_precision" field.

func (*TradingPairUpdate) ClearBasePriceMinPrecision

func (tpu *TradingPairUpdate) ClearBasePriceMinPrecision() *TradingPairUpdate

ClearBasePriceMinPrecision clears the value of the "base_price_min_precision" field.

func (*TradingPairUpdate) ClearBaseQuantityMaxPrecision

func (tpu *TradingPairUpdate) ClearBaseQuantityMaxPrecision() *TradingPairUpdate

ClearBaseQuantityMaxPrecision clears the value of the "base_quantity_max_precision" field.

func (*TradingPairUpdate) ClearBaseQuantityMinPrecision

func (tpu *TradingPairUpdate) ClearBaseQuantityMinPrecision() *TradingPairUpdate

ClearBaseQuantityMinPrecision clears the value of the "base_quantity_min_precision" field.

func (*TradingPairUpdate) ClearCounter

func (tpu *TradingPairUpdate) ClearCounter() *TradingPairUpdate

ClearCounter clears the "counter" edge to the Currency entity.

func (*TradingPairUpdate) ClearCounterPriceMaxPrecision

func (tpu *TradingPairUpdate) ClearCounterPriceMaxPrecision() *TradingPairUpdate

ClearCounterPriceMaxPrecision clears the value of the "counter_price_max_precision" field.

func (*TradingPairUpdate) ClearCounterPriceMinPrecision

func (tpu *TradingPairUpdate) ClearCounterPriceMinPrecision() *TradingPairUpdate

ClearCounterPriceMinPrecision clears the value of the "counter_price_min_precision" field.

func (*TradingPairUpdate) ClearCounterQuantityMaxPrecision

func (tpu *TradingPairUpdate) ClearCounterQuantityMaxPrecision() *TradingPairUpdate

ClearCounterQuantityMaxPrecision clears the value of the "counter_quantity_max_precision" field.

func (*TradingPairUpdate) ClearCounterQuantityMinPrecision

func (tpu *TradingPairUpdate) ClearCounterQuantityMinPrecision() *TradingPairUpdate

ClearCounterQuantityMinPrecision clears the value of the "counter_quantity_min_precision" field.

func (*TradingPairUpdate) ClearMarket

func (tpu *TradingPairUpdate) ClearMarket() *TradingPairUpdate

ClearMarket clears all "market" edges to the Market entity.

func (*TradingPairUpdate) ClearVenue

func (tpu *TradingPairUpdate) ClearVenue() *TradingPairUpdate

ClearVenue clears the "venue" edge to the Venue entity.

func (*TradingPairUpdate) Exec

func (tpu *TradingPairUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TradingPairUpdate) ExecContext

func (c *TradingPairUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairUpdate) ExecX

func (tpu *TradingPairUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TradingPairUpdate) Modify

func (tpu *TradingPairUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TradingPairUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TradingPairUpdate) Mutation

func (tpu *TradingPairUpdate) Mutation() *TradingPairMutation

Mutation returns the TradingPairMutation object of the builder.

func (*TradingPairUpdate) QueryContext

func (c *TradingPairUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairUpdate) RemoveMarket

func (tpu *TradingPairUpdate) RemoveMarket(m ...*Market) *TradingPairUpdate

RemoveMarket removes "market" edges to Market entities.

func (*TradingPairUpdate) RemoveMarketIDs

func (tpu *TradingPairUpdate) RemoveMarketIDs(ids ...int) *TradingPairUpdate

RemoveMarketIDs removes the "market" edge to Market entities by IDs.

func (*TradingPairUpdate) Save

func (tpu *TradingPairUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TradingPairUpdate) SaveX

func (tpu *TradingPairUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TradingPairUpdate) SetBase

func (tpu *TradingPairUpdate) SetBase(c *Currency) *TradingPairUpdate

SetBase sets the "base" edge to the Currency entity.

func (*TradingPairUpdate) SetBaseID

func (tpu *TradingPairUpdate) SetBaseID(id int) *TradingPairUpdate

SetBaseID sets the "base" edge to the Currency entity by ID.

func (*TradingPairUpdate) SetBasePriceMaxPrecision

func (tpu *TradingPairUpdate) SetBasePriceMaxPrecision(i int) *TradingPairUpdate

SetBasePriceMaxPrecision sets the "base_price_max_precision" field.

func (*TradingPairUpdate) SetBasePriceMinPrecision

func (tpu *TradingPairUpdate) SetBasePriceMinPrecision(i int) *TradingPairUpdate

SetBasePriceMinPrecision sets the "base_price_min_precision" field.

func (*TradingPairUpdate) SetBaseQuantityMaxPrecision

func (tpu *TradingPairUpdate) SetBaseQuantityMaxPrecision(i int) *TradingPairUpdate

SetBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field.

func (*TradingPairUpdate) SetBaseQuantityMinPrecision

func (tpu *TradingPairUpdate) SetBaseQuantityMinPrecision(i int) *TradingPairUpdate

SetBaseQuantityMinPrecision sets the "base_quantity_min_precision" field.

func (*TradingPairUpdate) SetCounter

func (tpu *TradingPairUpdate) SetCounter(c *Currency) *TradingPairUpdate

SetCounter sets the "counter" edge to the Currency entity.

func (*TradingPairUpdate) SetCounterID

func (tpu *TradingPairUpdate) SetCounterID(id int) *TradingPairUpdate

SetCounterID sets the "counter" edge to the Currency entity by ID.

func (*TradingPairUpdate) SetCounterPriceMaxPrecision

func (tpu *TradingPairUpdate) SetCounterPriceMaxPrecision(i int) *TradingPairUpdate

SetCounterPriceMaxPrecision sets the "counter_price_max_precision" field.

func (*TradingPairUpdate) SetCounterPriceMinPrecision

func (tpu *TradingPairUpdate) SetCounterPriceMinPrecision(i int) *TradingPairUpdate

SetCounterPriceMinPrecision sets the "counter_price_min_precision" field.

func (*TradingPairUpdate) SetCounterQuantityMaxPrecision

func (tpu *TradingPairUpdate) SetCounterQuantityMaxPrecision(i int) *TradingPairUpdate

SetCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field.

func (*TradingPairUpdate) SetCounterQuantityMinPrecision

func (tpu *TradingPairUpdate) SetCounterQuantityMinPrecision(i int) *TradingPairUpdate

SetCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field.

func (*TradingPairUpdate) SetNillableBasePriceMaxPrecision

func (tpu *TradingPairUpdate) SetNillableBasePriceMaxPrecision(i *int) *TradingPairUpdate

SetNillableBasePriceMaxPrecision sets the "base_price_max_precision" field if the given value is not nil.

func (*TradingPairUpdate) SetNillableBasePriceMinPrecision

func (tpu *TradingPairUpdate) SetNillableBasePriceMinPrecision(i *int) *TradingPairUpdate

SetNillableBasePriceMinPrecision sets the "base_price_min_precision" field if the given value is not nil.

func (*TradingPairUpdate) SetNillableBaseQuantityMaxPrecision

func (tpu *TradingPairUpdate) SetNillableBaseQuantityMaxPrecision(i *int) *TradingPairUpdate

SetNillableBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field if the given value is not nil.

func (*TradingPairUpdate) SetNillableBaseQuantityMinPrecision

func (tpu *TradingPairUpdate) SetNillableBaseQuantityMinPrecision(i *int) *TradingPairUpdate

SetNillableBaseQuantityMinPrecision sets the "base_quantity_min_precision" field if the given value is not nil.

func (*TradingPairUpdate) SetNillableCounterPriceMaxPrecision

func (tpu *TradingPairUpdate) SetNillableCounterPriceMaxPrecision(i *int) *TradingPairUpdate

SetNillableCounterPriceMaxPrecision sets the "counter_price_max_precision" field if the given value is not nil.

func (*TradingPairUpdate) SetNillableCounterPriceMinPrecision

func (tpu *TradingPairUpdate) SetNillableCounterPriceMinPrecision(i *int) *TradingPairUpdate

SetNillableCounterPriceMinPrecision sets the "counter_price_min_precision" field if the given value is not nil.

func (*TradingPairUpdate) SetNillableCounterQuantityMaxPrecision

func (tpu *TradingPairUpdate) SetNillableCounterQuantityMaxPrecision(i *int) *TradingPairUpdate

SetNillableCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field if the given value is not nil.

func (*TradingPairUpdate) SetNillableCounterQuantityMinPrecision

func (tpu *TradingPairUpdate) SetNillableCounterQuantityMinPrecision(i *int) *TradingPairUpdate

SetNillableCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field if the given value is not nil.

func (*TradingPairUpdate) SetSymbol

func (tpu *TradingPairUpdate) SetSymbol(s string) *TradingPairUpdate

SetSymbol sets the "symbol" field.

func (*TradingPairUpdate) SetVenue

func (tpu *TradingPairUpdate) SetVenue(v *Venue) *TradingPairUpdate

SetVenue sets the "venue" edge to the Venue entity.

func (*TradingPairUpdate) SetVenueID

func (tpu *TradingPairUpdate) SetVenueID(id int) *TradingPairUpdate

SetVenueID sets the "venue" edge to the Venue entity by ID.

func (*TradingPairUpdate) Where

Where appends a list predicates to the TradingPairUpdate builder.

type TradingPairUpdateOne

type TradingPairUpdateOne struct {
	// contains filtered or unexported fields
}

TradingPairUpdateOne is the builder for updating a single TradingPair entity.

func (*TradingPairUpdateOne) AddBasePriceMaxPrecision

func (tpuo *TradingPairUpdateOne) AddBasePriceMaxPrecision(i int) *TradingPairUpdateOne

AddBasePriceMaxPrecision adds i to the "base_price_max_precision" field.

func (*TradingPairUpdateOne) AddBasePriceMinPrecision

func (tpuo *TradingPairUpdateOne) AddBasePriceMinPrecision(i int) *TradingPairUpdateOne

AddBasePriceMinPrecision adds i to the "base_price_min_precision" field.

func (*TradingPairUpdateOne) AddBaseQuantityMaxPrecision

func (tpuo *TradingPairUpdateOne) AddBaseQuantityMaxPrecision(i int) *TradingPairUpdateOne

AddBaseQuantityMaxPrecision adds i to the "base_quantity_max_precision" field.

func (*TradingPairUpdateOne) AddBaseQuantityMinPrecision

func (tpuo *TradingPairUpdateOne) AddBaseQuantityMinPrecision(i int) *TradingPairUpdateOne

AddBaseQuantityMinPrecision adds i to the "base_quantity_min_precision" field.

func (*TradingPairUpdateOne) AddCounterPriceMaxPrecision

func (tpuo *TradingPairUpdateOne) AddCounterPriceMaxPrecision(i int) *TradingPairUpdateOne

AddCounterPriceMaxPrecision adds i to the "counter_price_max_precision" field.

func (*TradingPairUpdateOne) AddCounterPriceMinPrecision

func (tpuo *TradingPairUpdateOne) AddCounterPriceMinPrecision(i int) *TradingPairUpdateOne

AddCounterPriceMinPrecision adds i to the "counter_price_min_precision" field.

func (*TradingPairUpdateOne) AddCounterQuantityMaxPrecision

func (tpuo *TradingPairUpdateOne) AddCounterQuantityMaxPrecision(i int) *TradingPairUpdateOne

AddCounterQuantityMaxPrecision adds i to the "counter_quantity_max_precision" field.

func (*TradingPairUpdateOne) AddCounterQuantityMinPrecision

func (tpuo *TradingPairUpdateOne) AddCounterQuantityMinPrecision(i int) *TradingPairUpdateOne

AddCounterQuantityMinPrecision adds i to the "counter_quantity_min_precision" field.

func (*TradingPairUpdateOne) AddMarket

func (tpuo *TradingPairUpdateOne) AddMarket(m ...*Market) *TradingPairUpdateOne

AddMarket adds the "market" edges to the Market entity.

func (*TradingPairUpdateOne) AddMarketIDs

func (tpuo *TradingPairUpdateOne) AddMarketIDs(ids ...int) *TradingPairUpdateOne

AddMarketIDs adds the "market" edge to the Market entity by IDs.

func (*TradingPairUpdateOne) ClearBase

func (tpuo *TradingPairUpdateOne) ClearBase() *TradingPairUpdateOne

ClearBase clears the "base" edge to the Currency entity.

func (*TradingPairUpdateOne) ClearBasePriceMaxPrecision

func (tpuo *TradingPairUpdateOne) ClearBasePriceMaxPrecision() *TradingPairUpdateOne

ClearBasePriceMaxPrecision clears the value of the "base_price_max_precision" field.

func (*TradingPairUpdateOne) ClearBasePriceMinPrecision

func (tpuo *TradingPairUpdateOne) ClearBasePriceMinPrecision() *TradingPairUpdateOne

ClearBasePriceMinPrecision clears the value of the "base_price_min_precision" field.

func (*TradingPairUpdateOne) ClearBaseQuantityMaxPrecision

func (tpuo *TradingPairUpdateOne) ClearBaseQuantityMaxPrecision() *TradingPairUpdateOne

ClearBaseQuantityMaxPrecision clears the value of the "base_quantity_max_precision" field.

func (*TradingPairUpdateOne) ClearBaseQuantityMinPrecision

func (tpuo *TradingPairUpdateOne) ClearBaseQuantityMinPrecision() *TradingPairUpdateOne

ClearBaseQuantityMinPrecision clears the value of the "base_quantity_min_precision" field.

func (*TradingPairUpdateOne) ClearCounter

func (tpuo *TradingPairUpdateOne) ClearCounter() *TradingPairUpdateOne

ClearCounter clears the "counter" edge to the Currency entity.

func (*TradingPairUpdateOne) ClearCounterPriceMaxPrecision

func (tpuo *TradingPairUpdateOne) ClearCounterPriceMaxPrecision() *TradingPairUpdateOne

ClearCounterPriceMaxPrecision clears the value of the "counter_price_max_precision" field.

func (*TradingPairUpdateOne) ClearCounterPriceMinPrecision

func (tpuo *TradingPairUpdateOne) ClearCounterPriceMinPrecision() *TradingPairUpdateOne

ClearCounterPriceMinPrecision clears the value of the "counter_price_min_precision" field.

func (*TradingPairUpdateOne) ClearCounterQuantityMaxPrecision

func (tpuo *TradingPairUpdateOne) ClearCounterQuantityMaxPrecision() *TradingPairUpdateOne

ClearCounterQuantityMaxPrecision clears the value of the "counter_quantity_max_precision" field.

func (*TradingPairUpdateOne) ClearCounterQuantityMinPrecision

func (tpuo *TradingPairUpdateOne) ClearCounterQuantityMinPrecision() *TradingPairUpdateOne

ClearCounterQuantityMinPrecision clears the value of the "counter_quantity_min_precision" field.

func (*TradingPairUpdateOne) ClearMarket

func (tpuo *TradingPairUpdateOne) ClearMarket() *TradingPairUpdateOne

ClearMarket clears all "market" edges to the Market entity.

func (*TradingPairUpdateOne) ClearVenue

func (tpuo *TradingPairUpdateOne) ClearVenue() *TradingPairUpdateOne

ClearVenue clears the "venue" edge to the Venue entity.

func (*TradingPairUpdateOne) Exec

func (tpuo *TradingPairUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TradingPairUpdateOne) ExecContext

func (c *TradingPairUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TradingPairUpdateOne) ExecX

func (tpuo *TradingPairUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TradingPairUpdateOne) Modify

func (tpuo *TradingPairUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TradingPairUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TradingPairUpdateOne) Mutation

func (tpuo *TradingPairUpdateOne) Mutation() *TradingPairMutation

Mutation returns the TradingPairMutation object of the builder.

func (*TradingPairUpdateOne) QueryContext

func (c *TradingPairUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TradingPairUpdateOne) RemoveMarket

func (tpuo *TradingPairUpdateOne) RemoveMarket(m ...*Market) *TradingPairUpdateOne

RemoveMarket removes "market" edges to Market entities.

func (*TradingPairUpdateOne) RemoveMarketIDs

func (tpuo *TradingPairUpdateOne) RemoveMarketIDs(ids ...int) *TradingPairUpdateOne

RemoveMarketIDs removes the "market" edge to Market entities by IDs.

func (*TradingPairUpdateOne) Save

Save executes the query and returns the updated TradingPair entity.

func (*TradingPairUpdateOne) SaveX

func (tpuo *TradingPairUpdateOne) SaveX(ctx context.Context) *TradingPair

SaveX is like Save, but panics if an error occurs.

func (*TradingPairUpdateOne) Select

func (tpuo *TradingPairUpdateOne) Select(field string, fields ...string) *TradingPairUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TradingPairUpdateOne) SetBase

SetBase sets the "base" edge to the Currency entity.

func (*TradingPairUpdateOne) SetBaseID

func (tpuo *TradingPairUpdateOne) SetBaseID(id int) *TradingPairUpdateOne

SetBaseID sets the "base" edge to the Currency entity by ID.

func (*TradingPairUpdateOne) SetBasePriceMaxPrecision

func (tpuo *TradingPairUpdateOne) SetBasePriceMaxPrecision(i int) *TradingPairUpdateOne

SetBasePriceMaxPrecision sets the "base_price_max_precision" field.

func (*TradingPairUpdateOne) SetBasePriceMinPrecision

func (tpuo *TradingPairUpdateOne) SetBasePriceMinPrecision(i int) *TradingPairUpdateOne

SetBasePriceMinPrecision sets the "base_price_min_precision" field.

func (*TradingPairUpdateOne) SetBaseQuantityMaxPrecision

func (tpuo *TradingPairUpdateOne) SetBaseQuantityMaxPrecision(i int) *TradingPairUpdateOne

SetBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field.

func (*TradingPairUpdateOne) SetBaseQuantityMinPrecision

func (tpuo *TradingPairUpdateOne) SetBaseQuantityMinPrecision(i int) *TradingPairUpdateOne

SetBaseQuantityMinPrecision sets the "base_quantity_min_precision" field.

func (*TradingPairUpdateOne) SetCounter

func (tpuo *TradingPairUpdateOne) SetCounter(c *Currency) *TradingPairUpdateOne

SetCounter sets the "counter" edge to the Currency entity.

func (*TradingPairUpdateOne) SetCounterID

func (tpuo *TradingPairUpdateOne) SetCounterID(id int) *TradingPairUpdateOne

SetCounterID sets the "counter" edge to the Currency entity by ID.

func (*TradingPairUpdateOne) SetCounterPriceMaxPrecision

func (tpuo *TradingPairUpdateOne) SetCounterPriceMaxPrecision(i int) *TradingPairUpdateOne

SetCounterPriceMaxPrecision sets the "counter_price_max_precision" field.

func (*TradingPairUpdateOne) SetCounterPriceMinPrecision

func (tpuo *TradingPairUpdateOne) SetCounterPriceMinPrecision(i int) *TradingPairUpdateOne

SetCounterPriceMinPrecision sets the "counter_price_min_precision" field.

func (*TradingPairUpdateOne) SetCounterQuantityMaxPrecision

func (tpuo *TradingPairUpdateOne) SetCounterQuantityMaxPrecision(i int) *TradingPairUpdateOne

SetCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field.

func (*TradingPairUpdateOne) SetCounterQuantityMinPrecision

func (tpuo *TradingPairUpdateOne) SetCounterQuantityMinPrecision(i int) *TradingPairUpdateOne

SetCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field.

func (*TradingPairUpdateOne) SetNillableBasePriceMaxPrecision

func (tpuo *TradingPairUpdateOne) SetNillableBasePriceMaxPrecision(i *int) *TradingPairUpdateOne

SetNillableBasePriceMaxPrecision sets the "base_price_max_precision" field if the given value is not nil.

func (*TradingPairUpdateOne) SetNillableBasePriceMinPrecision

func (tpuo *TradingPairUpdateOne) SetNillableBasePriceMinPrecision(i *int) *TradingPairUpdateOne

SetNillableBasePriceMinPrecision sets the "base_price_min_precision" field if the given value is not nil.

func (*TradingPairUpdateOne) SetNillableBaseQuantityMaxPrecision

func (tpuo *TradingPairUpdateOne) SetNillableBaseQuantityMaxPrecision(i *int) *TradingPairUpdateOne

SetNillableBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field if the given value is not nil.

func (*TradingPairUpdateOne) SetNillableBaseQuantityMinPrecision

func (tpuo *TradingPairUpdateOne) SetNillableBaseQuantityMinPrecision(i *int) *TradingPairUpdateOne

SetNillableBaseQuantityMinPrecision sets the "base_quantity_min_precision" field if the given value is not nil.

func (*TradingPairUpdateOne) SetNillableCounterPriceMaxPrecision

func (tpuo *TradingPairUpdateOne) SetNillableCounterPriceMaxPrecision(i *int) *TradingPairUpdateOne

SetNillableCounterPriceMaxPrecision sets the "counter_price_max_precision" field if the given value is not nil.

func (*TradingPairUpdateOne) SetNillableCounterPriceMinPrecision

func (tpuo *TradingPairUpdateOne) SetNillableCounterPriceMinPrecision(i *int) *TradingPairUpdateOne

SetNillableCounterPriceMinPrecision sets the "counter_price_min_precision" field if the given value is not nil.

func (*TradingPairUpdateOne) SetNillableCounterQuantityMaxPrecision

func (tpuo *TradingPairUpdateOne) SetNillableCounterQuantityMaxPrecision(i *int) *TradingPairUpdateOne

SetNillableCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field if the given value is not nil.

func (*TradingPairUpdateOne) SetNillableCounterQuantityMinPrecision

func (tpuo *TradingPairUpdateOne) SetNillableCounterQuantityMinPrecision(i *int) *TradingPairUpdateOne

SetNillableCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field if the given value is not nil.

func (*TradingPairUpdateOne) SetSymbol

func (tpuo *TradingPairUpdateOne) SetSymbol(s string) *TradingPairUpdateOne

SetSymbol sets the "symbol" field.

func (*TradingPairUpdateOne) SetVenue

func (tpuo *TradingPairUpdateOne) SetVenue(v *Venue) *TradingPairUpdateOne

SetVenue sets the "venue" edge to the Venue entity.

func (*TradingPairUpdateOne) SetVenueID

func (tpuo *TradingPairUpdateOne) SetVenueID(id int) *TradingPairUpdateOne

SetVenueID sets the "venue" edge to the Venue entity by ID.

type TradingPairUpsert

type TradingPairUpsert struct {
	*sql.UpdateSet
}

TradingPairUpsert is the "OnConflict" setter.

func (*TradingPairUpsert) AddBasePriceMaxPrecision

func (u *TradingPairUpsert) AddBasePriceMaxPrecision(v int) *TradingPairUpsert

AddBasePriceMaxPrecision adds v to the "base_price_max_precision" field.

func (*TradingPairUpsert) AddBasePriceMinPrecision

func (u *TradingPairUpsert) AddBasePriceMinPrecision(v int) *TradingPairUpsert

AddBasePriceMinPrecision adds v to the "base_price_min_precision" field.

func (*TradingPairUpsert) AddBaseQuantityMaxPrecision

func (u *TradingPairUpsert) AddBaseQuantityMaxPrecision(v int) *TradingPairUpsert

AddBaseQuantityMaxPrecision adds v to the "base_quantity_max_precision" field.

func (*TradingPairUpsert) AddBaseQuantityMinPrecision

func (u *TradingPairUpsert) AddBaseQuantityMinPrecision(v int) *TradingPairUpsert

AddBaseQuantityMinPrecision adds v to the "base_quantity_min_precision" field.

func (*TradingPairUpsert) AddCounterPriceMaxPrecision

func (u *TradingPairUpsert) AddCounterPriceMaxPrecision(v int) *TradingPairUpsert

AddCounterPriceMaxPrecision adds v to the "counter_price_max_precision" field.

func (*TradingPairUpsert) AddCounterPriceMinPrecision

func (u *TradingPairUpsert) AddCounterPriceMinPrecision(v int) *TradingPairUpsert

AddCounterPriceMinPrecision adds v to the "counter_price_min_precision" field.

func (*TradingPairUpsert) AddCounterQuantityMaxPrecision

func (u *TradingPairUpsert) AddCounterQuantityMaxPrecision(v int) *TradingPairUpsert

AddCounterQuantityMaxPrecision adds v to the "counter_quantity_max_precision" field.

func (*TradingPairUpsert) AddCounterQuantityMinPrecision

func (u *TradingPairUpsert) AddCounterQuantityMinPrecision(v int) *TradingPairUpsert

AddCounterQuantityMinPrecision adds v to the "counter_quantity_min_precision" field.

func (*TradingPairUpsert) ClearBasePriceMaxPrecision

func (u *TradingPairUpsert) ClearBasePriceMaxPrecision() *TradingPairUpsert

ClearBasePriceMaxPrecision clears the value of the "base_price_max_precision" field.

func (*TradingPairUpsert) ClearBasePriceMinPrecision

func (u *TradingPairUpsert) ClearBasePriceMinPrecision() *TradingPairUpsert

ClearBasePriceMinPrecision clears the value of the "base_price_min_precision" field.

func (*TradingPairUpsert) ClearBaseQuantityMaxPrecision

func (u *TradingPairUpsert) ClearBaseQuantityMaxPrecision() *TradingPairUpsert

ClearBaseQuantityMaxPrecision clears the value of the "base_quantity_max_precision" field.

func (*TradingPairUpsert) ClearBaseQuantityMinPrecision

func (u *TradingPairUpsert) ClearBaseQuantityMinPrecision() *TradingPairUpsert

ClearBaseQuantityMinPrecision clears the value of the "base_quantity_min_precision" field.

func (*TradingPairUpsert) ClearCounterPriceMaxPrecision

func (u *TradingPairUpsert) ClearCounterPriceMaxPrecision() *TradingPairUpsert

ClearCounterPriceMaxPrecision clears the value of the "counter_price_max_precision" field.

func (*TradingPairUpsert) ClearCounterPriceMinPrecision

func (u *TradingPairUpsert) ClearCounterPriceMinPrecision() *TradingPairUpsert

ClearCounterPriceMinPrecision clears the value of the "counter_price_min_precision" field.

func (*TradingPairUpsert) ClearCounterQuantityMaxPrecision

func (u *TradingPairUpsert) ClearCounterQuantityMaxPrecision() *TradingPairUpsert

ClearCounterQuantityMaxPrecision clears the value of the "counter_quantity_max_precision" field.

func (*TradingPairUpsert) ClearCounterQuantityMinPrecision

func (u *TradingPairUpsert) ClearCounterQuantityMinPrecision() *TradingPairUpsert

ClearCounterQuantityMinPrecision clears the value of the "counter_quantity_min_precision" field.

func (*TradingPairUpsert) SetBasePriceMaxPrecision

func (u *TradingPairUpsert) SetBasePriceMaxPrecision(v int) *TradingPairUpsert

SetBasePriceMaxPrecision sets the "base_price_max_precision" field.

func (*TradingPairUpsert) SetBasePriceMinPrecision

func (u *TradingPairUpsert) SetBasePriceMinPrecision(v int) *TradingPairUpsert

SetBasePriceMinPrecision sets the "base_price_min_precision" field.

func (*TradingPairUpsert) SetBaseQuantityMaxPrecision

func (u *TradingPairUpsert) SetBaseQuantityMaxPrecision(v int) *TradingPairUpsert

SetBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field.

func (*TradingPairUpsert) SetBaseQuantityMinPrecision

func (u *TradingPairUpsert) SetBaseQuantityMinPrecision(v int) *TradingPairUpsert

SetBaseQuantityMinPrecision sets the "base_quantity_min_precision" field.

func (*TradingPairUpsert) SetCounterPriceMaxPrecision

func (u *TradingPairUpsert) SetCounterPriceMaxPrecision(v int) *TradingPairUpsert

SetCounterPriceMaxPrecision sets the "counter_price_max_precision" field.

func (*TradingPairUpsert) SetCounterPriceMinPrecision

func (u *TradingPairUpsert) SetCounterPriceMinPrecision(v int) *TradingPairUpsert

SetCounterPriceMinPrecision sets the "counter_price_min_precision" field.

func (*TradingPairUpsert) SetCounterQuantityMaxPrecision

func (u *TradingPairUpsert) SetCounterQuantityMaxPrecision(v int) *TradingPairUpsert

SetCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field.

func (*TradingPairUpsert) SetCounterQuantityMinPrecision

func (u *TradingPairUpsert) SetCounterQuantityMinPrecision(v int) *TradingPairUpsert

SetCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field.

func (*TradingPairUpsert) SetSymbol

func (u *TradingPairUpsert) SetSymbol(v string) *TradingPairUpsert

SetSymbol sets the "symbol" field.

func (*TradingPairUpsert) UpdateBasePriceMaxPrecision

func (u *TradingPairUpsert) UpdateBasePriceMaxPrecision() *TradingPairUpsert

UpdateBasePriceMaxPrecision sets the "base_price_max_precision" field to the value that was provided on create.

func (*TradingPairUpsert) UpdateBasePriceMinPrecision

func (u *TradingPairUpsert) UpdateBasePriceMinPrecision() *TradingPairUpsert

UpdateBasePriceMinPrecision sets the "base_price_min_precision" field to the value that was provided on create.

func (*TradingPairUpsert) UpdateBaseQuantityMaxPrecision

func (u *TradingPairUpsert) UpdateBaseQuantityMaxPrecision() *TradingPairUpsert

UpdateBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field to the value that was provided on create.

func (*TradingPairUpsert) UpdateBaseQuantityMinPrecision

func (u *TradingPairUpsert) UpdateBaseQuantityMinPrecision() *TradingPairUpsert

UpdateBaseQuantityMinPrecision sets the "base_quantity_min_precision" field to the value that was provided on create.

func (*TradingPairUpsert) UpdateCounterPriceMaxPrecision

func (u *TradingPairUpsert) UpdateCounterPriceMaxPrecision() *TradingPairUpsert

UpdateCounterPriceMaxPrecision sets the "counter_price_max_precision" field to the value that was provided on create.

func (*TradingPairUpsert) UpdateCounterPriceMinPrecision

func (u *TradingPairUpsert) UpdateCounterPriceMinPrecision() *TradingPairUpsert

UpdateCounterPriceMinPrecision sets the "counter_price_min_precision" field to the value that was provided on create.

func (*TradingPairUpsert) UpdateCounterQuantityMaxPrecision

func (u *TradingPairUpsert) UpdateCounterQuantityMaxPrecision() *TradingPairUpsert

UpdateCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field to the value that was provided on create.

func (*TradingPairUpsert) UpdateCounterQuantityMinPrecision

func (u *TradingPairUpsert) UpdateCounterQuantityMinPrecision() *TradingPairUpsert

UpdateCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field to the value that was provided on create.

func (*TradingPairUpsert) UpdateSymbol

func (u *TradingPairUpsert) UpdateSymbol() *TradingPairUpsert

UpdateSymbol sets the "symbol" field to the value that was provided on create.

type TradingPairUpsertBulk

type TradingPairUpsertBulk struct {
	// contains filtered or unexported fields
}

TradingPairUpsertBulk is the builder for "upsert"-ing a bulk of TradingPair nodes.

func (*TradingPairUpsertBulk) AddBasePriceMaxPrecision

func (u *TradingPairUpsertBulk) AddBasePriceMaxPrecision(v int) *TradingPairUpsertBulk

AddBasePriceMaxPrecision adds v to the "base_price_max_precision" field.

func (*TradingPairUpsertBulk) AddBasePriceMinPrecision

func (u *TradingPairUpsertBulk) AddBasePriceMinPrecision(v int) *TradingPairUpsertBulk

AddBasePriceMinPrecision adds v to the "base_price_min_precision" field.

func (*TradingPairUpsertBulk) AddBaseQuantityMaxPrecision

func (u *TradingPairUpsertBulk) AddBaseQuantityMaxPrecision(v int) *TradingPairUpsertBulk

AddBaseQuantityMaxPrecision adds v to the "base_quantity_max_precision" field.

func (*TradingPairUpsertBulk) AddBaseQuantityMinPrecision

func (u *TradingPairUpsertBulk) AddBaseQuantityMinPrecision(v int) *TradingPairUpsertBulk

AddBaseQuantityMinPrecision adds v to the "base_quantity_min_precision" field.

func (*TradingPairUpsertBulk) AddCounterPriceMaxPrecision

func (u *TradingPairUpsertBulk) AddCounterPriceMaxPrecision(v int) *TradingPairUpsertBulk

AddCounterPriceMaxPrecision adds v to the "counter_price_max_precision" field.

func (*TradingPairUpsertBulk) AddCounterPriceMinPrecision

func (u *TradingPairUpsertBulk) AddCounterPriceMinPrecision(v int) *TradingPairUpsertBulk

AddCounterPriceMinPrecision adds v to the "counter_price_min_precision" field.

func (*TradingPairUpsertBulk) AddCounterQuantityMaxPrecision

func (u *TradingPairUpsertBulk) AddCounterQuantityMaxPrecision(v int) *TradingPairUpsertBulk

AddCounterQuantityMaxPrecision adds v to the "counter_quantity_max_precision" field.

func (*TradingPairUpsertBulk) AddCounterQuantityMinPrecision

func (u *TradingPairUpsertBulk) AddCounterQuantityMinPrecision(v int) *TradingPairUpsertBulk

AddCounterQuantityMinPrecision adds v to the "counter_quantity_min_precision" field.

func (*TradingPairUpsertBulk) ClearBasePriceMaxPrecision

func (u *TradingPairUpsertBulk) ClearBasePriceMaxPrecision() *TradingPairUpsertBulk

ClearBasePriceMaxPrecision clears the value of the "base_price_max_precision" field.

func (*TradingPairUpsertBulk) ClearBasePriceMinPrecision

func (u *TradingPairUpsertBulk) ClearBasePriceMinPrecision() *TradingPairUpsertBulk

ClearBasePriceMinPrecision clears the value of the "base_price_min_precision" field.

func (*TradingPairUpsertBulk) ClearBaseQuantityMaxPrecision

func (u *TradingPairUpsertBulk) ClearBaseQuantityMaxPrecision() *TradingPairUpsertBulk

ClearBaseQuantityMaxPrecision clears the value of the "base_quantity_max_precision" field.

func (*TradingPairUpsertBulk) ClearBaseQuantityMinPrecision

func (u *TradingPairUpsertBulk) ClearBaseQuantityMinPrecision() *TradingPairUpsertBulk

ClearBaseQuantityMinPrecision clears the value of the "base_quantity_min_precision" field.

func (*TradingPairUpsertBulk) ClearCounterPriceMaxPrecision

func (u *TradingPairUpsertBulk) ClearCounterPriceMaxPrecision() *TradingPairUpsertBulk

ClearCounterPriceMaxPrecision clears the value of the "counter_price_max_precision" field.

func (*TradingPairUpsertBulk) ClearCounterPriceMinPrecision

func (u *TradingPairUpsertBulk) ClearCounterPriceMinPrecision() *TradingPairUpsertBulk

ClearCounterPriceMinPrecision clears the value of the "counter_price_min_precision" field.

func (*TradingPairUpsertBulk) ClearCounterQuantityMaxPrecision

func (u *TradingPairUpsertBulk) ClearCounterQuantityMaxPrecision() *TradingPairUpsertBulk

ClearCounterQuantityMaxPrecision clears the value of the "counter_quantity_max_precision" field.

func (*TradingPairUpsertBulk) ClearCounterQuantityMinPrecision

func (u *TradingPairUpsertBulk) ClearCounterQuantityMinPrecision() *TradingPairUpsertBulk

ClearCounterQuantityMinPrecision clears the value of the "counter_quantity_min_precision" field.

func (*TradingPairUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TradingPairUpsertBulk) Exec

Exec executes the query.

func (*TradingPairUpsertBulk) ExecX

func (u *TradingPairUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TradingPairUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TradingPair.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TradingPairUpsertBulk) SetBasePriceMaxPrecision

func (u *TradingPairUpsertBulk) SetBasePriceMaxPrecision(v int) *TradingPairUpsertBulk

SetBasePriceMaxPrecision sets the "base_price_max_precision" field.

func (*TradingPairUpsertBulk) SetBasePriceMinPrecision

func (u *TradingPairUpsertBulk) SetBasePriceMinPrecision(v int) *TradingPairUpsertBulk

SetBasePriceMinPrecision sets the "base_price_min_precision" field.

func (*TradingPairUpsertBulk) SetBaseQuantityMaxPrecision

func (u *TradingPairUpsertBulk) SetBaseQuantityMaxPrecision(v int) *TradingPairUpsertBulk

SetBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field.

func (*TradingPairUpsertBulk) SetBaseQuantityMinPrecision

func (u *TradingPairUpsertBulk) SetBaseQuantityMinPrecision(v int) *TradingPairUpsertBulk

SetBaseQuantityMinPrecision sets the "base_quantity_min_precision" field.

func (*TradingPairUpsertBulk) SetCounterPriceMaxPrecision

func (u *TradingPairUpsertBulk) SetCounterPriceMaxPrecision(v int) *TradingPairUpsertBulk

SetCounterPriceMaxPrecision sets the "counter_price_max_precision" field.

func (*TradingPairUpsertBulk) SetCounterPriceMinPrecision

func (u *TradingPairUpsertBulk) SetCounterPriceMinPrecision(v int) *TradingPairUpsertBulk

SetCounterPriceMinPrecision sets the "counter_price_min_precision" field.

func (*TradingPairUpsertBulk) SetCounterQuantityMaxPrecision

func (u *TradingPairUpsertBulk) SetCounterQuantityMaxPrecision(v int) *TradingPairUpsertBulk

SetCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field.

func (*TradingPairUpsertBulk) SetCounterQuantityMinPrecision

func (u *TradingPairUpsertBulk) SetCounterQuantityMinPrecision(v int) *TradingPairUpsertBulk

SetCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field.

func (*TradingPairUpsertBulk) SetSymbol

SetSymbol sets the "symbol" field.

func (*TradingPairUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the TradingPairCreateBulk.OnConflict documentation for more info.

func (*TradingPairUpsertBulk) UpdateBasePriceMaxPrecision

func (u *TradingPairUpsertBulk) UpdateBasePriceMaxPrecision() *TradingPairUpsertBulk

UpdateBasePriceMaxPrecision sets the "base_price_max_precision" field to the value that was provided on create.

func (*TradingPairUpsertBulk) UpdateBasePriceMinPrecision

func (u *TradingPairUpsertBulk) UpdateBasePriceMinPrecision() *TradingPairUpsertBulk

UpdateBasePriceMinPrecision sets the "base_price_min_precision" field to the value that was provided on create.

func (*TradingPairUpsertBulk) UpdateBaseQuantityMaxPrecision

func (u *TradingPairUpsertBulk) UpdateBaseQuantityMaxPrecision() *TradingPairUpsertBulk

UpdateBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field to the value that was provided on create.

func (*TradingPairUpsertBulk) UpdateBaseQuantityMinPrecision

func (u *TradingPairUpsertBulk) UpdateBaseQuantityMinPrecision() *TradingPairUpsertBulk

UpdateBaseQuantityMinPrecision sets the "base_quantity_min_precision" field to the value that was provided on create.

func (*TradingPairUpsertBulk) UpdateCounterPriceMaxPrecision

func (u *TradingPairUpsertBulk) UpdateCounterPriceMaxPrecision() *TradingPairUpsertBulk

UpdateCounterPriceMaxPrecision sets the "counter_price_max_precision" field to the value that was provided on create.

func (*TradingPairUpsertBulk) UpdateCounterPriceMinPrecision

func (u *TradingPairUpsertBulk) UpdateCounterPriceMinPrecision() *TradingPairUpsertBulk

UpdateCounterPriceMinPrecision sets the "counter_price_min_precision" field to the value that was provided on create.

func (*TradingPairUpsertBulk) UpdateCounterQuantityMaxPrecision

func (u *TradingPairUpsertBulk) UpdateCounterQuantityMaxPrecision() *TradingPairUpsertBulk

UpdateCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field to the value that was provided on create.

func (*TradingPairUpsertBulk) UpdateCounterQuantityMinPrecision

func (u *TradingPairUpsertBulk) UpdateCounterQuantityMinPrecision() *TradingPairUpsertBulk

UpdateCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field to the value that was provided on create.

func (*TradingPairUpsertBulk) UpdateNewValues

func (u *TradingPairUpsertBulk) UpdateNewValues() *TradingPairUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TradingPair.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*TradingPairUpsertBulk) UpdateSymbol

func (u *TradingPairUpsertBulk) UpdateSymbol() *TradingPairUpsertBulk

UpdateSymbol sets the "symbol" field to the value that was provided on create.

type TradingPairUpsertOne

type TradingPairUpsertOne struct {
	// contains filtered or unexported fields
}

TradingPairUpsertOne is the builder for "upsert"-ing

one TradingPair node.

func (*TradingPairUpsertOne) AddBasePriceMaxPrecision

func (u *TradingPairUpsertOne) AddBasePriceMaxPrecision(v int) *TradingPairUpsertOne

AddBasePriceMaxPrecision adds v to the "base_price_max_precision" field.

func (*TradingPairUpsertOne) AddBasePriceMinPrecision

func (u *TradingPairUpsertOne) AddBasePriceMinPrecision(v int) *TradingPairUpsertOne

AddBasePriceMinPrecision adds v to the "base_price_min_precision" field.

func (*TradingPairUpsertOne) AddBaseQuantityMaxPrecision

func (u *TradingPairUpsertOne) AddBaseQuantityMaxPrecision(v int) *TradingPairUpsertOne

AddBaseQuantityMaxPrecision adds v to the "base_quantity_max_precision" field.

func (*TradingPairUpsertOne) AddBaseQuantityMinPrecision

func (u *TradingPairUpsertOne) AddBaseQuantityMinPrecision(v int) *TradingPairUpsertOne

AddBaseQuantityMinPrecision adds v to the "base_quantity_min_precision" field.

func (*TradingPairUpsertOne) AddCounterPriceMaxPrecision

func (u *TradingPairUpsertOne) AddCounterPriceMaxPrecision(v int) *TradingPairUpsertOne

AddCounterPriceMaxPrecision adds v to the "counter_price_max_precision" field.

func (*TradingPairUpsertOne) AddCounterPriceMinPrecision

func (u *TradingPairUpsertOne) AddCounterPriceMinPrecision(v int) *TradingPairUpsertOne

AddCounterPriceMinPrecision adds v to the "counter_price_min_precision" field.

func (*TradingPairUpsertOne) AddCounterQuantityMaxPrecision

func (u *TradingPairUpsertOne) AddCounterQuantityMaxPrecision(v int) *TradingPairUpsertOne

AddCounterQuantityMaxPrecision adds v to the "counter_quantity_max_precision" field.

func (*TradingPairUpsertOne) AddCounterQuantityMinPrecision

func (u *TradingPairUpsertOne) AddCounterQuantityMinPrecision(v int) *TradingPairUpsertOne

AddCounterQuantityMinPrecision adds v to the "counter_quantity_min_precision" field.

func (*TradingPairUpsertOne) ClearBasePriceMaxPrecision

func (u *TradingPairUpsertOne) ClearBasePriceMaxPrecision() *TradingPairUpsertOne

ClearBasePriceMaxPrecision clears the value of the "base_price_max_precision" field.

func (*TradingPairUpsertOne) ClearBasePriceMinPrecision

func (u *TradingPairUpsertOne) ClearBasePriceMinPrecision() *TradingPairUpsertOne

ClearBasePriceMinPrecision clears the value of the "base_price_min_precision" field.

func (*TradingPairUpsertOne) ClearBaseQuantityMaxPrecision

func (u *TradingPairUpsertOne) ClearBaseQuantityMaxPrecision() *TradingPairUpsertOne

ClearBaseQuantityMaxPrecision clears the value of the "base_quantity_max_precision" field.

func (*TradingPairUpsertOne) ClearBaseQuantityMinPrecision

func (u *TradingPairUpsertOne) ClearBaseQuantityMinPrecision() *TradingPairUpsertOne

ClearBaseQuantityMinPrecision clears the value of the "base_quantity_min_precision" field.

func (*TradingPairUpsertOne) ClearCounterPriceMaxPrecision

func (u *TradingPairUpsertOne) ClearCounterPriceMaxPrecision() *TradingPairUpsertOne

ClearCounterPriceMaxPrecision clears the value of the "counter_price_max_precision" field.

func (*TradingPairUpsertOne) ClearCounterPriceMinPrecision

func (u *TradingPairUpsertOne) ClearCounterPriceMinPrecision() *TradingPairUpsertOne

ClearCounterPriceMinPrecision clears the value of the "counter_price_min_precision" field.

func (*TradingPairUpsertOne) ClearCounterQuantityMaxPrecision

func (u *TradingPairUpsertOne) ClearCounterQuantityMaxPrecision() *TradingPairUpsertOne

ClearCounterQuantityMaxPrecision clears the value of the "counter_quantity_max_precision" field.

func (*TradingPairUpsertOne) ClearCounterQuantityMinPrecision

func (u *TradingPairUpsertOne) ClearCounterQuantityMinPrecision() *TradingPairUpsertOne

ClearCounterQuantityMinPrecision clears the value of the "counter_quantity_min_precision" field.

func (*TradingPairUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TradingPairUpsertOne) Exec

Exec executes the query.

func (*TradingPairUpsertOne) ExecX

func (u *TradingPairUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TradingPairUpsertOne) ID

func (u *TradingPairUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TradingPairUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*TradingPairUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TradingPair.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TradingPairUpsertOne) SetBasePriceMaxPrecision

func (u *TradingPairUpsertOne) SetBasePriceMaxPrecision(v int) *TradingPairUpsertOne

SetBasePriceMaxPrecision sets the "base_price_max_precision" field.

func (*TradingPairUpsertOne) SetBasePriceMinPrecision

func (u *TradingPairUpsertOne) SetBasePriceMinPrecision(v int) *TradingPairUpsertOne

SetBasePriceMinPrecision sets the "base_price_min_precision" field.

func (*TradingPairUpsertOne) SetBaseQuantityMaxPrecision

func (u *TradingPairUpsertOne) SetBaseQuantityMaxPrecision(v int) *TradingPairUpsertOne

SetBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field.

func (*TradingPairUpsertOne) SetBaseQuantityMinPrecision

func (u *TradingPairUpsertOne) SetBaseQuantityMinPrecision(v int) *TradingPairUpsertOne

SetBaseQuantityMinPrecision sets the "base_quantity_min_precision" field.

func (*TradingPairUpsertOne) SetCounterPriceMaxPrecision

func (u *TradingPairUpsertOne) SetCounterPriceMaxPrecision(v int) *TradingPairUpsertOne

SetCounterPriceMaxPrecision sets the "counter_price_max_precision" field.

func (*TradingPairUpsertOne) SetCounterPriceMinPrecision

func (u *TradingPairUpsertOne) SetCounterPriceMinPrecision(v int) *TradingPairUpsertOne

SetCounterPriceMinPrecision sets the "counter_price_min_precision" field.

func (*TradingPairUpsertOne) SetCounterQuantityMaxPrecision

func (u *TradingPairUpsertOne) SetCounterQuantityMaxPrecision(v int) *TradingPairUpsertOne

SetCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field.

func (*TradingPairUpsertOne) SetCounterQuantityMinPrecision

func (u *TradingPairUpsertOne) SetCounterQuantityMinPrecision(v int) *TradingPairUpsertOne

SetCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field.

func (*TradingPairUpsertOne) SetSymbol

SetSymbol sets the "symbol" field.

func (*TradingPairUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the TradingPairCreate.OnConflict documentation for more info.

func (*TradingPairUpsertOne) UpdateBasePriceMaxPrecision

func (u *TradingPairUpsertOne) UpdateBasePriceMaxPrecision() *TradingPairUpsertOne

UpdateBasePriceMaxPrecision sets the "base_price_max_precision" field to the value that was provided on create.

func (*TradingPairUpsertOne) UpdateBasePriceMinPrecision

func (u *TradingPairUpsertOne) UpdateBasePriceMinPrecision() *TradingPairUpsertOne

UpdateBasePriceMinPrecision sets the "base_price_min_precision" field to the value that was provided on create.

func (*TradingPairUpsertOne) UpdateBaseQuantityMaxPrecision

func (u *TradingPairUpsertOne) UpdateBaseQuantityMaxPrecision() *TradingPairUpsertOne

UpdateBaseQuantityMaxPrecision sets the "base_quantity_max_precision" field to the value that was provided on create.

func (*TradingPairUpsertOne) UpdateBaseQuantityMinPrecision

func (u *TradingPairUpsertOne) UpdateBaseQuantityMinPrecision() *TradingPairUpsertOne

UpdateBaseQuantityMinPrecision sets the "base_quantity_min_precision" field to the value that was provided on create.

func (*TradingPairUpsertOne) UpdateCounterPriceMaxPrecision

func (u *TradingPairUpsertOne) UpdateCounterPriceMaxPrecision() *TradingPairUpsertOne

UpdateCounterPriceMaxPrecision sets the "counter_price_max_precision" field to the value that was provided on create.

func (*TradingPairUpsertOne) UpdateCounterPriceMinPrecision

func (u *TradingPairUpsertOne) UpdateCounterPriceMinPrecision() *TradingPairUpsertOne

UpdateCounterPriceMinPrecision sets the "counter_price_min_precision" field to the value that was provided on create.

func (*TradingPairUpsertOne) UpdateCounterQuantityMaxPrecision

func (u *TradingPairUpsertOne) UpdateCounterQuantityMaxPrecision() *TradingPairUpsertOne

UpdateCounterQuantityMaxPrecision sets the "counter_quantity_max_precision" field to the value that was provided on create.

func (*TradingPairUpsertOne) UpdateCounterQuantityMinPrecision

func (u *TradingPairUpsertOne) UpdateCounterQuantityMinPrecision() *TradingPairUpsertOne

UpdateCounterQuantityMinPrecision sets the "counter_quantity_min_precision" field to the value that was provided on create.

func (*TradingPairUpsertOne) UpdateNewValues

func (u *TradingPairUpsertOne) UpdateNewValues() *TradingPairUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TradingPair.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*TradingPairUpsertOne) UpdateSymbol

func (u *TradingPairUpsertOne) UpdateSymbol() *TradingPairUpsertOne

UpdateSymbol sets the "symbol" field to the value that was provided on create.

type TradingPairWhereInput

type TradingPairWhereInput struct {
	Predicates []predicate.TradingPair  `json:"-"`
	Not        *TradingPairWhereInput   `json:"not,omitempty"`
	Or         []*TradingPairWhereInput `json:"or,omitempty"`
	And        []*TradingPairWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "symbol" field predicates.
	Symbol             *string  `json:"symbol,omitempty"`
	SymbolNEQ          *string  `json:"symbolNEQ,omitempty"`
	SymbolIn           []string `json:"symbolIn,omitempty"`
	SymbolNotIn        []string `json:"symbolNotIn,omitempty"`
	SymbolGT           *string  `json:"symbolGT,omitempty"`
	SymbolGTE          *string  `json:"symbolGTE,omitempty"`
	SymbolLT           *string  `json:"symbolLT,omitempty"`
	SymbolLTE          *string  `json:"symbolLTE,omitempty"`
	SymbolContains     *string  `json:"symbolContains,omitempty"`
	SymbolHasPrefix    *string  `json:"symbolHasPrefix,omitempty"`
	SymbolHasSuffix    *string  `json:"symbolHasSuffix,omitempty"`
	SymbolEqualFold    *string  `json:"symbolEqualFold,omitempty"`
	SymbolContainsFold *string  `json:"symbolContainsFold,omitempty"`

	// "base_price_min_precision" field predicates.
	BasePriceMinPrecision       *int  `json:"basePriceMinPrecision,omitempty"`
	BasePriceMinPrecisionNEQ    *int  `json:"basePriceMinPrecisionNEQ,omitempty"`
	BasePriceMinPrecisionIn     []int `json:"basePriceMinPrecisionIn,omitempty"`
	BasePriceMinPrecisionNotIn  []int `json:"basePriceMinPrecisionNotIn,omitempty"`
	BasePriceMinPrecisionGT     *int  `json:"basePriceMinPrecisionGT,omitempty"`
	BasePriceMinPrecisionGTE    *int  `json:"basePriceMinPrecisionGTE,omitempty"`
	BasePriceMinPrecisionLT     *int  `json:"basePriceMinPrecisionLT,omitempty"`
	BasePriceMinPrecisionLTE    *int  `json:"basePriceMinPrecisionLTE,omitempty"`
	BasePriceMinPrecisionIsNil  bool  `json:"basePriceMinPrecisionIsNil,omitempty"`
	BasePriceMinPrecisionNotNil bool  `json:"basePriceMinPrecisionNotNil,omitempty"`

	// "base_price_max_precision" field predicates.
	BasePriceMaxPrecision       *int  `json:"basePriceMaxPrecision,omitempty"`
	BasePriceMaxPrecisionNEQ    *int  `json:"basePriceMaxPrecisionNEQ,omitempty"`
	BasePriceMaxPrecisionIn     []int `json:"basePriceMaxPrecisionIn,omitempty"`
	BasePriceMaxPrecisionNotIn  []int `json:"basePriceMaxPrecisionNotIn,omitempty"`
	BasePriceMaxPrecisionGT     *int  `json:"basePriceMaxPrecisionGT,omitempty"`
	BasePriceMaxPrecisionGTE    *int  `json:"basePriceMaxPrecisionGTE,omitempty"`
	BasePriceMaxPrecisionLT     *int  `json:"basePriceMaxPrecisionLT,omitempty"`
	BasePriceMaxPrecisionLTE    *int  `json:"basePriceMaxPrecisionLTE,omitempty"`
	BasePriceMaxPrecisionIsNil  bool  `json:"basePriceMaxPrecisionIsNil,omitempty"`
	BasePriceMaxPrecisionNotNil bool  `json:"basePriceMaxPrecisionNotNil,omitempty"`

	// "base_quantity_min_precision" field predicates.
	BaseQuantityMinPrecision       *int  `json:"baseQuantityMinPrecision,omitempty"`
	BaseQuantityMinPrecisionNEQ    *int  `json:"baseQuantityMinPrecisionNEQ,omitempty"`
	BaseQuantityMinPrecisionIn     []int `json:"baseQuantityMinPrecisionIn,omitempty"`
	BaseQuantityMinPrecisionNotIn  []int `json:"baseQuantityMinPrecisionNotIn,omitempty"`
	BaseQuantityMinPrecisionGT     *int  `json:"baseQuantityMinPrecisionGT,omitempty"`
	BaseQuantityMinPrecisionGTE    *int  `json:"baseQuantityMinPrecisionGTE,omitempty"`
	BaseQuantityMinPrecisionLT     *int  `json:"baseQuantityMinPrecisionLT,omitempty"`
	BaseQuantityMinPrecisionLTE    *int  `json:"baseQuantityMinPrecisionLTE,omitempty"`
	BaseQuantityMinPrecisionIsNil  bool  `json:"baseQuantityMinPrecisionIsNil,omitempty"`
	BaseQuantityMinPrecisionNotNil bool  `json:"baseQuantityMinPrecisionNotNil,omitempty"`

	// "base_quantity_max_precision" field predicates.
	BaseQuantityMaxPrecision       *int  `json:"baseQuantityMaxPrecision,omitempty"`
	BaseQuantityMaxPrecisionNEQ    *int  `json:"baseQuantityMaxPrecisionNEQ,omitempty"`
	BaseQuantityMaxPrecisionIn     []int `json:"baseQuantityMaxPrecisionIn,omitempty"`
	BaseQuantityMaxPrecisionNotIn  []int `json:"baseQuantityMaxPrecisionNotIn,omitempty"`
	BaseQuantityMaxPrecisionGT     *int  `json:"baseQuantityMaxPrecisionGT,omitempty"`
	BaseQuantityMaxPrecisionGTE    *int  `json:"baseQuantityMaxPrecisionGTE,omitempty"`
	BaseQuantityMaxPrecisionLT     *int  `json:"baseQuantityMaxPrecisionLT,omitempty"`
	BaseQuantityMaxPrecisionLTE    *int  `json:"baseQuantityMaxPrecisionLTE,omitempty"`
	BaseQuantityMaxPrecisionIsNil  bool  `json:"baseQuantityMaxPrecisionIsNil,omitempty"`
	BaseQuantityMaxPrecisionNotNil bool  `json:"baseQuantityMaxPrecisionNotNil,omitempty"`

	// "counter_price_min_precision" field predicates.
	CounterPriceMinPrecision       *int  `json:"counterPriceMinPrecision,omitempty"`
	CounterPriceMinPrecisionNEQ    *int  `json:"counterPriceMinPrecisionNEQ,omitempty"`
	CounterPriceMinPrecisionIn     []int `json:"counterPriceMinPrecisionIn,omitempty"`
	CounterPriceMinPrecisionNotIn  []int `json:"counterPriceMinPrecisionNotIn,omitempty"`
	CounterPriceMinPrecisionGT     *int  `json:"counterPriceMinPrecisionGT,omitempty"`
	CounterPriceMinPrecisionGTE    *int  `json:"counterPriceMinPrecisionGTE,omitempty"`
	CounterPriceMinPrecisionLT     *int  `json:"counterPriceMinPrecisionLT,omitempty"`
	CounterPriceMinPrecisionLTE    *int  `json:"counterPriceMinPrecisionLTE,omitempty"`
	CounterPriceMinPrecisionIsNil  bool  `json:"counterPriceMinPrecisionIsNil,omitempty"`
	CounterPriceMinPrecisionNotNil bool  `json:"counterPriceMinPrecisionNotNil,omitempty"`

	// "counter_price_max_precision" field predicates.
	CounterPriceMaxPrecision       *int  `json:"counterPriceMaxPrecision,omitempty"`
	CounterPriceMaxPrecisionNEQ    *int  `json:"counterPriceMaxPrecisionNEQ,omitempty"`
	CounterPriceMaxPrecisionIn     []int `json:"counterPriceMaxPrecisionIn,omitempty"`
	CounterPriceMaxPrecisionNotIn  []int `json:"counterPriceMaxPrecisionNotIn,omitempty"`
	CounterPriceMaxPrecisionGT     *int  `json:"counterPriceMaxPrecisionGT,omitempty"`
	CounterPriceMaxPrecisionGTE    *int  `json:"counterPriceMaxPrecisionGTE,omitempty"`
	CounterPriceMaxPrecisionLT     *int  `json:"counterPriceMaxPrecisionLT,omitempty"`
	CounterPriceMaxPrecisionLTE    *int  `json:"counterPriceMaxPrecisionLTE,omitempty"`
	CounterPriceMaxPrecisionIsNil  bool  `json:"counterPriceMaxPrecisionIsNil,omitempty"`
	CounterPriceMaxPrecisionNotNil bool  `json:"counterPriceMaxPrecisionNotNil,omitempty"`

	// "counter_quantity_min_precision" field predicates.
	CounterQuantityMinPrecision       *int  `json:"counterQuantityMinPrecision,omitempty"`
	CounterQuantityMinPrecisionNEQ    *int  `json:"counterQuantityMinPrecisionNEQ,omitempty"`
	CounterQuantityMinPrecisionIn     []int `json:"counterQuantityMinPrecisionIn,omitempty"`
	CounterQuantityMinPrecisionNotIn  []int `json:"counterQuantityMinPrecisionNotIn,omitempty"`
	CounterQuantityMinPrecisionGT     *int  `json:"counterQuantityMinPrecisionGT,omitempty"`
	CounterQuantityMinPrecisionGTE    *int  `json:"counterQuantityMinPrecisionGTE,omitempty"`
	CounterQuantityMinPrecisionLT     *int  `json:"counterQuantityMinPrecisionLT,omitempty"`
	CounterQuantityMinPrecisionLTE    *int  `json:"counterQuantityMinPrecisionLTE,omitempty"`
	CounterQuantityMinPrecisionIsNil  bool  `json:"counterQuantityMinPrecisionIsNil,omitempty"`
	CounterQuantityMinPrecisionNotNil bool  `json:"counterQuantityMinPrecisionNotNil,omitempty"`

	// "counter_quantity_max_precision" field predicates.
	CounterQuantityMaxPrecision       *int  `json:"counterQuantityMaxPrecision,omitempty"`
	CounterQuantityMaxPrecisionNEQ    *int  `json:"counterQuantityMaxPrecisionNEQ,omitempty"`
	CounterQuantityMaxPrecisionIn     []int `json:"counterQuantityMaxPrecisionIn,omitempty"`
	CounterQuantityMaxPrecisionNotIn  []int `json:"counterQuantityMaxPrecisionNotIn,omitempty"`
	CounterQuantityMaxPrecisionGT     *int  `json:"counterQuantityMaxPrecisionGT,omitempty"`
	CounterQuantityMaxPrecisionGTE    *int  `json:"counterQuantityMaxPrecisionGTE,omitempty"`
	CounterQuantityMaxPrecisionLT     *int  `json:"counterQuantityMaxPrecisionLT,omitempty"`
	CounterQuantityMaxPrecisionLTE    *int  `json:"counterQuantityMaxPrecisionLTE,omitempty"`
	CounterQuantityMaxPrecisionIsNil  bool  `json:"counterQuantityMaxPrecisionIsNil,omitempty"`
	CounterQuantityMaxPrecisionNotNil bool  `json:"counterQuantityMaxPrecisionNotNil,omitempty"`

	// "venue" edge predicates.
	HasVenue     *bool              `json:"hasVenue,omitempty"`
	HasVenueWith []*VenueWhereInput `json:"hasVenueWith,omitempty"`

	// "base" edge predicates.
	HasBase     *bool                 `json:"hasBase,omitempty"`
	HasBaseWith []*CurrencyWhereInput `json:"hasBaseWith,omitempty"`

	// "counter" edge predicates.
	HasCounter     *bool                 `json:"hasCounter,omitempty"`
	HasCounterWith []*CurrencyWhereInput `json:"hasCounterWith,omitempty"`

	// "market" edge predicates.
	HasMarket     *bool               `json:"hasMarket,omitempty"`
	HasMarketWith []*MarketWhereInput `json:"hasMarketWith,omitempty"`
}

TradingPairWhereInput represents a where input for filtering TradingPair queries.

func (*TradingPairWhereInput) AddPredicates

func (i *TradingPairWhereInput) AddPredicates(predicates ...predicate.TradingPair)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*TradingPairWhereInput) Filter

Filter applies the TradingPairWhereInput filter on the TradingPairQuery builder.

func (*TradingPairWhereInput) P

P returns a predicate for filtering tradingpairs. An error is returned if the input is empty or invalid.

type TradingPairs

type TradingPairs []*TradingPair

TradingPairs is a parsable slice of TradingPair.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// Currency is the client for interacting with the Currency builders.
	Currency *CurrencyClient
	// Market is the client for interacting with the Market builders.
	Market *MarketClient
	// Outbox is the client for interacting with the Outbox builders.
	Outbox *OutboxClient
	// Ticker is the client for interacting with the Ticker builders.
	Ticker *TickerClient
	// TradingPair is the client for interacting with the TradingPair builders.
	TradingPair *TradingPairClient
	// Venue is the client for interacting with the Venue builders.
	Venue *VenueClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

type Venue

type Venue struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// VenueID holds the value of the "venue_id" field.
	VenueID string `json:"venue_id,omitempty"`
	// Type holds the value of the "type" field.
	Type venue.Type `json:"type,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// YearEstablished holds the value of the "year_established" field.
	YearEstablished int `json:"year_established,omitempty"`
	// Country holds the value of the "country" field.
	Country string `json:"country,omitempty"`
	// Image holds the value of the "image" field.
	Image string `json:"image,omitempty"`
	// Links holds the value of the "links" field.
	Links map[string]string `json:"links,omitempty"`
	// HasTradingIncentive holds the value of the "has_trading_incentive" field.
	HasTradingIncentive bool `json:"has_trading_incentive,omitempty"`
	// Centralized holds the value of the "centralized" field.
	Centralized bool `json:"centralized,omitempty"`
	// PublicNotice holds the value of the "public_notice" field.
	PublicNotice string `json:"public_notice,omitempty"`
	// AlertNotice holds the value of the "alert_notice" field.
	AlertNotice string `json:"alert_notice,omitempty"`
	// TrustScore holds the value of the "trust_score" field.
	TrustScore int `json:"trust_score,omitempty"`
	// TrustScoreRank holds the value of the "trust_score_rank" field.
	TrustScoreRank int `json:"trust_score_rank,omitempty"`
	// TradeVolume24hBtc holds the value of the "trade_volume_24h_btc" field.
	TradeVolume24hBtc float64 `json:"trade_volume_24h_btc,omitempty"`
	// TradeVolume24hBtcNormalized holds the value of the "trade_volume_24h_btc_normalized" field.
	TradeVolume24hBtcNormalized float64 `json:"trade_volume_24h_btc_normalized,omitempty"`
	// MakerFee holds the value of the "maker_fee" field.
	MakerFee float64 `json:"maker_fee,omitempty"`
	// TakerFee holds the value of the "taker_fee" field.
	TakerFee float64 `json:"taker_fee,omitempty"`
	// SpreadFee holds the value of the "spread_fee" field.
	SpreadFee bool `json:"spread_fee,omitempty"`
	// SupportAPI holds the value of the "support_api" field.
	SupportAPI bool `json:"support_api,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VenueQuery when eager-loading is set.
	Edges VenueEdges `json:"edges"`
	// contains filtered or unexported fields
}

Venue is the model entity for the Venue schema.

func (*Venue) ExecContext

func (c *Venue) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Venue) IsNode

func (n *Venue) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Venue) Market

func (v *Venue) Market(ctx context.Context) (result []*Market, err error)

func (*Venue) NamedMarket

func (v *Venue) NamedMarket(name string) ([]*Market, error)

NamedMarket returns the Market named value or an error if the edge was not loaded in eager-loading with this name.

func (*Venue) NamedTicker

func (v *Venue) NamedTicker(name string) ([]*Ticker, error)

NamedTicker returns the Ticker named value or an error if the edge was not loaded in eager-loading with this name.

func (*Venue) NamedTradingPair

func (v *Venue) NamedTradingPair(name string) ([]*TradingPair, error)

NamedTradingPair returns the TradingPair named value or an error if the edge was not loaded in eager-loading with this name.

func (*Venue) QueryContext

func (c *Venue) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Venue) QueryMarket

func (v *Venue) QueryMarket() *MarketQuery

QueryMarket queries the "market" edge of the Venue entity.

func (*Venue) QueryTicker

func (v *Venue) QueryTicker() *TickerQuery

QueryTicker queries the "ticker" edge of the Venue entity.

func (*Venue) QueryTradingPair

func (v *Venue) QueryTradingPair() *TradingPairQuery

QueryTradingPair queries the "trading_pair" edge of the Venue entity.

func (*Venue) String

func (v *Venue) String() string

String implements the fmt.Stringer.

func (*Venue) Ticker

func (v *Venue) Ticker(ctx context.Context) (result []*Ticker, err error)

func (*Venue) ToEdge

func (v *Venue) ToEdge(order *VenueOrder) *VenueEdge

ToEdge converts Venue into VenueEdge.

func (*Venue) TradingPair

func (v *Venue) TradingPair(ctx context.Context) (result []*TradingPair, err error)

func (*Venue) Unwrap

func (v *Venue) Unwrap() *Venue

Unwrap unwraps the Venue 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 (*Venue) Update

func (v *Venue) Update() *VenueUpdateOne

Update returns a builder for updating this Venue. Note that you need to call Venue.Unwrap() before calling this method if this Venue was returned from a transaction, and the transaction was committed or rolled back.

type VenueClient

type VenueClient struct {
	// contains filtered or unexported fields
}

VenueClient is a client for the Venue schema.

func NewVenueClient

func NewVenueClient(c config) *VenueClient

NewVenueClient returns a client for the Venue from the given config.

func (*VenueClient) Create

func (c *VenueClient) Create() *VenueCreate

Create returns a builder for creating a Venue entity.

func (*VenueClient) CreateBulk

func (c *VenueClient) CreateBulk(builders ...*VenueCreate) *VenueCreateBulk

CreateBulk returns a builder for creating a bulk of Venue entities.

func (*VenueClient) Delete

func (c *VenueClient) Delete() *VenueDelete

Delete returns a delete builder for Venue.

func (*VenueClient) DeleteOne

func (c *VenueClient) DeleteOne(v *Venue) *VenueDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VenueClient) DeleteOneID

func (c *VenueClient) DeleteOneID(id int) *VenueDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VenueClient) ExecContext

func (c *VenueClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueClient) Get

func (c *VenueClient) Get(ctx context.Context, id int) (*Venue, error)

Get returns a Venue entity by its id.

func (*VenueClient) GetX

func (c *VenueClient) GetX(ctx context.Context, id int) *Venue

GetX is like Get, but panics if an error occurs.

func (*VenueClient) Hooks

func (c *VenueClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VenueClient) Intercept

func (c *VenueClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `venue.Intercept(f(g(h())))`.

func (*VenueClient) Interceptors

func (c *VenueClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VenueClient) Query

func (c *VenueClient) Query() *VenueQuery

Query returns a query builder for Venue.

func (*VenueClient) QueryContext

func (c *VenueClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueClient) QueryMarket

func (c *VenueClient) QueryMarket(v *Venue) *MarketQuery

QueryMarket queries the market edge of a Venue.

func (*VenueClient) QueryTicker

func (c *VenueClient) QueryTicker(v *Venue) *TickerQuery

QueryTicker queries the ticker edge of a Venue.

func (*VenueClient) QueryTradingPair

func (c *VenueClient) QueryTradingPair(v *Venue) *TradingPairQuery

QueryTradingPair queries the trading_pair edge of a Venue.

func (*VenueClient) Update

func (c *VenueClient) Update() *VenueUpdate

Update returns an update builder for Venue.

func (*VenueClient) UpdateOne

func (c *VenueClient) UpdateOne(v *Venue) *VenueUpdateOne

UpdateOne returns an update builder for the given entity.

func (*VenueClient) UpdateOneID

func (c *VenueClient) UpdateOneID(id int) *VenueUpdateOne

UpdateOneID returns an update builder for the given id.

func (*VenueClient) Use

func (c *VenueClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `venue.Hooks(f(g(h())))`.

type VenueConnection

type VenueConnection struct {
	Edges      []*VenueEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

VenueConnection is the connection containing edges to Venue.

type VenueCreate

type VenueCreate struct {
	// contains filtered or unexported fields
}

VenueCreate is the builder for creating a Venue entity.

func (*VenueCreate) AddMarket

func (vc *VenueCreate) AddMarket(m ...*Market) *VenueCreate

AddMarket adds the "market" edges to the Market entity.

func (*VenueCreate) AddMarketIDs

func (vc *VenueCreate) AddMarketIDs(ids ...int) *VenueCreate

AddMarketIDs adds the "market" edge to the Market entity by IDs.

func (*VenueCreate) AddTicker

func (vc *VenueCreate) AddTicker(t ...*Ticker) *VenueCreate

AddTicker adds the "ticker" edges to the Ticker entity.

func (*VenueCreate) AddTickerIDs

func (vc *VenueCreate) AddTickerIDs(ids ...int) *VenueCreate

AddTickerIDs adds the "ticker" edge to the Ticker entity by IDs.

func (*VenueCreate) AddTradingPair

func (vc *VenueCreate) AddTradingPair(t ...*TradingPair) *VenueCreate

AddTradingPair adds the "trading_pair" edges to the TradingPair entity.

func (*VenueCreate) AddTradingPairIDs

func (vc *VenueCreate) AddTradingPairIDs(ids ...int) *VenueCreate

AddTradingPairIDs adds the "trading_pair" edge to the TradingPair entity by IDs.

func (*VenueCreate) Exec

func (vc *VenueCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VenueCreate) ExecContext

func (c *VenueCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueCreate) ExecX

func (vc *VenueCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VenueCreate) Mutation

func (vc *VenueCreate) Mutation() *VenueMutation

Mutation returns the VenueMutation object of the builder.

func (*VenueCreate) OnConflict

func (vc *VenueCreate) OnConflict(opts ...sql.ConflictOption) *VenueUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Venue.Create().
	SetVenueID(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.VenueUpsert) {
		SetVenueID(v+v).
	}).
	Exec(ctx)

func (*VenueCreate) OnConflictColumns

func (vc *VenueCreate) OnConflictColumns(columns ...string) *VenueUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Venue.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VenueCreate) QueryContext

func (c *VenueCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueCreate) Save

func (vc *VenueCreate) Save(ctx context.Context) (*Venue, error)

Save creates the Venue in the database.

func (*VenueCreate) SaveX

func (vc *VenueCreate) SaveX(ctx context.Context) *Venue

SaveX calls Save and panics if Save returns an error.

func (*VenueCreate) SetAlertNotice

func (vc *VenueCreate) SetAlertNotice(s string) *VenueCreate

SetAlertNotice sets the "alert_notice" field.

func (*VenueCreate) SetCentralized

func (vc *VenueCreate) SetCentralized(b bool) *VenueCreate

SetCentralized sets the "centralized" field.

func (*VenueCreate) SetCountry

func (vc *VenueCreate) SetCountry(s string) *VenueCreate

SetCountry sets the "country" field.

func (*VenueCreate) SetHasTradingIncentive

func (vc *VenueCreate) SetHasTradingIncentive(b bool) *VenueCreate

SetHasTradingIncentive sets the "has_trading_incentive" field.

func (*VenueCreate) SetImage

func (vc *VenueCreate) SetImage(s string) *VenueCreate

SetImage sets the "image" field.

func (vc *VenueCreate) SetLinks(m map[string]string) *VenueCreate

SetLinks sets the "links" field.

func (*VenueCreate) SetMakerFee

func (vc *VenueCreate) SetMakerFee(f float64) *VenueCreate

SetMakerFee sets the "maker_fee" field.

func (*VenueCreate) SetName

func (vc *VenueCreate) SetName(s string) *VenueCreate

SetName sets the "name" field.

func (*VenueCreate) SetNillableAlertNotice

func (vc *VenueCreate) SetNillableAlertNotice(s *string) *VenueCreate

SetNillableAlertNotice sets the "alert_notice" field if the given value is not nil.

func (*VenueCreate) SetNillableCentralized

func (vc *VenueCreate) SetNillableCentralized(b *bool) *VenueCreate

SetNillableCentralized sets the "centralized" field if the given value is not nil.

func (*VenueCreate) SetNillableCountry

func (vc *VenueCreate) SetNillableCountry(s *string) *VenueCreate

SetNillableCountry sets the "country" field if the given value is not nil.

func (*VenueCreate) SetNillableHasTradingIncentive

func (vc *VenueCreate) SetNillableHasTradingIncentive(b *bool) *VenueCreate

SetNillableHasTradingIncentive sets the "has_trading_incentive" field if the given value is not nil.

func (*VenueCreate) SetNillableImage

func (vc *VenueCreate) SetNillableImage(s *string) *VenueCreate

SetNillableImage sets the "image" field if the given value is not nil.

func (*VenueCreate) SetNillableMakerFee

func (vc *VenueCreate) SetNillableMakerFee(f *float64) *VenueCreate

SetNillableMakerFee sets the "maker_fee" field if the given value is not nil.

func (*VenueCreate) SetNillableName

func (vc *VenueCreate) SetNillableName(s *string) *VenueCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*VenueCreate) SetNillablePublicNotice

func (vc *VenueCreate) SetNillablePublicNotice(s *string) *VenueCreate

SetNillablePublicNotice sets the "public_notice" field if the given value is not nil.

func (*VenueCreate) SetNillableSpreadFee

func (vc *VenueCreate) SetNillableSpreadFee(b *bool) *VenueCreate

SetNillableSpreadFee sets the "spread_fee" field if the given value is not nil.

func (*VenueCreate) SetNillableSupportAPI

func (vc *VenueCreate) SetNillableSupportAPI(b *bool) *VenueCreate

SetNillableSupportAPI sets the "support_api" field if the given value is not nil.

func (*VenueCreate) SetNillableTakerFee

func (vc *VenueCreate) SetNillableTakerFee(f *float64) *VenueCreate

SetNillableTakerFee sets the "taker_fee" field if the given value is not nil.

func (*VenueCreate) SetNillableTradeVolume24hBtc

func (vc *VenueCreate) SetNillableTradeVolume24hBtc(f *float64) *VenueCreate

SetNillableTradeVolume24hBtc sets the "trade_volume_24h_btc" field if the given value is not nil.

func (*VenueCreate) SetNillableTradeVolume24hBtcNormalized

func (vc *VenueCreate) SetNillableTradeVolume24hBtcNormalized(f *float64) *VenueCreate

SetNillableTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field if the given value is not nil.

func (*VenueCreate) SetNillableTrustScore

func (vc *VenueCreate) SetNillableTrustScore(i *int) *VenueCreate

SetNillableTrustScore sets the "trust_score" field if the given value is not nil.

func (*VenueCreate) SetNillableTrustScoreRank

func (vc *VenueCreate) SetNillableTrustScoreRank(i *int) *VenueCreate

SetNillableTrustScoreRank sets the "trust_score_rank" field if the given value is not nil.

func (*VenueCreate) SetNillableYearEstablished

func (vc *VenueCreate) SetNillableYearEstablished(i *int) *VenueCreate

SetNillableYearEstablished sets the "year_established" field if the given value is not nil.

func (*VenueCreate) SetPublicNotice

func (vc *VenueCreate) SetPublicNotice(s string) *VenueCreate

SetPublicNotice sets the "public_notice" field.

func (*VenueCreate) SetSpreadFee

func (vc *VenueCreate) SetSpreadFee(b bool) *VenueCreate

SetSpreadFee sets the "spread_fee" field.

func (*VenueCreate) SetSupportAPI

func (vc *VenueCreate) SetSupportAPI(b bool) *VenueCreate

SetSupportAPI sets the "support_api" field.

func (*VenueCreate) SetTakerFee

func (vc *VenueCreate) SetTakerFee(f float64) *VenueCreate

SetTakerFee sets the "taker_fee" field.

func (*VenueCreate) SetTradeVolume24hBtc

func (vc *VenueCreate) SetTradeVolume24hBtc(f float64) *VenueCreate

SetTradeVolume24hBtc sets the "trade_volume_24h_btc" field.

func (*VenueCreate) SetTradeVolume24hBtcNormalized

func (vc *VenueCreate) SetTradeVolume24hBtcNormalized(f float64) *VenueCreate

SetTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field.

func (*VenueCreate) SetTrustScore

func (vc *VenueCreate) SetTrustScore(i int) *VenueCreate

SetTrustScore sets the "trust_score" field.

func (*VenueCreate) SetTrustScoreRank

func (vc *VenueCreate) SetTrustScoreRank(i int) *VenueCreate

SetTrustScoreRank sets the "trust_score_rank" field.

func (*VenueCreate) SetType

func (vc *VenueCreate) SetType(v venue.Type) *VenueCreate

SetType sets the "type" field.

func (*VenueCreate) SetVenueID

func (vc *VenueCreate) SetVenueID(s string) *VenueCreate

SetVenueID sets the "venue_id" field.

func (*VenueCreate) SetYearEstablished

func (vc *VenueCreate) SetYearEstablished(i int) *VenueCreate

SetYearEstablished sets the "year_established" field.

type VenueCreateBulk

type VenueCreateBulk struct {
	// contains filtered or unexported fields
}

VenueCreateBulk is the builder for creating many Venue entities in bulk.

func (*VenueCreateBulk) Exec

func (vcb *VenueCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VenueCreateBulk) ExecContext

func (c *VenueCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueCreateBulk) ExecX

func (vcb *VenueCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VenueCreateBulk) OnConflict

func (vcb *VenueCreateBulk) OnConflict(opts ...sql.ConflictOption) *VenueUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Venue.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.VenueUpsert) {
		SetVenueID(v+v).
	}).
	Exec(ctx)

func (*VenueCreateBulk) OnConflictColumns

func (vcb *VenueCreateBulk) OnConflictColumns(columns ...string) *VenueUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Venue.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VenueCreateBulk) QueryContext

func (c *VenueCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueCreateBulk) Save

func (vcb *VenueCreateBulk) Save(ctx context.Context) ([]*Venue, error)

Save creates the Venue entities in the database.

func (*VenueCreateBulk) SaveX

func (vcb *VenueCreateBulk) SaveX(ctx context.Context) []*Venue

SaveX is like Save, but panics if an error occurs.

type VenueDelete

type VenueDelete struct {
	// contains filtered or unexported fields
}

VenueDelete is the builder for deleting a Venue entity.

func (*VenueDelete) Exec

func (vd *VenueDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VenueDelete) ExecContext

func (c *VenueDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueDelete) ExecX

func (vd *VenueDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VenueDelete) QueryContext

func (c *VenueDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueDelete) Where

func (vd *VenueDelete) Where(ps ...predicate.Venue) *VenueDelete

Where appends a list predicates to the VenueDelete builder.

type VenueDeleteOne

type VenueDeleteOne struct {
	// contains filtered or unexported fields
}

VenueDeleteOne is the builder for deleting a single Venue entity.

func (*VenueDeleteOne) Exec

func (vdo *VenueDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VenueDeleteOne) ExecX

func (vdo *VenueDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VenueDeleteOne) Where

func (vdo *VenueDeleteOne) Where(ps ...predicate.Venue) *VenueDeleteOne

Where appends a list predicates to the VenueDelete builder.

type VenueEdge

type VenueEdge struct {
	Node   *Venue `json:"node"`
	Cursor Cursor `json:"cursor"`
}

VenueEdge is the edge representation of Venue.

type VenueEdges

type VenueEdges struct {
	// Ticker holds the value of the ticker edge.
	Ticker []*Ticker `json:"ticker,omitempty"`
	// TradingPair holds the value of the trading_pair edge.
	TradingPair []*TradingPair `json:"trading_pair,omitempty"`
	// Market holds the value of the market edge.
	Market []*Market `json:"market,omitempty"`
	// contains filtered or unexported fields
}

VenueEdges holds the relations/edges for other nodes in the graph.

func (VenueEdges) MarketOrErr

func (e VenueEdges) MarketOrErr() ([]*Market, error)

MarketOrErr returns the Market value or an error if the edge was not loaded in eager-loading.

func (VenueEdges) TickerOrErr

func (e VenueEdges) TickerOrErr() ([]*Ticker, error)

TickerOrErr returns the Ticker value or an error if the edge was not loaded in eager-loading.

func (VenueEdges) TradingPairOrErr

func (e VenueEdges) TradingPairOrErr() ([]*TradingPair, error)

TradingPairOrErr returns the TradingPair value or an error if the edge was not loaded in eager-loading.

type VenueFilter

type VenueFilter struct {
	// contains filtered or unexported fields
}

VenueFilter provides a generic filtering capability at runtime for VenueQuery.

func (*VenueFilter) ExecContext

func (c *VenueFilter) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueFilter) QueryContext

func (c *VenueFilter) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueFilter) Where

func (f *VenueFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*VenueFilter) WhereAlertNotice

func (f *VenueFilter) WhereAlertNotice(p entql.StringP)

WhereAlertNotice applies the entql string predicate on the alert_notice field.

func (*VenueFilter) WhereCentralized

func (f *VenueFilter) WhereCentralized(p entql.BoolP)

WhereCentralized applies the entql bool predicate on the centralized field.

func (*VenueFilter) WhereCountry

func (f *VenueFilter) WhereCountry(p entql.StringP)

WhereCountry applies the entql string predicate on the country field.

func (*VenueFilter) WhereHasMarket

func (f *VenueFilter) WhereHasMarket()

WhereHasMarket applies a predicate to check if query has an edge market.

func (*VenueFilter) WhereHasMarketWith

func (f *VenueFilter) WhereHasMarketWith(preds ...predicate.Market)

WhereHasMarketWith applies a predicate to check if query has an edge market with a given conditions (other predicates).

func (*VenueFilter) WhereHasTicker

func (f *VenueFilter) WhereHasTicker()

WhereHasTicker applies a predicate to check if query has an edge ticker.

func (*VenueFilter) WhereHasTickerWith

func (f *VenueFilter) WhereHasTickerWith(preds ...predicate.Ticker)

WhereHasTickerWith applies a predicate to check if query has an edge ticker with a given conditions (other predicates).

func (*VenueFilter) WhereHasTradingIncentive

func (f *VenueFilter) WhereHasTradingIncentive(p entql.BoolP)

WhereHasTradingIncentive applies the entql bool predicate on the has_trading_incentive field.

func (*VenueFilter) WhereHasTradingPair

func (f *VenueFilter) WhereHasTradingPair()

WhereHasTradingPair applies a predicate to check if query has an edge trading_pair.

func (*VenueFilter) WhereHasTradingPairWith

func (f *VenueFilter) WhereHasTradingPairWith(preds ...predicate.TradingPair)

WhereHasTradingPairWith applies a predicate to check if query has an edge trading_pair with a given conditions (other predicates).

func (*VenueFilter) WhereID

func (f *VenueFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*VenueFilter) WhereImage

func (f *VenueFilter) WhereImage(p entql.StringP)

WhereImage applies the entql string predicate on the image field.

func (f *VenueFilter) WhereLinks(p entql.BytesP)

WhereLinks applies the entql json.RawMessage predicate on the links field.

func (*VenueFilter) WhereMakerFee

func (f *VenueFilter) WhereMakerFee(p entql.Float64P)

WhereMakerFee applies the entql float64 predicate on the maker_fee field.

func (*VenueFilter) WhereName

func (f *VenueFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*VenueFilter) WherePublicNotice

func (f *VenueFilter) WherePublicNotice(p entql.StringP)

WherePublicNotice applies the entql string predicate on the public_notice field.

func (*VenueFilter) WhereSpreadFee

func (f *VenueFilter) WhereSpreadFee(p entql.BoolP)

WhereSpreadFee applies the entql bool predicate on the spread_fee field.

func (*VenueFilter) WhereSupportAPI

func (f *VenueFilter) WhereSupportAPI(p entql.BoolP)

WhereSupportAPI applies the entql bool predicate on the support_api field.

func (*VenueFilter) WhereTakerFee

func (f *VenueFilter) WhereTakerFee(p entql.Float64P)

WhereTakerFee applies the entql float64 predicate on the taker_fee field.

func (*VenueFilter) WhereTradeVolume24hBtc

func (f *VenueFilter) WhereTradeVolume24hBtc(p entql.Float64P)

WhereTradeVolume24hBtc applies the entql float64 predicate on the trade_volume_24h_btc field.

func (*VenueFilter) WhereTradeVolume24hBtcNormalized

func (f *VenueFilter) WhereTradeVolume24hBtcNormalized(p entql.Float64P)

WhereTradeVolume24hBtcNormalized applies the entql float64 predicate on the trade_volume_24h_btc_normalized field.

func (*VenueFilter) WhereTrustScore

func (f *VenueFilter) WhereTrustScore(p entql.IntP)

WhereTrustScore applies the entql int predicate on the trust_score field.

func (*VenueFilter) WhereTrustScoreRank

func (f *VenueFilter) WhereTrustScoreRank(p entql.IntP)

WhereTrustScoreRank applies the entql int predicate on the trust_score_rank field.

func (*VenueFilter) WhereType

func (f *VenueFilter) WhereType(p entql.StringP)

WhereType applies the entql string predicate on the type field.

func (*VenueFilter) WhereVenueID

func (f *VenueFilter) WhereVenueID(p entql.StringP)

WhereVenueID applies the entql string predicate on the venue_id field.

func (*VenueFilter) WhereYearEstablished

func (f *VenueFilter) WhereYearEstablished(p entql.IntP)

WhereYearEstablished applies the entql int predicate on the year_established field.

type VenueGroupBy

type VenueGroupBy struct {
	// contains filtered or unexported fields
}

VenueGroupBy is the group-by builder for Venue entities.

func (*VenueGroupBy) Aggregate

func (vgb *VenueGroupBy) Aggregate(fns ...AggregateFunc) *VenueGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*VenueGroupBy) Bool

func (s *VenueGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VenueGroupBy) BoolX

func (s *VenueGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VenueGroupBy) Bools

func (s *VenueGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VenueGroupBy) BoolsX

func (s *VenueGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VenueGroupBy) Float64

func (s *VenueGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VenueGroupBy) Float64X

func (s *VenueGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VenueGroupBy) Float64s

func (s *VenueGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VenueGroupBy) Float64sX

func (s *VenueGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VenueGroupBy) Int

func (s *VenueGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VenueGroupBy) IntX

func (s *VenueGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VenueGroupBy) Ints

func (s *VenueGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VenueGroupBy) IntsX

func (s *VenueGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VenueGroupBy) Scan

func (vgb *VenueGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VenueGroupBy) ScanX

func (s *VenueGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VenueGroupBy) String

func (s *VenueGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VenueGroupBy) StringX

func (s *VenueGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VenueGroupBy) Strings

func (s *VenueGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VenueGroupBy) StringsX

func (s *VenueGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VenueMutation

type VenueMutation struct {
	// contains filtered or unexported fields
}

VenueMutation represents an operation that mutates the Venue nodes in the graph.

func (*VenueMutation) AddField

func (m *VenueMutation) 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 (*VenueMutation) AddMakerFee

func (m *VenueMutation) AddMakerFee(f float64)

AddMakerFee adds f to the "maker_fee" field.

func (*VenueMutation) AddMarketIDs

func (m *VenueMutation) AddMarketIDs(ids ...int)

AddMarketIDs adds the "market" edge to the Market entity by ids.

func (*VenueMutation) AddTakerFee

func (m *VenueMutation) AddTakerFee(f float64)

AddTakerFee adds f to the "taker_fee" field.

func (*VenueMutation) AddTickerIDs

func (m *VenueMutation) AddTickerIDs(ids ...int)

AddTickerIDs adds the "ticker" edge to the Ticker entity by ids.

func (*VenueMutation) AddTradeVolume24hBtc

func (m *VenueMutation) AddTradeVolume24hBtc(f float64)

AddTradeVolume24hBtc adds f to the "trade_volume_24h_btc" field.

func (*VenueMutation) AddTradeVolume24hBtcNormalized

func (m *VenueMutation) AddTradeVolume24hBtcNormalized(f float64)

AddTradeVolume24hBtcNormalized adds f to the "trade_volume_24h_btc_normalized" field.

func (*VenueMutation) AddTradingPairIDs

func (m *VenueMutation) AddTradingPairIDs(ids ...int)

AddTradingPairIDs adds the "trading_pair" edge to the TradingPair entity by ids.

func (*VenueMutation) AddTrustScore

func (m *VenueMutation) AddTrustScore(i int)

AddTrustScore adds i to the "trust_score" field.

func (*VenueMutation) AddTrustScoreRank

func (m *VenueMutation) AddTrustScoreRank(i int)

AddTrustScoreRank adds i to the "trust_score_rank" field.

func (*VenueMutation) AddYearEstablished

func (m *VenueMutation) AddYearEstablished(i int)

AddYearEstablished adds i to the "year_established" field.

func (*VenueMutation) AddedEdges

func (m *VenueMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VenueMutation) AddedField

func (m *VenueMutation) 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 (*VenueMutation) AddedFields

func (m *VenueMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VenueMutation) AddedIDs

func (m *VenueMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VenueMutation) AddedMakerFee

func (m *VenueMutation) AddedMakerFee() (r float64, exists bool)

AddedMakerFee returns the value that was added to the "maker_fee" field in this mutation.

func (*VenueMutation) AddedTakerFee

func (m *VenueMutation) AddedTakerFee() (r float64, exists bool)

AddedTakerFee returns the value that was added to the "taker_fee" field in this mutation.

func (*VenueMutation) AddedTradeVolume24hBtc

func (m *VenueMutation) AddedTradeVolume24hBtc() (r float64, exists bool)

AddedTradeVolume24hBtc returns the value that was added to the "trade_volume_24h_btc" field in this mutation.

func (*VenueMutation) AddedTradeVolume24hBtcNormalized

func (m *VenueMutation) AddedTradeVolume24hBtcNormalized() (r float64, exists bool)

AddedTradeVolume24hBtcNormalized returns the value that was added to the "trade_volume_24h_btc_normalized" field in this mutation.

func (*VenueMutation) AddedTrustScore

func (m *VenueMutation) AddedTrustScore() (r int, exists bool)

AddedTrustScore returns the value that was added to the "trust_score" field in this mutation.

func (*VenueMutation) AddedTrustScoreRank

func (m *VenueMutation) AddedTrustScoreRank() (r int, exists bool)

AddedTrustScoreRank returns the value that was added to the "trust_score_rank" field in this mutation.

func (*VenueMutation) AddedYearEstablished

func (m *VenueMutation) AddedYearEstablished() (r int, exists bool)

AddedYearEstablished returns the value that was added to the "year_established" field in this mutation.

func (*VenueMutation) AlertNotice

func (m *VenueMutation) AlertNotice() (r string, exists bool)

AlertNotice returns the value of the "alert_notice" field in the mutation.

func (*VenueMutation) AlertNoticeCleared

func (m *VenueMutation) AlertNoticeCleared() bool

AlertNoticeCleared returns if the "alert_notice" field was cleared in this mutation.

func (*VenueMutation) Centralized

func (m *VenueMutation) Centralized() (r bool, exists bool)

Centralized returns the value of the "centralized" field in the mutation.

func (*VenueMutation) CentralizedCleared

func (m *VenueMutation) CentralizedCleared() bool

CentralizedCleared returns if the "centralized" field was cleared in this mutation.

func (*VenueMutation) ClearAlertNotice

func (m *VenueMutation) ClearAlertNotice()

ClearAlertNotice clears the value of the "alert_notice" field.

func (*VenueMutation) ClearCentralized

func (m *VenueMutation) ClearCentralized()

ClearCentralized clears the value of the "centralized" field.

func (*VenueMutation) ClearCountry

func (m *VenueMutation) ClearCountry()

ClearCountry clears the value of the "country" field.

func (*VenueMutation) ClearEdge

func (m *VenueMutation) 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 (*VenueMutation) ClearField

func (m *VenueMutation) 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 (*VenueMutation) ClearHasTradingIncentive

func (m *VenueMutation) ClearHasTradingIncentive()

ClearHasTradingIncentive clears the value of the "has_trading_incentive" field.

func (*VenueMutation) ClearImage

func (m *VenueMutation) ClearImage()

ClearImage clears the value of the "image" field.

func (m *VenueMutation) ClearLinks()

ClearLinks clears the value of the "links" field.

func (*VenueMutation) ClearMakerFee

func (m *VenueMutation) ClearMakerFee()

ClearMakerFee clears the value of the "maker_fee" field.

func (*VenueMutation) ClearMarket

func (m *VenueMutation) ClearMarket()

ClearMarket clears the "market" edge to the Market entity.

func (*VenueMutation) ClearName

func (m *VenueMutation) ClearName()

ClearName clears the value of the "name" field.

func (*VenueMutation) ClearPublicNotice

func (m *VenueMutation) ClearPublicNotice()

ClearPublicNotice clears the value of the "public_notice" field.

func (*VenueMutation) ClearSpreadFee

func (m *VenueMutation) ClearSpreadFee()

ClearSpreadFee clears the value of the "spread_fee" field.

func (*VenueMutation) ClearSupportAPI

func (m *VenueMutation) ClearSupportAPI()

ClearSupportAPI clears the value of the "support_api" field.

func (*VenueMutation) ClearTakerFee

func (m *VenueMutation) ClearTakerFee()

ClearTakerFee clears the value of the "taker_fee" field.

func (*VenueMutation) ClearTicker

func (m *VenueMutation) ClearTicker()

ClearTicker clears the "ticker" edge to the Ticker entity.

func (*VenueMutation) ClearTradeVolume24hBtc

func (m *VenueMutation) ClearTradeVolume24hBtc()

ClearTradeVolume24hBtc clears the value of the "trade_volume_24h_btc" field.

func (*VenueMutation) ClearTradeVolume24hBtcNormalized

func (m *VenueMutation) ClearTradeVolume24hBtcNormalized()

ClearTradeVolume24hBtcNormalized clears the value of the "trade_volume_24h_btc_normalized" field.

func (*VenueMutation) ClearTradingPair

func (m *VenueMutation) ClearTradingPair()

ClearTradingPair clears the "trading_pair" edge to the TradingPair entity.

func (*VenueMutation) ClearTrustScore

func (m *VenueMutation) ClearTrustScore()

ClearTrustScore clears the value of the "trust_score" field.

func (*VenueMutation) ClearTrustScoreRank

func (m *VenueMutation) ClearTrustScoreRank()

ClearTrustScoreRank clears the value of the "trust_score_rank" field.

func (*VenueMutation) ClearYearEstablished

func (m *VenueMutation) ClearYearEstablished()

ClearYearEstablished clears the value of the "year_established" field.

func (*VenueMutation) ClearedEdges

func (m *VenueMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VenueMutation) ClearedFields

func (m *VenueMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VenueMutation) Client

func (m VenueMutation) 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 (*VenueMutation) Country

func (m *VenueMutation) Country() (r string, exists bool)

Country returns the value of the "country" field in the mutation.

func (*VenueMutation) CountryCleared

func (m *VenueMutation) CountryCleared() bool

CountryCleared returns if the "country" field was cleared in this mutation.

func (*VenueMutation) EdgeCleared

func (m *VenueMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VenueMutation) ExecContext

func (c *VenueMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueMutation) Field

func (m *VenueMutation) 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 (*VenueMutation) FieldCleared

func (m *VenueMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VenueMutation) Fields

func (m *VenueMutation) 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 (*VenueMutation) Filter

func (m *VenueMutation) Filter() *VenueFilter

Filter returns an entql.Where implementation to apply filters on the VenueMutation builder.

func (*VenueMutation) GetType

func (m *VenueMutation) GetType() (r venue.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*VenueMutation) HasTradingIncentive

func (m *VenueMutation) HasTradingIncentive() (r bool, exists bool)

HasTradingIncentive returns the value of the "has_trading_incentive" field in the mutation.

func (*VenueMutation) HasTradingIncentiveCleared

func (m *VenueMutation) HasTradingIncentiveCleared() bool

HasTradingIncentiveCleared returns if the "has_trading_incentive" field was cleared in this mutation.

func (*VenueMutation) ID

func (m *VenueMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*VenueMutation) IDs

func (m *VenueMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*VenueMutation) Image

func (m *VenueMutation) Image() (r string, exists bool)

Image returns the value of the "image" field in the mutation.

func (*VenueMutation) ImageCleared

func (m *VenueMutation) ImageCleared() bool

ImageCleared returns if the "image" field was cleared in this mutation.

func (m *VenueMutation) Links() (r map[string]string, exists bool)

Links returns the value of the "links" field in the mutation.

func (*VenueMutation) LinksCleared

func (m *VenueMutation) LinksCleared() bool

LinksCleared returns if the "links" field was cleared in this mutation.

func (*VenueMutation) MakerFee

func (m *VenueMutation) MakerFee() (r float64, exists bool)

MakerFee returns the value of the "maker_fee" field in the mutation.

func (*VenueMutation) MakerFeeCleared

func (m *VenueMutation) MakerFeeCleared() bool

MakerFeeCleared returns if the "maker_fee" field was cleared in this mutation.

func (*VenueMutation) MarketCleared

func (m *VenueMutation) MarketCleared() bool

MarketCleared reports if the "market" edge to the Market entity was cleared.

func (*VenueMutation) MarketIDs

func (m *VenueMutation) MarketIDs() (ids []int)

MarketIDs returns the "market" edge IDs in the mutation.

func (*VenueMutation) Name

func (m *VenueMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*VenueMutation) NameCleared

func (m *VenueMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*VenueMutation) OldAlertNotice

func (m *VenueMutation) OldAlertNotice(ctx context.Context) (v string, err error)

OldAlertNotice returns the old "alert_notice" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldCentralized

func (m *VenueMutation) OldCentralized(ctx context.Context) (v bool, err error)

OldCentralized returns the old "centralized" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldCountry

func (m *VenueMutation) OldCountry(ctx context.Context) (v string, err error)

OldCountry returns the old "country" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldField

func (m *VenueMutation) 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 (*VenueMutation) OldHasTradingIncentive

func (m *VenueMutation) OldHasTradingIncentive(ctx context.Context) (v bool, err error)

OldHasTradingIncentive returns the old "has_trading_incentive" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldImage

func (m *VenueMutation) OldImage(ctx context.Context) (v string, err error)

OldImage returns the old "image" field's value of the Venue entity. If the Venue 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 (m *VenueMutation) OldLinks(ctx context.Context) (v map[string]string, err error)

OldLinks returns the old "links" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldMakerFee

func (m *VenueMutation) OldMakerFee(ctx context.Context) (v float64, err error)

OldMakerFee returns the old "maker_fee" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldName

func (m *VenueMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldPublicNotice

func (m *VenueMutation) OldPublicNotice(ctx context.Context) (v string, err error)

OldPublicNotice returns the old "public_notice" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldSpreadFee

func (m *VenueMutation) OldSpreadFee(ctx context.Context) (v bool, err error)

OldSpreadFee returns the old "spread_fee" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldSupportAPI

func (m *VenueMutation) OldSupportAPI(ctx context.Context) (v bool, err error)

OldSupportAPI returns the old "support_api" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldTakerFee

func (m *VenueMutation) OldTakerFee(ctx context.Context) (v float64, err error)

OldTakerFee returns the old "taker_fee" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldTradeVolume24hBtc

func (m *VenueMutation) OldTradeVolume24hBtc(ctx context.Context) (v float64, err error)

OldTradeVolume24hBtc returns the old "trade_volume_24h_btc" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldTradeVolume24hBtcNormalized

func (m *VenueMutation) OldTradeVolume24hBtcNormalized(ctx context.Context) (v float64, err error)

OldTradeVolume24hBtcNormalized returns the old "trade_volume_24h_btc_normalized" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldTrustScore

func (m *VenueMutation) OldTrustScore(ctx context.Context) (v int, err error)

OldTrustScore returns the old "trust_score" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldTrustScoreRank

func (m *VenueMutation) OldTrustScoreRank(ctx context.Context) (v int, err error)

OldTrustScoreRank returns the old "trust_score_rank" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldType

func (m *VenueMutation) OldType(ctx context.Context) (v venue.Type, err error)

OldType returns the old "type" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldVenueID

func (m *VenueMutation) OldVenueID(ctx context.Context) (v string, err error)

OldVenueID returns the old "venue_id" field's value of the Venue entity. If the Venue 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 (*VenueMutation) OldYearEstablished

func (m *VenueMutation) OldYearEstablished(ctx context.Context) (v int, err error)

OldYearEstablished returns the old "year_established" field's value of the Venue entity. If the Venue 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 (*VenueMutation) Op

func (m *VenueMutation) Op() Op

Op returns the operation name.

func (*VenueMutation) PublicNotice

func (m *VenueMutation) PublicNotice() (r string, exists bool)

PublicNotice returns the value of the "public_notice" field in the mutation.

func (*VenueMutation) PublicNoticeCleared

func (m *VenueMutation) PublicNoticeCleared() bool

PublicNoticeCleared returns if the "public_notice" field was cleared in this mutation.

func (*VenueMutation) QueryContext

func (c *VenueMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueMutation) RemoveMarketIDs

func (m *VenueMutation) RemoveMarketIDs(ids ...int)

RemoveMarketIDs removes the "market" edge to the Market entity by IDs.

func (*VenueMutation) RemoveTickerIDs

func (m *VenueMutation) RemoveTickerIDs(ids ...int)

RemoveTickerIDs removes the "ticker" edge to the Ticker entity by IDs.

func (*VenueMutation) RemoveTradingPairIDs

func (m *VenueMutation) RemoveTradingPairIDs(ids ...int)

RemoveTradingPairIDs removes the "trading_pair" edge to the TradingPair entity by IDs.

func (*VenueMutation) RemovedEdges

func (m *VenueMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VenueMutation) RemovedIDs

func (m *VenueMutation) 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 (*VenueMutation) RemovedMarketIDs

func (m *VenueMutation) RemovedMarketIDs() (ids []int)

RemovedMarket returns the removed IDs of the "market" edge to the Market entity.

func (*VenueMutation) RemovedTickerIDs

func (m *VenueMutation) RemovedTickerIDs() (ids []int)

RemovedTicker returns the removed IDs of the "ticker" edge to the Ticker entity.

func (*VenueMutation) RemovedTradingPairIDs

func (m *VenueMutation) RemovedTradingPairIDs() (ids []int)

RemovedTradingPair returns the removed IDs of the "trading_pair" edge to the TradingPair entity.

func (*VenueMutation) ResetAlertNotice

func (m *VenueMutation) ResetAlertNotice()

ResetAlertNotice resets all changes to the "alert_notice" field.

func (*VenueMutation) ResetCentralized

func (m *VenueMutation) ResetCentralized()

ResetCentralized resets all changes to the "centralized" field.

func (*VenueMutation) ResetCountry

func (m *VenueMutation) ResetCountry()

ResetCountry resets all changes to the "country" field.

func (*VenueMutation) ResetEdge

func (m *VenueMutation) 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 (*VenueMutation) ResetField

func (m *VenueMutation) 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 (*VenueMutation) ResetHasTradingIncentive

func (m *VenueMutation) ResetHasTradingIncentive()

ResetHasTradingIncentive resets all changes to the "has_trading_incentive" field.

func (*VenueMutation) ResetImage

func (m *VenueMutation) ResetImage()

ResetImage resets all changes to the "image" field.

func (m *VenueMutation) ResetLinks()

ResetLinks resets all changes to the "links" field.

func (*VenueMutation) ResetMakerFee

func (m *VenueMutation) ResetMakerFee()

ResetMakerFee resets all changes to the "maker_fee" field.

func (*VenueMutation) ResetMarket

func (m *VenueMutation) ResetMarket()

ResetMarket resets all changes to the "market" edge.

func (*VenueMutation) ResetName

func (m *VenueMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*VenueMutation) ResetPublicNotice

func (m *VenueMutation) ResetPublicNotice()

ResetPublicNotice resets all changes to the "public_notice" field.

func (*VenueMutation) ResetSpreadFee

func (m *VenueMutation) ResetSpreadFee()

ResetSpreadFee resets all changes to the "spread_fee" field.

func (*VenueMutation) ResetSupportAPI

func (m *VenueMutation) ResetSupportAPI()

ResetSupportAPI resets all changes to the "support_api" field.

func (*VenueMutation) ResetTakerFee

func (m *VenueMutation) ResetTakerFee()

ResetTakerFee resets all changes to the "taker_fee" field.

func (*VenueMutation) ResetTicker

func (m *VenueMutation) ResetTicker()

ResetTicker resets all changes to the "ticker" edge.

func (*VenueMutation) ResetTradeVolume24hBtc

func (m *VenueMutation) ResetTradeVolume24hBtc()

ResetTradeVolume24hBtc resets all changes to the "trade_volume_24h_btc" field.

func (*VenueMutation) ResetTradeVolume24hBtcNormalized

func (m *VenueMutation) ResetTradeVolume24hBtcNormalized()

ResetTradeVolume24hBtcNormalized resets all changes to the "trade_volume_24h_btc_normalized" field.

func (*VenueMutation) ResetTradingPair

func (m *VenueMutation) ResetTradingPair()

ResetTradingPair resets all changes to the "trading_pair" edge.

func (*VenueMutation) ResetTrustScore

func (m *VenueMutation) ResetTrustScore()

ResetTrustScore resets all changes to the "trust_score" field.

func (*VenueMutation) ResetTrustScoreRank

func (m *VenueMutation) ResetTrustScoreRank()

ResetTrustScoreRank resets all changes to the "trust_score_rank" field.

func (*VenueMutation) ResetType

func (m *VenueMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*VenueMutation) ResetVenueID

func (m *VenueMutation) ResetVenueID()

ResetVenueID resets all changes to the "venue_id" field.

func (*VenueMutation) ResetYearEstablished

func (m *VenueMutation) ResetYearEstablished()

ResetYearEstablished resets all changes to the "year_established" field.

func (*VenueMutation) SetAlertNotice

func (m *VenueMutation) SetAlertNotice(s string)

SetAlertNotice sets the "alert_notice" field.

func (*VenueMutation) SetCentralized

func (m *VenueMutation) SetCentralized(b bool)

SetCentralized sets the "centralized" field.

func (*VenueMutation) SetCountry

func (m *VenueMutation) SetCountry(s string)

SetCountry sets the "country" field.

func (*VenueMutation) SetField

func (m *VenueMutation) 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 (*VenueMutation) SetHasTradingIncentive

func (m *VenueMutation) SetHasTradingIncentive(b bool)

SetHasTradingIncentive sets the "has_trading_incentive" field.

func (*VenueMutation) SetImage

func (m *VenueMutation) SetImage(s string)

SetImage sets the "image" field.

func (m *VenueMutation) SetLinks(value map[string]string)

SetLinks sets the "links" field.

func (*VenueMutation) SetMakerFee

func (m *VenueMutation) SetMakerFee(f float64)

SetMakerFee sets the "maker_fee" field.

func (*VenueMutation) SetName

func (m *VenueMutation) SetName(s string)

SetName sets the "name" field.

func (*VenueMutation) SetOp

func (m *VenueMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VenueMutation) SetPublicNotice

func (m *VenueMutation) SetPublicNotice(s string)

SetPublicNotice sets the "public_notice" field.

func (*VenueMutation) SetSpreadFee

func (m *VenueMutation) SetSpreadFee(b bool)

SetSpreadFee sets the "spread_fee" field.

func (*VenueMutation) SetSupportAPI

func (m *VenueMutation) SetSupportAPI(b bool)

SetSupportAPI sets the "support_api" field.

func (*VenueMutation) SetTakerFee

func (m *VenueMutation) SetTakerFee(f float64)

SetTakerFee sets the "taker_fee" field.

func (*VenueMutation) SetTradeVolume24hBtc

func (m *VenueMutation) SetTradeVolume24hBtc(f float64)

SetTradeVolume24hBtc sets the "trade_volume_24h_btc" field.

func (*VenueMutation) SetTradeVolume24hBtcNormalized

func (m *VenueMutation) SetTradeVolume24hBtcNormalized(f float64)

SetTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field.

func (*VenueMutation) SetTrustScore

func (m *VenueMutation) SetTrustScore(i int)

SetTrustScore sets the "trust_score" field.

func (*VenueMutation) SetTrustScoreRank

func (m *VenueMutation) SetTrustScoreRank(i int)

SetTrustScoreRank sets the "trust_score_rank" field.

func (*VenueMutation) SetType

func (m *VenueMutation) SetType(v venue.Type)

SetType sets the "type" field.

func (*VenueMutation) SetVenueID

func (m *VenueMutation) SetVenueID(s string)

SetVenueID sets the "venue_id" field.

func (*VenueMutation) SetYearEstablished

func (m *VenueMutation) SetYearEstablished(i int)

SetYearEstablished sets the "year_established" field.

func (*VenueMutation) SpreadFee

func (m *VenueMutation) SpreadFee() (r bool, exists bool)

SpreadFee returns the value of the "spread_fee" field in the mutation.

func (*VenueMutation) SpreadFeeCleared

func (m *VenueMutation) SpreadFeeCleared() bool

SpreadFeeCleared returns if the "spread_fee" field was cleared in this mutation.

func (*VenueMutation) SupportAPI

func (m *VenueMutation) SupportAPI() (r bool, exists bool)

SupportAPI returns the value of the "support_api" field in the mutation.

func (*VenueMutation) SupportAPICleared

func (m *VenueMutation) SupportAPICleared() bool

SupportAPICleared returns if the "support_api" field was cleared in this mutation.

func (*VenueMutation) TakerFee

func (m *VenueMutation) TakerFee() (r float64, exists bool)

TakerFee returns the value of the "taker_fee" field in the mutation.

func (*VenueMutation) TakerFeeCleared

func (m *VenueMutation) TakerFeeCleared() bool

TakerFeeCleared returns if the "taker_fee" field was cleared in this mutation.

func (*VenueMutation) TickerCleared

func (m *VenueMutation) TickerCleared() bool

TickerCleared reports if the "ticker" edge to the Ticker entity was cleared.

func (*VenueMutation) TickerIDs

func (m *VenueMutation) TickerIDs() (ids []int)

TickerIDs returns the "ticker" edge IDs in the mutation.

func (*VenueMutation) TradeVolume24hBtc

func (m *VenueMutation) TradeVolume24hBtc() (r float64, exists bool)

TradeVolume24hBtc returns the value of the "trade_volume_24h_btc" field in the mutation.

func (*VenueMutation) TradeVolume24hBtcCleared

func (m *VenueMutation) TradeVolume24hBtcCleared() bool

TradeVolume24hBtcCleared returns if the "trade_volume_24h_btc" field was cleared in this mutation.

func (*VenueMutation) TradeVolume24hBtcNormalized

func (m *VenueMutation) TradeVolume24hBtcNormalized() (r float64, exists bool)

TradeVolume24hBtcNormalized returns the value of the "trade_volume_24h_btc_normalized" field in the mutation.

func (*VenueMutation) TradeVolume24hBtcNormalizedCleared

func (m *VenueMutation) TradeVolume24hBtcNormalizedCleared() bool

TradeVolume24hBtcNormalizedCleared returns if the "trade_volume_24h_btc_normalized" field was cleared in this mutation.

func (*VenueMutation) TradingPairCleared

func (m *VenueMutation) TradingPairCleared() bool

TradingPairCleared reports if the "trading_pair" edge to the TradingPair entity was cleared.

func (*VenueMutation) TradingPairIDs

func (m *VenueMutation) TradingPairIDs() (ids []int)

TradingPairIDs returns the "trading_pair" edge IDs in the mutation.

func (*VenueMutation) TrustScore

func (m *VenueMutation) TrustScore() (r int, exists bool)

TrustScore returns the value of the "trust_score" field in the mutation.

func (*VenueMutation) TrustScoreCleared

func (m *VenueMutation) TrustScoreCleared() bool

TrustScoreCleared returns if the "trust_score" field was cleared in this mutation.

func (*VenueMutation) TrustScoreRank

func (m *VenueMutation) TrustScoreRank() (r int, exists bool)

TrustScoreRank returns the value of the "trust_score_rank" field in the mutation.

func (*VenueMutation) TrustScoreRankCleared

func (m *VenueMutation) TrustScoreRankCleared() bool

TrustScoreRankCleared returns if the "trust_score_rank" field was cleared in this mutation.

func (VenueMutation) Tx

func (m VenueMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VenueMutation) Type

func (m *VenueMutation) Type() string

Type returns the node type of this mutation (Venue).

func (*VenueMutation) VenueID

func (m *VenueMutation) VenueID() (r string, exists bool)

VenueID returns the value of the "venue_id" field in the mutation.

func (*VenueMutation) Where

func (m *VenueMutation) Where(ps ...predicate.Venue)

Where appends a list predicates to the VenueMutation builder.

func (*VenueMutation) WhereP

func (m *VenueMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VenueMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*VenueMutation) YearEstablished

func (m *VenueMutation) YearEstablished() (r int, exists bool)

YearEstablished returns the value of the "year_established" field in the mutation.

func (*VenueMutation) YearEstablishedCleared

func (m *VenueMutation) YearEstablishedCleared() bool

YearEstablishedCleared returns if the "year_established" field was cleared in this mutation.

type VenueOrder

type VenueOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *VenueOrderField `json:"field"`
}

VenueOrder defines the ordering of Venue.

type VenueOrderField

type VenueOrderField struct {
	// contains filtered or unexported fields
}

VenueOrderField defines the ordering field of Venue.

func (VenueOrderField) MarshalGQL

func (f VenueOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (VenueOrderField) String

func (f VenueOrderField) String() string

String implement fmt.Stringer interface.

func (*VenueOrderField) UnmarshalGQL

func (f *VenueOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type VenuePaginateOption

type VenuePaginateOption func(*venuePager) error

VenuePaginateOption enables pagination customization.

func WithVenueFilter

func WithVenueFilter(filter func(*VenueQuery) (*VenueQuery, error)) VenuePaginateOption

WithVenueFilter configures pagination filter.

func WithVenueOrder

func WithVenueOrder(order *VenueOrder) VenuePaginateOption

WithVenueOrder configures pagination ordering.

type VenueQuery

type VenueQuery struct {
	// contains filtered or unexported fields
}

VenueQuery is the builder for querying Venue entities.

func (*VenueQuery) Aggregate

func (vq *VenueQuery) Aggregate(fns ...AggregateFunc) *VenueSelect

Aggregate returns a VenueSelect configured with the given aggregations.

func (*VenueQuery) All

func (vq *VenueQuery) All(ctx context.Context) ([]*Venue, error)

All executes the query and returns a list of Venues.

func (*VenueQuery) AllX

func (vq *VenueQuery) AllX(ctx context.Context) []*Venue

AllX is like All, but panics if an error occurs.

func (*VenueQuery) Clone

func (vq *VenueQuery) Clone() *VenueQuery

Clone returns a duplicate of the VenueQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VenueQuery) CollectFields

func (v *VenueQuery) CollectFields(ctx context.Context, satisfies ...string) (*VenueQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*VenueQuery) Count

func (vq *VenueQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VenueQuery) CountX

func (vq *VenueQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VenueQuery) ExecContext

func (c *VenueQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueQuery) Exist

func (vq *VenueQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VenueQuery) ExistX

func (vq *VenueQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VenueQuery) Filter

func (vq *VenueQuery) Filter() *VenueFilter

Filter returns a Filter implementation to apply filters on the VenueQuery builder.

func (*VenueQuery) First

func (vq *VenueQuery) First(ctx context.Context) (*Venue, error)

First returns the first Venue entity from the query. Returns a *NotFoundError when no Venue was found.

func (*VenueQuery) FirstID

func (vq *VenueQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Venue ID from the query. Returns a *NotFoundError when no Venue ID was found.

func (*VenueQuery) FirstIDX

func (vq *VenueQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*VenueQuery) FirstX

func (vq *VenueQuery) FirstX(ctx context.Context) *Venue

FirstX is like First, but panics if an error occurs.

func (*VenueQuery) ForShare

func (vq *VenueQuery) ForShare(opts ...sql.LockOption) *VenueQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*VenueQuery) ForUpdate

func (vq *VenueQuery) ForUpdate(opts ...sql.LockOption) *VenueQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*VenueQuery) GroupBy

func (vq *VenueQuery) GroupBy(field string, fields ...string) *VenueGroupBy

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 {
	VenueID string `json:"venue_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Venue.Query().
	GroupBy(venue.FieldVenueID).
	Aggregate(entities.Count()).
	Scan(ctx, &v)

func (*VenueQuery) IDs

func (vq *VenueQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Venue IDs.

func (*VenueQuery) IDsX

func (vq *VenueQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*VenueQuery) Limit

func (vq *VenueQuery) Limit(limit int) *VenueQuery

Limit the number of records to be returned by this query.

func (*VenueQuery) Modify

func (vq *VenueQuery) Modify(modifiers ...func(s *sql.Selector)) *VenueSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*VenueQuery) Offset

func (vq *VenueQuery) Offset(offset int) *VenueQuery

Offset to start from.

func (*VenueQuery) Only

func (vq *VenueQuery) Only(ctx context.Context) (*Venue, error)

Only returns a single Venue entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Venue entity is found. Returns a *NotFoundError when no Venue entities are found.

func (*VenueQuery) OnlyID

func (vq *VenueQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Venue ID in the query. Returns a *NotSingularError when more than one Venue ID is found. Returns a *NotFoundError when no entities are found.

func (*VenueQuery) OnlyIDX

func (vq *VenueQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VenueQuery) OnlyX

func (vq *VenueQuery) OnlyX(ctx context.Context) *Venue

OnlyX is like Only, but panics if an error occurs.

func (*VenueQuery) Order

func (vq *VenueQuery) Order(o ...OrderFunc) *VenueQuery

Order specifies how the records should be ordered.

func (*VenueQuery) Paginate

func (v *VenueQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...VenuePaginateOption,
) (*VenueConnection, error)

Paginate executes the query and returns a relay based cursor connection to Venue.

func (*VenueQuery) QueryContext

func (c *VenueQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueQuery) QueryMarket

func (vq *VenueQuery) QueryMarket() *MarketQuery

QueryMarket chains the current query on the "market" edge.

func (*VenueQuery) QueryTicker

func (vq *VenueQuery) QueryTicker() *TickerQuery

QueryTicker chains the current query on the "ticker" edge.

func (*VenueQuery) QueryTradingPair

func (vq *VenueQuery) QueryTradingPair() *TradingPairQuery

QueryTradingPair chains the current query on the "trading_pair" edge.

func (*VenueQuery) Select

func (vq *VenueQuery) Select(fields ...string) *VenueSelect

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 {
	VenueID string `json:"venue_id,omitempty"`
}

client.Venue.Query().
	Select(venue.FieldVenueID).
	Scan(ctx, &v)

func (*VenueQuery) Unique

func (vq *VenueQuery) Unique(unique bool) *VenueQuery

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 (*VenueQuery) Where

func (vq *VenueQuery) Where(ps ...predicate.Venue) *VenueQuery

Where adds a new predicate for the VenueQuery builder.

func (*VenueQuery) WithMarket

func (vq *VenueQuery) WithMarket(opts ...func(*MarketQuery)) *VenueQuery

WithMarket tells the query-builder to eager-load the nodes that are connected to the "market" edge. The optional arguments are used to configure the query builder of the edge.

func (*VenueQuery) WithNamedMarket

func (vq *VenueQuery) WithNamedMarket(name string, opts ...func(*MarketQuery)) *VenueQuery

WithNamedMarket tells the query-builder to eager-load the nodes that are connected to the "market" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VenueQuery) WithNamedTicker

func (vq *VenueQuery) WithNamedTicker(name string, opts ...func(*TickerQuery)) *VenueQuery

WithNamedTicker tells the query-builder to eager-load the nodes that are connected to the "ticker" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VenueQuery) WithNamedTradingPair

func (vq *VenueQuery) WithNamedTradingPair(name string, opts ...func(*TradingPairQuery)) *VenueQuery

WithNamedTradingPair tells the query-builder to eager-load the nodes that are connected to the "trading_pair" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VenueQuery) WithTicker

func (vq *VenueQuery) WithTicker(opts ...func(*TickerQuery)) *VenueQuery

WithTicker tells the query-builder to eager-load the nodes that are connected to the "ticker" edge. The optional arguments are used to configure the query builder of the edge.

func (*VenueQuery) WithTradingPair

func (vq *VenueQuery) WithTradingPair(opts ...func(*TradingPairQuery)) *VenueQuery

WithTradingPair tells the query-builder to eager-load the nodes that are connected to the "trading_pair" edge. The optional arguments are used to configure the query builder of the edge.

type VenueSelect

type VenueSelect struct {
	*VenueQuery
	// contains filtered or unexported fields
}

VenueSelect is the builder for selecting fields of Venue entities.

func (*VenueSelect) Aggregate

func (vs *VenueSelect) Aggregate(fns ...AggregateFunc) *VenueSelect

Aggregate adds the given aggregation functions to the selector query.

func (*VenueSelect) Bool

func (s *VenueSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VenueSelect) BoolX

func (s *VenueSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VenueSelect) Bools

func (s *VenueSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VenueSelect) BoolsX

func (s *VenueSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (VenueSelect) ExecContext

func (c VenueSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueSelect) Float64

func (s *VenueSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VenueSelect) Float64X

func (s *VenueSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VenueSelect) Float64s

func (s *VenueSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VenueSelect) Float64sX

func (s *VenueSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VenueSelect) Int

func (s *VenueSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VenueSelect) IntX

func (s *VenueSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VenueSelect) Ints

func (s *VenueSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VenueSelect) IntsX

func (s *VenueSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VenueSelect) Modify

func (vs *VenueSelect) Modify(modifiers ...func(s *sql.Selector)) *VenueSelect

Modify adds a query modifier for attaching custom logic to queries.

func (VenueSelect) QueryContext

func (c VenueSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueSelect) Scan

func (vs *VenueSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VenueSelect) ScanX

func (s *VenueSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VenueSelect) String

func (s *VenueSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VenueSelect) StringX

func (s *VenueSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VenueSelect) Strings

func (s *VenueSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VenueSelect) StringsX

func (s *VenueSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VenueUpdate

type VenueUpdate struct {
	// contains filtered or unexported fields
}

VenueUpdate is the builder for updating Venue entities.

func (*VenueUpdate) AddMakerFee

func (vu *VenueUpdate) AddMakerFee(f float64) *VenueUpdate

AddMakerFee adds f to the "maker_fee" field.

func (*VenueUpdate) AddMarket

func (vu *VenueUpdate) AddMarket(m ...*Market) *VenueUpdate

AddMarket adds the "market" edges to the Market entity.

func (*VenueUpdate) AddMarketIDs

func (vu *VenueUpdate) AddMarketIDs(ids ...int) *VenueUpdate

AddMarketIDs adds the "market" edge to the Market entity by IDs.

func (*VenueUpdate) AddTakerFee

func (vu *VenueUpdate) AddTakerFee(f float64) *VenueUpdate

AddTakerFee adds f to the "taker_fee" field.

func (*VenueUpdate) AddTicker

func (vu *VenueUpdate) AddTicker(t ...*Ticker) *VenueUpdate

AddTicker adds the "ticker" edges to the Ticker entity.

func (*VenueUpdate) AddTickerIDs

func (vu *VenueUpdate) AddTickerIDs(ids ...int) *VenueUpdate

AddTickerIDs adds the "ticker" edge to the Ticker entity by IDs.

func (*VenueUpdate) AddTradeVolume24hBtc

func (vu *VenueUpdate) AddTradeVolume24hBtc(f float64) *VenueUpdate

AddTradeVolume24hBtc adds f to the "trade_volume_24h_btc" field.

func (*VenueUpdate) AddTradeVolume24hBtcNormalized

func (vu *VenueUpdate) AddTradeVolume24hBtcNormalized(f float64) *VenueUpdate

AddTradeVolume24hBtcNormalized adds f to the "trade_volume_24h_btc_normalized" field.

func (*VenueUpdate) AddTradingPair

func (vu *VenueUpdate) AddTradingPair(t ...*TradingPair) *VenueUpdate

AddTradingPair adds the "trading_pair" edges to the TradingPair entity.

func (*VenueUpdate) AddTradingPairIDs

func (vu *VenueUpdate) AddTradingPairIDs(ids ...int) *VenueUpdate

AddTradingPairIDs adds the "trading_pair" edge to the TradingPair entity by IDs.

func (*VenueUpdate) AddTrustScore

func (vu *VenueUpdate) AddTrustScore(i int) *VenueUpdate

AddTrustScore adds i to the "trust_score" field.

func (*VenueUpdate) AddTrustScoreRank

func (vu *VenueUpdate) AddTrustScoreRank(i int) *VenueUpdate

AddTrustScoreRank adds i to the "trust_score_rank" field.

func (*VenueUpdate) AddYearEstablished

func (vu *VenueUpdate) AddYearEstablished(i int) *VenueUpdate

AddYearEstablished adds i to the "year_established" field.

func (*VenueUpdate) ClearAlertNotice

func (vu *VenueUpdate) ClearAlertNotice() *VenueUpdate

ClearAlertNotice clears the value of the "alert_notice" field.

func (*VenueUpdate) ClearCentralized

func (vu *VenueUpdate) ClearCentralized() *VenueUpdate

ClearCentralized clears the value of the "centralized" field.

func (*VenueUpdate) ClearCountry

func (vu *VenueUpdate) ClearCountry() *VenueUpdate

ClearCountry clears the value of the "country" field.

func (*VenueUpdate) ClearHasTradingIncentive

func (vu *VenueUpdate) ClearHasTradingIncentive() *VenueUpdate

ClearHasTradingIncentive clears the value of the "has_trading_incentive" field.

func (*VenueUpdate) ClearImage

func (vu *VenueUpdate) ClearImage() *VenueUpdate

ClearImage clears the value of the "image" field.

func (vu *VenueUpdate) ClearLinks() *VenueUpdate

ClearLinks clears the value of the "links" field.

func (*VenueUpdate) ClearMakerFee

func (vu *VenueUpdate) ClearMakerFee() *VenueUpdate

ClearMakerFee clears the value of the "maker_fee" field.

func (*VenueUpdate) ClearMarket

func (vu *VenueUpdate) ClearMarket() *VenueUpdate

ClearMarket clears all "market" edges to the Market entity.

func (*VenueUpdate) ClearName

func (vu *VenueUpdate) ClearName() *VenueUpdate

ClearName clears the value of the "name" field.

func (*VenueUpdate) ClearPublicNotice

func (vu *VenueUpdate) ClearPublicNotice() *VenueUpdate

ClearPublicNotice clears the value of the "public_notice" field.

func (*VenueUpdate) ClearSpreadFee

func (vu *VenueUpdate) ClearSpreadFee() *VenueUpdate

ClearSpreadFee clears the value of the "spread_fee" field.

func (*VenueUpdate) ClearSupportAPI

func (vu *VenueUpdate) ClearSupportAPI() *VenueUpdate

ClearSupportAPI clears the value of the "support_api" field.

func (*VenueUpdate) ClearTakerFee

func (vu *VenueUpdate) ClearTakerFee() *VenueUpdate

ClearTakerFee clears the value of the "taker_fee" field.

func (*VenueUpdate) ClearTicker

func (vu *VenueUpdate) ClearTicker() *VenueUpdate

ClearTicker clears all "ticker" edges to the Ticker entity.

func (*VenueUpdate) ClearTradeVolume24hBtc

func (vu *VenueUpdate) ClearTradeVolume24hBtc() *VenueUpdate

ClearTradeVolume24hBtc clears the value of the "trade_volume_24h_btc" field.

func (*VenueUpdate) ClearTradeVolume24hBtcNormalized

func (vu *VenueUpdate) ClearTradeVolume24hBtcNormalized() *VenueUpdate

ClearTradeVolume24hBtcNormalized clears the value of the "trade_volume_24h_btc_normalized" field.

func (*VenueUpdate) ClearTradingPair

func (vu *VenueUpdate) ClearTradingPair() *VenueUpdate

ClearTradingPair clears all "trading_pair" edges to the TradingPair entity.

func (*VenueUpdate) ClearTrustScore

func (vu *VenueUpdate) ClearTrustScore() *VenueUpdate

ClearTrustScore clears the value of the "trust_score" field.

func (*VenueUpdate) ClearTrustScoreRank

func (vu *VenueUpdate) ClearTrustScoreRank() *VenueUpdate

ClearTrustScoreRank clears the value of the "trust_score_rank" field.

func (*VenueUpdate) ClearYearEstablished

func (vu *VenueUpdate) ClearYearEstablished() *VenueUpdate

ClearYearEstablished clears the value of the "year_established" field.

func (*VenueUpdate) Exec

func (vu *VenueUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VenueUpdate) ExecContext

func (c *VenueUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueUpdate) ExecX

func (vu *VenueUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VenueUpdate) Modify

func (vu *VenueUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VenueUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VenueUpdate) Mutation

func (vu *VenueUpdate) Mutation() *VenueMutation

Mutation returns the VenueMutation object of the builder.

func (*VenueUpdate) QueryContext

func (c *VenueUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueUpdate) RemoveMarket

func (vu *VenueUpdate) RemoveMarket(m ...*Market) *VenueUpdate

RemoveMarket removes "market" edges to Market entities.

func (*VenueUpdate) RemoveMarketIDs

func (vu *VenueUpdate) RemoveMarketIDs(ids ...int) *VenueUpdate

RemoveMarketIDs removes the "market" edge to Market entities by IDs.

func (*VenueUpdate) RemoveTicker

func (vu *VenueUpdate) RemoveTicker(t ...*Ticker) *VenueUpdate

RemoveTicker removes "ticker" edges to Ticker entities.

func (*VenueUpdate) RemoveTickerIDs

func (vu *VenueUpdate) RemoveTickerIDs(ids ...int) *VenueUpdate

RemoveTickerIDs removes the "ticker" edge to Ticker entities by IDs.

func (*VenueUpdate) RemoveTradingPair

func (vu *VenueUpdate) RemoveTradingPair(t ...*TradingPair) *VenueUpdate

RemoveTradingPair removes "trading_pair" edges to TradingPair entities.

func (*VenueUpdate) RemoveTradingPairIDs

func (vu *VenueUpdate) RemoveTradingPairIDs(ids ...int) *VenueUpdate

RemoveTradingPairIDs removes the "trading_pair" edge to TradingPair entities by IDs.

func (*VenueUpdate) Save

func (vu *VenueUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VenueUpdate) SaveX

func (vu *VenueUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VenueUpdate) SetAlertNotice

func (vu *VenueUpdate) SetAlertNotice(s string) *VenueUpdate

SetAlertNotice sets the "alert_notice" field.

func (*VenueUpdate) SetCentralized

func (vu *VenueUpdate) SetCentralized(b bool) *VenueUpdate

SetCentralized sets the "centralized" field.

func (*VenueUpdate) SetCountry

func (vu *VenueUpdate) SetCountry(s string) *VenueUpdate

SetCountry sets the "country" field.

func (*VenueUpdate) SetHasTradingIncentive

func (vu *VenueUpdate) SetHasTradingIncentive(b bool) *VenueUpdate

SetHasTradingIncentive sets the "has_trading_incentive" field.

func (*VenueUpdate) SetImage

func (vu *VenueUpdate) SetImage(s string) *VenueUpdate

SetImage sets the "image" field.

func (vu *VenueUpdate) SetLinks(m map[string]string) *VenueUpdate

SetLinks sets the "links" field.

func (*VenueUpdate) SetMakerFee

func (vu *VenueUpdate) SetMakerFee(f float64) *VenueUpdate

SetMakerFee sets the "maker_fee" field.

func (*VenueUpdate) SetName

func (vu *VenueUpdate) SetName(s string) *VenueUpdate

SetName sets the "name" field.

func (*VenueUpdate) SetNillableAlertNotice

func (vu *VenueUpdate) SetNillableAlertNotice(s *string) *VenueUpdate

SetNillableAlertNotice sets the "alert_notice" field if the given value is not nil.

func (*VenueUpdate) SetNillableCentralized

func (vu *VenueUpdate) SetNillableCentralized(b *bool) *VenueUpdate

SetNillableCentralized sets the "centralized" field if the given value is not nil.

func (*VenueUpdate) SetNillableCountry

func (vu *VenueUpdate) SetNillableCountry(s *string) *VenueUpdate

SetNillableCountry sets the "country" field if the given value is not nil.

func (*VenueUpdate) SetNillableHasTradingIncentive

func (vu *VenueUpdate) SetNillableHasTradingIncentive(b *bool) *VenueUpdate

SetNillableHasTradingIncentive sets the "has_trading_incentive" field if the given value is not nil.

func (*VenueUpdate) SetNillableImage

func (vu *VenueUpdate) SetNillableImage(s *string) *VenueUpdate

SetNillableImage sets the "image" field if the given value is not nil.

func (*VenueUpdate) SetNillableMakerFee

func (vu *VenueUpdate) SetNillableMakerFee(f *float64) *VenueUpdate

SetNillableMakerFee sets the "maker_fee" field if the given value is not nil.

func (*VenueUpdate) SetNillableName

func (vu *VenueUpdate) SetNillableName(s *string) *VenueUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*VenueUpdate) SetNillablePublicNotice

func (vu *VenueUpdate) SetNillablePublicNotice(s *string) *VenueUpdate

SetNillablePublicNotice sets the "public_notice" field if the given value is not nil.

func (*VenueUpdate) SetNillableSpreadFee

func (vu *VenueUpdate) SetNillableSpreadFee(b *bool) *VenueUpdate

SetNillableSpreadFee sets the "spread_fee" field if the given value is not nil.

func (*VenueUpdate) SetNillableSupportAPI

func (vu *VenueUpdate) SetNillableSupportAPI(b *bool) *VenueUpdate

SetNillableSupportAPI sets the "support_api" field if the given value is not nil.

func (*VenueUpdate) SetNillableTakerFee

func (vu *VenueUpdate) SetNillableTakerFee(f *float64) *VenueUpdate

SetNillableTakerFee sets the "taker_fee" field if the given value is not nil.

func (*VenueUpdate) SetNillableTradeVolume24hBtc

func (vu *VenueUpdate) SetNillableTradeVolume24hBtc(f *float64) *VenueUpdate

SetNillableTradeVolume24hBtc sets the "trade_volume_24h_btc" field if the given value is not nil.

func (*VenueUpdate) SetNillableTradeVolume24hBtcNormalized

func (vu *VenueUpdate) SetNillableTradeVolume24hBtcNormalized(f *float64) *VenueUpdate

SetNillableTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field if the given value is not nil.

func (*VenueUpdate) SetNillableTrustScore

func (vu *VenueUpdate) SetNillableTrustScore(i *int) *VenueUpdate

SetNillableTrustScore sets the "trust_score" field if the given value is not nil.

func (*VenueUpdate) SetNillableTrustScoreRank

func (vu *VenueUpdate) SetNillableTrustScoreRank(i *int) *VenueUpdate

SetNillableTrustScoreRank sets the "trust_score_rank" field if the given value is not nil.

func (*VenueUpdate) SetNillableYearEstablished

func (vu *VenueUpdate) SetNillableYearEstablished(i *int) *VenueUpdate

SetNillableYearEstablished sets the "year_established" field if the given value is not nil.

func (*VenueUpdate) SetPublicNotice

func (vu *VenueUpdate) SetPublicNotice(s string) *VenueUpdate

SetPublicNotice sets the "public_notice" field.

func (*VenueUpdate) SetSpreadFee

func (vu *VenueUpdate) SetSpreadFee(b bool) *VenueUpdate

SetSpreadFee sets the "spread_fee" field.

func (*VenueUpdate) SetSupportAPI

func (vu *VenueUpdate) SetSupportAPI(b bool) *VenueUpdate

SetSupportAPI sets the "support_api" field.

func (*VenueUpdate) SetTakerFee

func (vu *VenueUpdate) SetTakerFee(f float64) *VenueUpdate

SetTakerFee sets the "taker_fee" field.

func (*VenueUpdate) SetTradeVolume24hBtc

func (vu *VenueUpdate) SetTradeVolume24hBtc(f float64) *VenueUpdate

SetTradeVolume24hBtc sets the "trade_volume_24h_btc" field.

func (*VenueUpdate) SetTradeVolume24hBtcNormalized

func (vu *VenueUpdate) SetTradeVolume24hBtcNormalized(f float64) *VenueUpdate

SetTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field.

func (*VenueUpdate) SetTrustScore

func (vu *VenueUpdate) SetTrustScore(i int) *VenueUpdate

SetTrustScore sets the "trust_score" field.

func (*VenueUpdate) SetTrustScoreRank

func (vu *VenueUpdate) SetTrustScoreRank(i int) *VenueUpdate

SetTrustScoreRank sets the "trust_score_rank" field.

func (*VenueUpdate) SetType

func (vu *VenueUpdate) SetType(v venue.Type) *VenueUpdate

SetType sets the "type" field.

func (*VenueUpdate) SetVenueID

func (vu *VenueUpdate) SetVenueID(s string) *VenueUpdate

SetVenueID sets the "venue_id" field.

func (*VenueUpdate) SetYearEstablished

func (vu *VenueUpdate) SetYearEstablished(i int) *VenueUpdate

SetYearEstablished sets the "year_established" field.

func (*VenueUpdate) Where

func (vu *VenueUpdate) Where(ps ...predicate.Venue) *VenueUpdate

Where appends a list predicates to the VenueUpdate builder.

type VenueUpdateOne

type VenueUpdateOne struct {
	// contains filtered or unexported fields
}

VenueUpdateOne is the builder for updating a single Venue entity.

func (*VenueUpdateOne) AddMakerFee

func (vuo *VenueUpdateOne) AddMakerFee(f float64) *VenueUpdateOne

AddMakerFee adds f to the "maker_fee" field.

func (*VenueUpdateOne) AddMarket

func (vuo *VenueUpdateOne) AddMarket(m ...*Market) *VenueUpdateOne

AddMarket adds the "market" edges to the Market entity.

func (*VenueUpdateOne) AddMarketIDs

func (vuo *VenueUpdateOne) AddMarketIDs(ids ...int) *VenueUpdateOne

AddMarketIDs adds the "market" edge to the Market entity by IDs.

func (*VenueUpdateOne) AddTakerFee

func (vuo *VenueUpdateOne) AddTakerFee(f float64) *VenueUpdateOne

AddTakerFee adds f to the "taker_fee" field.

func (*VenueUpdateOne) AddTicker

func (vuo *VenueUpdateOne) AddTicker(t ...*Ticker) *VenueUpdateOne

AddTicker adds the "ticker" edges to the Ticker entity.

func (*VenueUpdateOne) AddTickerIDs

func (vuo *VenueUpdateOne) AddTickerIDs(ids ...int) *VenueUpdateOne

AddTickerIDs adds the "ticker" edge to the Ticker entity by IDs.

func (*VenueUpdateOne) AddTradeVolume24hBtc

func (vuo *VenueUpdateOne) AddTradeVolume24hBtc(f float64) *VenueUpdateOne

AddTradeVolume24hBtc adds f to the "trade_volume_24h_btc" field.

func (*VenueUpdateOne) AddTradeVolume24hBtcNormalized

func (vuo *VenueUpdateOne) AddTradeVolume24hBtcNormalized(f float64) *VenueUpdateOne

AddTradeVolume24hBtcNormalized adds f to the "trade_volume_24h_btc_normalized" field.

func (*VenueUpdateOne) AddTradingPair

func (vuo *VenueUpdateOne) AddTradingPair(t ...*TradingPair) *VenueUpdateOne

AddTradingPair adds the "trading_pair" edges to the TradingPair entity.

func (*VenueUpdateOne) AddTradingPairIDs

func (vuo *VenueUpdateOne) AddTradingPairIDs(ids ...int) *VenueUpdateOne

AddTradingPairIDs adds the "trading_pair" edge to the TradingPair entity by IDs.

func (*VenueUpdateOne) AddTrustScore

func (vuo *VenueUpdateOne) AddTrustScore(i int) *VenueUpdateOne

AddTrustScore adds i to the "trust_score" field.

func (*VenueUpdateOne) AddTrustScoreRank

func (vuo *VenueUpdateOne) AddTrustScoreRank(i int) *VenueUpdateOne

AddTrustScoreRank adds i to the "trust_score_rank" field.

func (*VenueUpdateOne) AddYearEstablished

func (vuo *VenueUpdateOne) AddYearEstablished(i int) *VenueUpdateOne

AddYearEstablished adds i to the "year_established" field.

func (*VenueUpdateOne) ClearAlertNotice

func (vuo *VenueUpdateOne) ClearAlertNotice() *VenueUpdateOne

ClearAlertNotice clears the value of the "alert_notice" field.

func (*VenueUpdateOne) ClearCentralized

func (vuo *VenueUpdateOne) ClearCentralized() *VenueUpdateOne

ClearCentralized clears the value of the "centralized" field.

func (*VenueUpdateOne) ClearCountry

func (vuo *VenueUpdateOne) ClearCountry() *VenueUpdateOne

ClearCountry clears the value of the "country" field.

func (*VenueUpdateOne) ClearHasTradingIncentive

func (vuo *VenueUpdateOne) ClearHasTradingIncentive() *VenueUpdateOne

ClearHasTradingIncentive clears the value of the "has_trading_incentive" field.

func (*VenueUpdateOne) ClearImage

func (vuo *VenueUpdateOne) ClearImage() *VenueUpdateOne

ClearImage clears the value of the "image" field.

func (vuo *VenueUpdateOne) ClearLinks() *VenueUpdateOne

ClearLinks clears the value of the "links" field.

func (*VenueUpdateOne) ClearMakerFee

func (vuo *VenueUpdateOne) ClearMakerFee() *VenueUpdateOne

ClearMakerFee clears the value of the "maker_fee" field.

func (*VenueUpdateOne) ClearMarket

func (vuo *VenueUpdateOne) ClearMarket() *VenueUpdateOne

ClearMarket clears all "market" edges to the Market entity.

func (*VenueUpdateOne) ClearName

func (vuo *VenueUpdateOne) ClearName() *VenueUpdateOne

ClearName clears the value of the "name" field.

func (*VenueUpdateOne) ClearPublicNotice

func (vuo *VenueUpdateOne) ClearPublicNotice() *VenueUpdateOne

ClearPublicNotice clears the value of the "public_notice" field.

func (*VenueUpdateOne) ClearSpreadFee

func (vuo *VenueUpdateOne) ClearSpreadFee() *VenueUpdateOne

ClearSpreadFee clears the value of the "spread_fee" field.

func (*VenueUpdateOne) ClearSupportAPI

func (vuo *VenueUpdateOne) ClearSupportAPI() *VenueUpdateOne

ClearSupportAPI clears the value of the "support_api" field.

func (*VenueUpdateOne) ClearTakerFee

func (vuo *VenueUpdateOne) ClearTakerFee() *VenueUpdateOne

ClearTakerFee clears the value of the "taker_fee" field.

func (*VenueUpdateOne) ClearTicker

func (vuo *VenueUpdateOne) ClearTicker() *VenueUpdateOne

ClearTicker clears all "ticker" edges to the Ticker entity.

func (*VenueUpdateOne) ClearTradeVolume24hBtc

func (vuo *VenueUpdateOne) ClearTradeVolume24hBtc() *VenueUpdateOne

ClearTradeVolume24hBtc clears the value of the "trade_volume_24h_btc" field.

func (*VenueUpdateOne) ClearTradeVolume24hBtcNormalized

func (vuo *VenueUpdateOne) ClearTradeVolume24hBtcNormalized() *VenueUpdateOne

ClearTradeVolume24hBtcNormalized clears the value of the "trade_volume_24h_btc_normalized" field.

func (*VenueUpdateOne) ClearTradingPair

func (vuo *VenueUpdateOne) ClearTradingPair() *VenueUpdateOne

ClearTradingPair clears all "trading_pair" edges to the TradingPair entity.

func (*VenueUpdateOne) ClearTrustScore

func (vuo *VenueUpdateOne) ClearTrustScore() *VenueUpdateOne

ClearTrustScore clears the value of the "trust_score" field.

func (*VenueUpdateOne) ClearTrustScoreRank

func (vuo *VenueUpdateOne) ClearTrustScoreRank() *VenueUpdateOne

ClearTrustScoreRank clears the value of the "trust_score_rank" field.

func (*VenueUpdateOne) ClearYearEstablished

func (vuo *VenueUpdateOne) ClearYearEstablished() *VenueUpdateOne

ClearYearEstablished clears the value of the "year_established" field.

func (*VenueUpdateOne) Exec

func (vuo *VenueUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VenueUpdateOne) ExecContext

func (c *VenueUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VenueUpdateOne) ExecX

func (vuo *VenueUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VenueUpdateOne) Modify

func (vuo *VenueUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VenueUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VenueUpdateOne) Mutation

func (vuo *VenueUpdateOne) Mutation() *VenueMutation

Mutation returns the VenueMutation object of the builder.

func (*VenueUpdateOne) QueryContext

func (c *VenueUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VenueUpdateOne) RemoveMarket

func (vuo *VenueUpdateOne) RemoveMarket(m ...*Market) *VenueUpdateOne

RemoveMarket removes "market" edges to Market entities.

func (*VenueUpdateOne) RemoveMarketIDs

func (vuo *VenueUpdateOne) RemoveMarketIDs(ids ...int) *VenueUpdateOne

RemoveMarketIDs removes the "market" edge to Market entities by IDs.

func (*VenueUpdateOne) RemoveTicker

func (vuo *VenueUpdateOne) RemoveTicker(t ...*Ticker) *VenueUpdateOne

RemoveTicker removes "ticker" edges to Ticker entities.

func (*VenueUpdateOne) RemoveTickerIDs

func (vuo *VenueUpdateOne) RemoveTickerIDs(ids ...int) *VenueUpdateOne

RemoveTickerIDs removes the "ticker" edge to Ticker entities by IDs.

func (*VenueUpdateOne) RemoveTradingPair

func (vuo *VenueUpdateOne) RemoveTradingPair(t ...*TradingPair) *VenueUpdateOne

RemoveTradingPair removes "trading_pair" edges to TradingPair entities.

func (*VenueUpdateOne) RemoveTradingPairIDs

func (vuo *VenueUpdateOne) RemoveTradingPairIDs(ids ...int) *VenueUpdateOne

RemoveTradingPairIDs removes the "trading_pair" edge to TradingPair entities by IDs.

func (*VenueUpdateOne) Save

func (vuo *VenueUpdateOne) Save(ctx context.Context) (*Venue, error)

Save executes the query and returns the updated Venue entity.

func (*VenueUpdateOne) SaveX

func (vuo *VenueUpdateOne) SaveX(ctx context.Context) *Venue

SaveX is like Save, but panics if an error occurs.

func (*VenueUpdateOne) Select

func (vuo *VenueUpdateOne) Select(field string, fields ...string) *VenueUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VenueUpdateOne) SetAlertNotice

func (vuo *VenueUpdateOne) SetAlertNotice(s string) *VenueUpdateOne

SetAlertNotice sets the "alert_notice" field.

func (*VenueUpdateOne) SetCentralized

func (vuo *VenueUpdateOne) SetCentralized(b bool) *VenueUpdateOne

SetCentralized sets the "centralized" field.

func (*VenueUpdateOne) SetCountry

func (vuo *VenueUpdateOne) SetCountry(s string) *VenueUpdateOne

SetCountry sets the "country" field.

func (*VenueUpdateOne) SetHasTradingIncentive

func (vuo *VenueUpdateOne) SetHasTradingIncentive(b bool) *VenueUpdateOne

SetHasTradingIncentive sets the "has_trading_incentive" field.

func (*VenueUpdateOne) SetImage

func (vuo *VenueUpdateOne) SetImage(s string) *VenueUpdateOne

SetImage sets the "image" field.

func (vuo *VenueUpdateOne) SetLinks(m map[string]string) *VenueUpdateOne

SetLinks sets the "links" field.

func (*VenueUpdateOne) SetMakerFee

func (vuo *VenueUpdateOne) SetMakerFee(f float64) *VenueUpdateOne

SetMakerFee sets the "maker_fee" field.

func (*VenueUpdateOne) SetName

func (vuo *VenueUpdateOne) SetName(s string) *VenueUpdateOne

SetName sets the "name" field.

func (*VenueUpdateOne) SetNillableAlertNotice

func (vuo *VenueUpdateOne) SetNillableAlertNotice(s *string) *VenueUpdateOne

SetNillableAlertNotice sets the "alert_notice" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableCentralized

func (vuo *VenueUpdateOne) SetNillableCentralized(b *bool) *VenueUpdateOne

SetNillableCentralized sets the "centralized" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableCountry

func (vuo *VenueUpdateOne) SetNillableCountry(s *string) *VenueUpdateOne

SetNillableCountry sets the "country" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableHasTradingIncentive

func (vuo *VenueUpdateOne) SetNillableHasTradingIncentive(b *bool) *VenueUpdateOne

SetNillableHasTradingIncentive sets the "has_trading_incentive" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableImage

func (vuo *VenueUpdateOne) SetNillableImage(s *string) *VenueUpdateOne

SetNillableImage sets the "image" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableMakerFee

func (vuo *VenueUpdateOne) SetNillableMakerFee(f *float64) *VenueUpdateOne

SetNillableMakerFee sets the "maker_fee" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableName

func (vuo *VenueUpdateOne) SetNillableName(s *string) *VenueUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*VenueUpdateOne) SetNillablePublicNotice

func (vuo *VenueUpdateOne) SetNillablePublicNotice(s *string) *VenueUpdateOne

SetNillablePublicNotice sets the "public_notice" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableSpreadFee

func (vuo *VenueUpdateOne) SetNillableSpreadFee(b *bool) *VenueUpdateOne

SetNillableSpreadFee sets the "spread_fee" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableSupportAPI

func (vuo *VenueUpdateOne) SetNillableSupportAPI(b *bool) *VenueUpdateOne

SetNillableSupportAPI sets the "support_api" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableTakerFee

func (vuo *VenueUpdateOne) SetNillableTakerFee(f *float64) *VenueUpdateOne

SetNillableTakerFee sets the "taker_fee" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableTradeVolume24hBtc

func (vuo *VenueUpdateOne) SetNillableTradeVolume24hBtc(f *float64) *VenueUpdateOne

SetNillableTradeVolume24hBtc sets the "trade_volume_24h_btc" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableTradeVolume24hBtcNormalized

func (vuo *VenueUpdateOne) SetNillableTradeVolume24hBtcNormalized(f *float64) *VenueUpdateOne

SetNillableTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableTrustScore

func (vuo *VenueUpdateOne) SetNillableTrustScore(i *int) *VenueUpdateOne

SetNillableTrustScore sets the "trust_score" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableTrustScoreRank

func (vuo *VenueUpdateOne) SetNillableTrustScoreRank(i *int) *VenueUpdateOne

SetNillableTrustScoreRank sets the "trust_score_rank" field if the given value is not nil.

func (*VenueUpdateOne) SetNillableYearEstablished

func (vuo *VenueUpdateOne) SetNillableYearEstablished(i *int) *VenueUpdateOne

SetNillableYearEstablished sets the "year_established" field if the given value is not nil.

func (*VenueUpdateOne) SetPublicNotice

func (vuo *VenueUpdateOne) SetPublicNotice(s string) *VenueUpdateOne

SetPublicNotice sets the "public_notice" field.

func (*VenueUpdateOne) SetSpreadFee

func (vuo *VenueUpdateOne) SetSpreadFee(b bool) *VenueUpdateOne

SetSpreadFee sets the "spread_fee" field.

func (*VenueUpdateOne) SetSupportAPI

func (vuo *VenueUpdateOne) SetSupportAPI(b bool) *VenueUpdateOne

SetSupportAPI sets the "support_api" field.

func (*VenueUpdateOne) SetTakerFee

func (vuo *VenueUpdateOne) SetTakerFee(f float64) *VenueUpdateOne

SetTakerFee sets the "taker_fee" field.

func (*VenueUpdateOne) SetTradeVolume24hBtc

func (vuo *VenueUpdateOne) SetTradeVolume24hBtc(f float64) *VenueUpdateOne

SetTradeVolume24hBtc sets the "trade_volume_24h_btc" field.

func (*VenueUpdateOne) SetTradeVolume24hBtcNormalized

func (vuo *VenueUpdateOne) SetTradeVolume24hBtcNormalized(f float64) *VenueUpdateOne

SetTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field.

func (*VenueUpdateOne) SetTrustScore

func (vuo *VenueUpdateOne) SetTrustScore(i int) *VenueUpdateOne

SetTrustScore sets the "trust_score" field.

func (*VenueUpdateOne) SetTrustScoreRank

func (vuo *VenueUpdateOne) SetTrustScoreRank(i int) *VenueUpdateOne

SetTrustScoreRank sets the "trust_score_rank" field.

func (*VenueUpdateOne) SetType

func (vuo *VenueUpdateOne) SetType(v venue.Type) *VenueUpdateOne

SetType sets the "type" field.

func (*VenueUpdateOne) SetVenueID

func (vuo *VenueUpdateOne) SetVenueID(s string) *VenueUpdateOne

SetVenueID sets the "venue_id" field.

func (*VenueUpdateOne) SetYearEstablished

func (vuo *VenueUpdateOne) SetYearEstablished(i int) *VenueUpdateOne

SetYearEstablished sets the "year_established" field.

type VenueUpsert

type VenueUpsert struct {
	*sql.UpdateSet
}

VenueUpsert is the "OnConflict" setter.

func (*VenueUpsert) AddMakerFee

func (u *VenueUpsert) AddMakerFee(v float64) *VenueUpsert

AddMakerFee adds v to the "maker_fee" field.

func (*VenueUpsert) AddTakerFee

func (u *VenueUpsert) AddTakerFee(v float64) *VenueUpsert

AddTakerFee adds v to the "taker_fee" field.

func (*VenueUpsert) AddTradeVolume24hBtc

func (u *VenueUpsert) AddTradeVolume24hBtc(v float64) *VenueUpsert

AddTradeVolume24hBtc adds v to the "trade_volume_24h_btc" field.

func (*VenueUpsert) AddTradeVolume24hBtcNormalized

func (u *VenueUpsert) AddTradeVolume24hBtcNormalized(v float64) *VenueUpsert

AddTradeVolume24hBtcNormalized adds v to the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsert) AddTrustScore

func (u *VenueUpsert) AddTrustScore(v int) *VenueUpsert

AddTrustScore adds v to the "trust_score" field.

func (*VenueUpsert) AddTrustScoreRank

func (u *VenueUpsert) AddTrustScoreRank(v int) *VenueUpsert

AddTrustScoreRank adds v to the "trust_score_rank" field.

func (*VenueUpsert) AddYearEstablished

func (u *VenueUpsert) AddYearEstablished(v int) *VenueUpsert

AddYearEstablished adds v to the "year_established" field.

func (*VenueUpsert) ClearAlertNotice

func (u *VenueUpsert) ClearAlertNotice() *VenueUpsert

ClearAlertNotice clears the value of the "alert_notice" field.

func (*VenueUpsert) ClearCentralized

func (u *VenueUpsert) ClearCentralized() *VenueUpsert

ClearCentralized clears the value of the "centralized" field.

func (*VenueUpsert) ClearCountry

func (u *VenueUpsert) ClearCountry() *VenueUpsert

ClearCountry clears the value of the "country" field.

func (*VenueUpsert) ClearHasTradingIncentive

func (u *VenueUpsert) ClearHasTradingIncentive() *VenueUpsert

ClearHasTradingIncentive clears the value of the "has_trading_incentive" field.

func (*VenueUpsert) ClearImage

func (u *VenueUpsert) ClearImage() *VenueUpsert

ClearImage clears the value of the "image" field.

func (u *VenueUpsert) ClearLinks() *VenueUpsert

ClearLinks clears the value of the "links" field.

func (*VenueUpsert) ClearMakerFee

func (u *VenueUpsert) ClearMakerFee() *VenueUpsert

ClearMakerFee clears the value of the "maker_fee" field.

func (*VenueUpsert) ClearName

func (u *VenueUpsert) ClearName() *VenueUpsert

ClearName clears the value of the "name" field.

func (*VenueUpsert) ClearPublicNotice

func (u *VenueUpsert) ClearPublicNotice() *VenueUpsert

ClearPublicNotice clears the value of the "public_notice" field.

func (*VenueUpsert) ClearSpreadFee

func (u *VenueUpsert) ClearSpreadFee() *VenueUpsert

ClearSpreadFee clears the value of the "spread_fee" field.

func (*VenueUpsert) ClearSupportAPI

func (u *VenueUpsert) ClearSupportAPI() *VenueUpsert

ClearSupportAPI clears the value of the "support_api" field.

func (*VenueUpsert) ClearTakerFee

func (u *VenueUpsert) ClearTakerFee() *VenueUpsert

ClearTakerFee clears the value of the "taker_fee" field.

func (*VenueUpsert) ClearTradeVolume24hBtc

func (u *VenueUpsert) ClearTradeVolume24hBtc() *VenueUpsert

ClearTradeVolume24hBtc clears the value of the "trade_volume_24h_btc" field.

func (*VenueUpsert) ClearTradeVolume24hBtcNormalized

func (u *VenueUpsert) ClearTradeVolume24hBtcNormalized() *VenueUpsert

ClearTradeVolume24hBtcNormalized clears the value of the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsert) ClearTrustScore

func (u *VenueUpsert) ClearTrustScore() *VenueUpsert

ClearTrustScore clears the value of the "trust_score" field.

func (*VenueUpsert) ClearTrustScoreRank

func (u *VenueUpsert) ClearTrustScoreRank() *VenueUpsert

ClearTrustScoreRank clears the value of the "trust_score_rank" field.

func (*VenueUpsert) ClearYearEstablished

func (u *VenueUpsert) ClearYearEstablished() *VenueUpsert

ClearYearEstablished clears the value of the "year_established" field.

func (*VenueUpsert) SetAlertNotice

func (u *VenueUpsert) SetAlertNotice(v string) *VenueUpsert

SetAlertNotice sets the "alert_notice" field.

func (*VenueUpsert) SetCentralized

func (u *VenueUpsert) SetCentralized(v bool) *VenueUpsert

SetCentralized sets the "centralized" field.

func (*VenueUpsert) SetCountry

func (u *VenueUpsert) SetCountry(v string) *VenueUpsert

SetCountry sets the "country" field.

func (*VenueUpsert) SetHasTradingIncentive

func (u *VenueUpsert) SetHasTradingIncentive(v bool) *VenueUpsert

SetHasTradingIncentive sets the "has_trading_incentive" field.

func (*VenueUpsert) SetImage

func (u *VenueUpsert) SetImage(v string) *VenueUpsert

SetImage sets the "image" field.

func (u *VenueUpsert) SetLinks(v map[string]string) *VenueUpsert

SetLinks sets the "links" field.

func (*VenueUpsert) SetMakerFee

func (u *VenueUpsert) SetMakerFee(v float64) *VenueUpsert

SetMakerFee sets the "maker_fee" field.

func (*VenueUpsert) SetName

func (u *VenueUpsert) SetName(v string) *VenueUpsert

SetName sets the "name" field.

func (*VenueUpsert) SetPublicNotice

func (u *VenueUpsert) SetPublicNotice(v string) *VenueUpsert

SetPublicNotice sets the "public_notice" field.

func (*VenueUpsert) SetSpreadFee

func (u *VenueUpsert) SetSpreadFee(v bool) *VenueUpsert

SetSpreadFee sets the "spread_fee" field.

func (*VenueUpsert) SetSupportAPI

func (u *VenueUpsert) SetSupportAPI(v bool) *VenueUpsert

SetSupportAPI sets the "support_api" field.

func (*VenueUpsert) SetTakerFee

func (u *VenueUpsert) SetTakerFee(v float64) *VenueUpsert

SetTakerFee sets the "taker_fee" field.

func (*VenueUpsert) SetTradeVolume24hBtc

func (u *VenueUpsert) SetTradeVolume24hBtc(v float64) *VenueUpsert

SetTradeVolume24hBtc sets the "trade_volume_24h_btc" field.

func (*VenueUpsert) SetTradeVolume24hBtcNormalized

func (u *VenueUpsert) SetTradeVolume24hBtcNormalized(v float64) *VenueUpsert

SetTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsert) SetTrustScore

func (u *VenueUpsert) SetTrustScore(v int) *VenueUpsert

SetTrustScore sets the "trust_score" field.

func (*VenueUpsert) SetTrustScoreRank

func (u *VenueUpsert) SetTrustScoreRank(v int) *VenueUpsert

SetTrustScoreRank sets the "trust_score_rank" field.

func (*VenueUpsert) SetType

func (u *VenueUpsert) SetType(v venue.Type) *VenueUpsert

SetType sets the "type" field.

func (*VenueUpsert) SetVenueID

func (u *VenueUpsert) SetVenueID(v string) *VenueUpsert

SetVenueID sets the "venue_id" field.

func (*VenueUpsert) SetYearEstablished

func (u *VenueUpsert) SetYearEstablished(v int) *VenueUpsert

SetYearEstablished sets the "year_established" field.

func (*VenueUpsert) UpdateAlertNotice

func (u *VenueUpsert) UpdateAlertNotice() *VenueUpsert

UpdateAlertNotice sets the "alert_notice" field to the value that was provided on create.

func (*VenueUpsert) UpdateCentralized

func (u *VenueUpsert) UpdateCentralized() *VenueUpsert

UpdateCentralized sets the "centralized" field to the value that was provided on create.

func (*VenueUpsert) UpdateCountry

func (u *VenueUpsert) UpdateCountry() *VenueUpsert

UpdateCountry sets the "country" field to the value that was provided on create.

func (*VenueUpsert) UpdateHasTradingIncentive

func (u *VenueUpsert) UpdateHasTradingIncentive() *VenueUpsert

UpdateHasTradingIncentive sets the "has_trading_incentive" field to the value that was provided on create.

func (*VenueUpsert) UpdateImage

func (u *VenueUpsert) UpdateImage() *VenueUpsert

UpdateImage sets the "image" field to the value that was provided on create.

func (u *VenueUpsert) UpdateLinks() *VenueUpsert

UpdateLinks sets the "links" field to the value that was provided on create.

func (*VenueUpsert) UpdateMakerFee

func (u *VenueUpsert) UpdateMakerFee() *VenueUpsert

UpdateMakerFee sets the "maker_fee" field to the value that was provided on create.

func (*VenueUpsert) UpdateName

func (u *VenueUpsert) UpdateName() *VenueUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*VenueUpsert) UpdatePublicNotice

func (u *VenueUpsert) UpdatePublicNotice() *VenueUpsert

UpdatePublicNotice sets the "public_notice" field to the value that was provided on create.

func (*VenueUpsert) UpdateSpreadFee

func (u *VenueUpsert) UpdateSpreadFee() *VenueUpsert

UpdateSpreadFee sets the "spread_fee" field to the value that was provided on create.

func (*VenueUpsert) UpdateSupportAPI

func (u *VenueUpsert) UpdateSupportAPI() *VenueUpsert

UpdateSupportAPI sets the "support_api" field to the value that was provided on create.

func (*VenueUpsert) UpdateTakerFee

func (u *VenueUpsert) UpdateTakerFee() *VenueUpsert

UpdateTakerFee sets the "taker_fee" field to the value that was provided on create.

func (*VenueUpsert) UpdateTradeVolume24hBtc

func (u *VenueUpsert) UpdateTradeVolume24hBtc() *VenueUpsert

UpdateTradeVolume24hBtc sets the "trade_volume_24h_btc" field to the value that was provided on create.

func (*VenueUpsert) UpdateTradeVolume24hBtcNormalized

func (u *VenueUpsert) UpdateTradeVolume24hBtcNormalized() *VenueUpsert

UpdateTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field to the value that was provided on create.

func (*VenueUpsert) UpdateTrustScore

func (u *VenueUpsert) UpdateTrustScore() *VenueUpsert

UpdateTrustScore sets the "trust_score" field to the value that was provided on create.

func (*VenueUpsert) UpdateTrustScoreRank

func (u *VenueUpsert) UpdateTrustScoreRank() *VenueUpsert

UpdateTrustScoreRank sets the "trust_score_rank" field to the value that was provided on create.

func (*VenueUpsert) UpdateType

func (u *VenueUpsert) UpdateType() *VenueUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*VenueUpsert) UpdateVenueID

func (u *VenueUpsert) UpdateVenueID() *VenueUpsert

UpdateVenueID sets the "venue_id" field to the value that was provided on create.

func (*VenueUpsert) UpdateYearEstablished

func (u *VenueUpsert) UpdateYearEstablished() *VenueUpsert

UpdateYearEstablished sets the "year_established" field to the value that was provided on create.

type VenueUpsertBulk

type VenueUpsertBulk struct {
	// contains filtered or unexported fields
}

VenueUpsertBulk is the builder for "upsert"-ing a bulk of Venue nodes.

func (*VenueUpsertBulk) AddMakerFee

func (u *VenueUpsertBulk) AddMakerFee(v float64) *VenueUpsertBulk

AddMakerFee adds v to the "maker_fee" field.

func (*VenueUpsertBulk) AddTakerFee

func (u *VenueUpsertBulk) AddTakerFee(v float64) *VenueUpsertBulk

AddTakerFee adds v to the "taker_fee" field.

func (*VenueUpsertBulk) AddTradeVolume24hBtc

func (u *VenueUpsertBulk) AddTradeVolume24hBtc(v float64) *VenueUpsertBulk

AddTradeVolume24hBtc adds v to the "trade_volume_24h_btc" field.

func (*VenueUpsertBulk) AddTradeVolume24hBtcNormalized

func (u *VenueUpsertBulk) AddTradeVolume24hBtcNormalized(v float64) *VenueUpsertBulk

AddTradeVolume24hBtcNormalized adds v to the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsertBulk) AddTrustScore

func (u *VenueUpsertBulk) AddTrustScore(v int) *VenueUpsertBulk

AddTrustScore adds v to the "trust_score" field.

func (*VenueUpsertBulk) AddTrustScoreRank

func (u *VenueUpsertBulk) AddTrustScoreRank(v int) *VenueUpsertBulk

AddTrustScoreRank adds v to the "trust_score_rank" field.

func (*VenueUpsertBulk) AddYearEstablished

func (u *VenueUpsertBulk) AddYearEstablished(v int) *VenueUpsertBulk

AddYearEstablished adds v to the "year_established" field.

func (*VenueUpsertBulk) ClearAlertNotice

func (u *VenueUpsertBulk) ClearAlertNotice() *VenueUpsertBulk

ClearAlertNotice clears the value of the "alert_notice" field.

func (*VenueUpsertBulk) ClearCentralized

func (u *VenueUpsertBulk) ClearCentralized() *VenueUpsertBulk

ClearCentralized clears the value of the "centralized" field.

func (*VenueUpsertBulk) ClearCountry

func (u *VenueUpsertBulk) ClearCountry() *VenueUpsertBulk

ClearCountry clears the value of the "country" field.

func (*VenueUpsertBulk) ClearHasTradingIncentive

func (u *VenueUpsertBulk) ClearHasTradingIncentive() *VenueUpsertBulk

ClearHasTradingIncentive clears the value of the "has_trading_incentive" field.

func (*VenueUpsertBulk) ClearImage

func (u *VenueUpsertBulk) ClearImage() *VenueUpsertBulk

ClearImage clears the value of the "image" field.

func (u *VenueUpsertBulk) ClearLinks() *VenueUpsertBulk

ClearLinks clears the value of the "links" field.

func (*VenueUpsertBulk) ClearMakerFee

func (u *VenueUpsertBulk) ClearMakerFee() *VenueUpsertBulk

ClearMakerFee clears the value of the "maker_fee" field.

func (*VenueUpsertBulk) ClearName

func (u *VenueUpsertBulk) ClearName() *VenueUpsertBulk

ClearName clears the value of the "name" field.

func (*VenueUpsertBulk) ClearPublicNotice

func (u *VenueUpsertBulk) ClearPublicNotice() *VenueUpsertBulk

ClearPublicNotice clears the value of the "public_notice" field.

func (*VenueUpsertBulk) ClearSpreadFee

func (u *VenueUpsertBulk) ClearSpreadFee() *VenueUpsertBulk

ClearSpreadFee clears the value of the "spread_fee" field.

func (*VenueUpsertBulk) ClearSupportAPI

func (u *VenueUpsertBulk) ClearSupportAPI() *VenueUpsertBulk

ClearSupportAPI clears the value of the "support_api" field.

func (*VenueUpsertBulk) ClearTakerFee

func (u *VenueUpsertBulk) ClearTakerFee() *VenueUpsertBulk

ClearTakerFee clears the value of the "taker_fee" field.

func (*VenueUpsertBulk) ClearTradeVolume24hBtc

func (u *VenueUpsertBulk) ClearTradeVolume24hBtc() *VenueUpsertBulk

ClearTradeVolume24hBtc clears the value of the "trade_volume_24h_btc" field.

func (*VenueUpsertBulk) ClearTradeVolume24hBtcNormalized

func (u *VenueUpsertBulk) ClearTradeVolume24hBtcNormalized() *VenueUpsertBulk

ClearTradeVolume24hBtcNormalized clears the value of the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsertBulk) ClearTrustScore

func (u *VenueUpsertBulk) ClearTrustScore() *VenueUpsertBulk

ClearTrustScore clears the value of the "trust_score" field.

func (*VenueUpsertBulk) ClearTrustScoreRank

func (u *VenueUpsertBulk) ClearTrustScoreRank() *VenueUpsertBulk

ClearTrustScoreRank clears the value of the "trust_score_rank" field.

func (*VenueUpsertBulk) ClearYearEstablished

func (u *VenueUpsertBulk) ClearYearEstablished() *VenueUpsertBulk

ClearYearEstablished clears the value of the "year_established" field.

func (*VenueUpsertBulk) DoNothing

func (u *VenueUpsertBulk) DoNothing() *VenueUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VenueUpsertBulk) Exec

func (u *VenueUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VenueUpsertBulk) ExecX

func (u *VenueUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VenueUpsertBulk) Ignore

func (u *VenueUpsertBulk) Ignore() *VenueUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Venue.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VenueUpsertBulk) SetAlertNotice

func (u *VenueUpsertBulk) SetAlertNotice(v string) *VenueUpsertBulk

SetAlertNotice sets the "alert_notice" field.

func (*VenueUpsertBulk) SetCentralized

func (u *VenueUpsertBulk) SetCentralized(v bool) *VenueUpsertBulk

SetCentralized sets the "centralized" field.

func (*VenueUpsertBulk) SetCountry

func (u *VenueUpsertBulk) SetCountry(v string) *VenueUpsertBulk

SetCountry sets the "country" field.

func (*VenueUpsertBulk) SetHasTradingIncentive

func (u *VenueUpsertBulk) SetHasTradingIncentive(v bool) *VenueUpsertBulk

SetHasTradingIncentive sets the "has_trading_incentive" field.

func (*VenueUpsertBulk) SetImage

func (u *VenueUpsertBulk) SetImage(v string) *VenueUpsertBulk

SetImage sets the "image" field.

func (u *VenueUpsertBulk) SetLinks(v map[string]string) *VenueUpsertBulk

SetLinks sets the "links" field.

func (*VenueUpsertBulk) SetMakerFee

func (u *VenueUpsertBulk) SetMakerFee(v float64) *VenueUpsertBulk

SetMakerFee sets the "maker_fee" field.

func (*VenueUpsertBulk) SetName

func (u *VenueUpsertBulk) SetName(v string) *VenueUpsertBulk

SetName sets the "name" field.

func (*VenueUpsertBulk) SetPublicNotice

func (u *VenueUpsertBulk) SetPublicNotice(v string) *VenueUpsertBulk

SetPublicNotice sets the "public_notice" field.

func (*VenueUpsertBulk) SetSpreadFee

func (u *VenueUpsertBulk) SetSpreadFee(v bool) *VenueUpsertBulk

SetSpreadFee sets the "spread_fee" field.

func (*VenueUpsertBulk) SetSupportAPI

func (u *VenueUpsertBulk) SetSupportAPI(v bool) *VenueUpsertBulk

SetSupportAPI sets the "support_api" field.

func (*VenueUpsertBulk) SetTakerFee

func (u *VenueUpsertBulk) SetTakerFee(v float64) *VenueUpsertBulk

SetTakerFee sets the "taker_fee" field.

func (*VenueUpsertBulk) SetTradeVolume24hBtc

func (u *VenueUpsertBulk) SetTradeVolume24hBtc(v float64) *VenueUpsertBulk

SetTradeVolume24hBtc sets the "trade_volume_24h_btc" field.

func (*VenueUpsertBulk) SetTradeVolume24hBtcNormalized

func (u *VenueUpsertBulk) SetTradeVolume24hBtcNormalized(v float64) *VenueUpsertBulk

SetTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsertBulk) SetTrustScore

func (u *VenueUpsertBulk) SetTrustScore(v int) *VenueUpsertBulk

SetTrustScore sets the "trust_score" field.

func (*VenueUpsertBulk) SetTrustScoreRank

func (u *VenueUpsertBulk) SetTrustScoreRank(v int) *VenueUpsertBulk

SetTrustScoreRank sets the "trust_score_rank" field.

func (*VenueUpsertBulk) SetType

func (u *VenueUpsertBulk) SetType(v venue.Type) *VenueUpsertBulk

SetType sets the "type" field.

func (*VenueUpsertBulk) SetVenueID

func (u *VenueUpsertBulk) SetVenueID(v string) *VenueUpsertBulk

SetVenueID sets the "venue_id" field.

func (*VenueUpsertBulk) SetYearEstablished

func (u *VenueUpsertBulk) SetYearEstablished(v int) *VenueUpsertBulk

SetYearEstablished sets the "year_established" field.

func (*VenueUpsertBulk) Update

func (u *VenueUpsertBulk) Update(set func(*VenueUpsert)) *VenueUpsertBulk

Update allows overriding fields `UPDATE` values. See the VenueCreateBulk.OnConflict documentation for more info.

func (*VenueUpsertBulk) UpdateAlertNotice

func (u *VenueUpsertBulk) UpdateAlertNotice() *VenueUpsertBulk

UpdateAlertNotice sets the "alert_notice" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateCentralized

func (u *VenueUpsertBulk) UpdateCentralized() *VenueUpsertBulk

UpdateCentralized sets the "centralized" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateCountry

func (u *VenueUpsertBulk) UpdateCountry() *VenueUpsertBulk

UpdateCountry sets the "country" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateHasTradingIncentive

func (u *VenueUpsertBulk) UpdateHasTradingIncentive() *VenueUpsertBulk

UpdateHasTradingIncentive sets the "has_trading_incentive" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateImage

func (u *VenueUpsertBulk) UpdateImage() *VenueUpsertBulk

UpdateImage sets the "image" field to the value that was provided on create.

func (u *VenueUpsertBulk) UpdateLinks() *VenueUpsertBulk

UpdateLinks sets the "links" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateMakerFee

func (u *VenueUpsertBulk) UpdateMakerFee() *VenueUpsertBulk

UpdateMakerFee sets the "maker_fee" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateName

func (u *VenueUpsertBulk) UpdateName() *VenueUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateNewValues

func (u *VenueUpsertBulk) UpdateNewValues() *VenueUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Venue.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VenueUpsertBulk) UpdatePublicNotice

func (u *VenueUpsertBulk) UpdatePublicNotice() *VenueUpsertBulk

UpdatePublicNotice sets the "public_notice" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateSpreadFee

func (u *VenueUpsertBulk) UpdateSpreadFee() *VenueUpsertBulk

UpdateSpreadFee sets the "spread_fee" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateSupportAPI

func (u *VenueUpsertBulk) UpdateSupportAPI() *VenueUpsertBulk

UpdateSupportAPI sets the "support_api" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateTakerFee

func (u *VenueUpsertBulk) UpdateTakerFee() *VenueUpsertBulk

UpdateTakerFee sets the "taker_fee" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateTradeVolume24hBtc

func (u *VenueUpsertBulk) UpdateTradeVolume24hBtc() *VenueUpsertBulk

UpdateTradeVolume24hBtc sets the "trade_volume_24h_btc" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateTradeVolume24hBtcNormalized

func (u *VenueUpsertBulk) UpdateTradeVolume24hBtcNormalized() *VenueUpsertBulk

UpdateTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateTrustScore

func (u *VenueUpsertBulk) UpdateTrustScore() *VenueUpsertBulk

UpdateTrustScore sets the "trust_score" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateTrustScoreRank

func (u *VenueUpsertBulk) UpdateTrustScoreRank() *VenueUpsertBulk

UpdateTrustScoreRank sets the "trust_score_rank" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateType

func (u *VenueUpsertBulk) UpdateType() *VenueUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateVenueID

func (u *VenueUpsertBulk) UpdateVenueID() *VenueUpsertBulk

UpdateVenueID sets the "venue_id" field to the value that was provided on create.

func (*VenueUpsertBulk) UpdateYearEstablished

func (u *VenueUpsertBulk) UpdateYearEstablished() *VenueUpsertBulk

UpdateYearEstablished sets the "year_established" field to the value that was provided on create.

type VenueUpsertOne

type VenueUpsertOne struct {
	// contains filtered or unexported fields
}

VenueUpsertOne is the builder for "upsert"-ing

one Venue node.

func (*VenueUpsertOne) AddMakerFee

func (u *VenueUpsertOne) AddMakerFee(v float64) *VenueUpsertOne

AddMakerFee adds v to the "maker_fee" field.

func (*VenueUpsertOne) AddTakerFee

func (u *VenueUpsertOne) AddTakerFee(v float64) *VenueUpsertOne

AddTakerFee adds v to the "taker_fee" field.

func (*VenueUpsertOne) AddTradeVolume24hBtc

func (u *VenueUpsertOne) AddTradeVolume24hBtc(v float64) *VenueUpsertOne

AddTradeVolume24hBtc adds v to the "trade_volume_24h_btc" field.

func (*VenueUpsertOne) AddTradeVolume24hBtcNormalized

func (u *VenueUpsertOne) AddTradeVolume24hBtcNormalized(v float64) *VenueUpsertOne

AddTradeVolume24hBtcNormalized adds v to the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsertOne) AddTrustScore

func (u *VenueUpsertOne) AddTrustScore(v int) *VenueUpsertOne

AddTrustScore adds v to the "trust_score" field.

func (*VenueUpsertOne) AddTrustScoreRank

func (u *VenueUpsertOne) AddTrustScoreRank(v int) *VenueUpsertOne

AddTrustScoreRank adds v to the "trust_score_rank" field.

func (*VenueUpsertOne) AddYearEstablished

func (u *VenueUpsertOne) AddYearEstablished(v int) *VenueUpsertOne

AddYearEstablished adds v to the "year_established" field.

func (*VenueUpsertOne) ClearAlertNotice

func (u *VenueUpsertOne) ClearAlertNotice() *VenueUpsertOne

ClearAlertNotice clears the value of the "alert_notice" field.

func (*VenueUpsertOne) ClearCentralized

func (u *VenueUpsertOne) ClearCentralized() *VenueUpsertOne

ClearCentralized clears the value of the "centralized" field.

func (*VenueUpsertOne) ClearCountry

func (u *VenueUpsertOne) ClearCountry() *VenueUpsertOne

ClearCountry clears the value of the "country" field.

func (*VenueUpsertOne) ClearHasTradingIncentive

func (u *VenueUpsertOne) ClearHasTradingIncentive() *VenueUpsertOne

ClearHasTradingIncentive clears the value of the "has_trading_incentive" field.

func (*VenueUpsertOne) ClearImage

func (u *VenueUpsertOne) ClearImage() *VenueUpsertOne

ClearImage clears the value of the "image" field.

func (u *VenueUpsertOne) ClearLinks() *VenueUpsertOne

ClearLinks clears the value of the "links" field.

func (*VenueUpsertOne) ClearMakerFee

func (u *VenueUpsertOne) ClearMakerFee() *VenueUpsertOne

ClearMakerFee clears the value of the "maker_fee" field.

func (*VenueUpsertOne) ClearName

func (u *VenueUpsertOne) ClearName() *VenueUpsertOne

ClearName clears the value of the "name" field.

func (*VenueUpsertOne) ClearPublicNotice

func (u *VenueUpsertOne) ClearPublicNotice() *VenueUpsertOne

ClearPublicNotice clears the value of the "public_notice" field.

func (*VenueUpsertOne) ClearSpreadFee

func (u *VenueUpsertOne) ClearSpreadFee() *VenueUpsertOne

ClearSpreadFee clears the value of the "spread_fee" field.

func (*VenueUpsertOne) ClearSupportAPI

func (u *VenueUpsertOne) ClearSupportAPI() *VenueUpsertOne

ClearSupportAPI clears the value of the "support_api" field.

func (*VenueUpsertOne) ClearTakerFee

func (u *VenueUpsertOne) ClearTakerFee() *VenueUpsertOne

ClearTakerFee clears the value of the "taker_fee" field.

func (*VenueUpsertOne) ClearTradeVolume24hBtc

func (u *VenueUpsertOne) ClearTradeVolume24hBtc() *VenueUpsertOne

ClearTradeVolume24hBtc clears the value of the "trade_volume_24h_btc" field.

func (*VenueUpsertOne) ClearTradeVolume24hBtcNormalized

func (u *VenueUpsertOne) ClearTradeVolume24hBtcNormalized() *VenueUpsertOne

ClearTradeVolume24hBtcNormalized clears the value of the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsertOne) ClearTrustScore

func (u *VenueUpsertOne) ClearTrustScore() *VenueUpsertOne

ClearTrustScore clears the value of the "trust_score" field.

func (*VenueUpsertOne) ClearTrustScoreRank

func (u *VenueUpsertOne) ClearTrustScoreRank() *VenueUpsertOne

ClearTrustScoreRank clears the value of the "trust_score_rank" field.

func (*VenueUpsertOne) ClearYearEstablished

func (u *VenueUpsertOne) ClearYearEstablished() *VenueUpsertOne

ClearYearEstablished clears the value of the "year_established" field.

func (*VenueUpsertOne) DoNothing

func (u *VenueUpsertOne) DoNothing() *VenueUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VenueUpsertOne) Exec

func (u *VenueUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*VenueUpsertOne) ExecX

func (u *VenueUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VenueUpsertOne) ID

func (u *VenueUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VenueUpsertOne) IDX

func (u *VenueUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*VenueUpsertOne) Ignore

func (u *VenueUpsertOne) Ignore() *VenueUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Venue.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VenueUpsertOne) SetAlertNotice

func (u *VenueUpsertOne) SetAlertNotice(v string) *VenueUpsertOne

SetAlertNotice sets the "alert_notice" field.

func (*VenueUpsertOne) SetCentralized

func (u *VenueUpsertOne) SetCentralized(v bool) *VenueUpsertOne

SetCentralized sets the "centralized" field.

func (*VenueUpsertOne) SetCountry

func (u *VenueUpsertOne) SetCountry(v string) *VenueUpsertOne

SetCountry sets the "country" field.

func (*VenueUpsertOne) SetHasTradingIncentive

func (u *VenueUpsertOne) SetHasTradingIncentive(v bool) *VenueUpsertOne

SetHasTradingIncentive sets the "has_trading_incentive" field.

func (*VenueUpsertOne) SetImage

func (u *VenueUpsertOne) SetImage(v string) *VenueUpsertOne

SetImage sets the "image" field.

func (u *VenueUpsertOne) SetLinks(v map[string]string) *VenueUpsertOne

SetLinks sets the "links" field.

func (*VenueUpsertOne) SetMakerFee

func (u *VenueUpsertOne) SetMakerFee(v float64) *VenueUpsertOne

SetMakerFee sets the "maker_fee" field.

func (*VenueUpsertOne) SetName

func (u *VenueUpsertOne) SetName(v string) *VenueUpsertOne

SetName sets the "name" field.

func (*VenueUpsertOne) SetPublicNotice

func (u *VenueUpsertOne) SetPublicNotice(v string) *VenueUpsertOne

SetPublicNotice sets the "public_notice" field.

func (*VenueUpsertOne) SetSpreadFee

func (u *VenueUpsertOne) SetSpreadFee(v bool) *VenueUpsertOne

SetSpreadFee sets the "spread_fee" field.

func (*VenueUpsertOne) SetSupportAPI

func (u *VenueUpsertOne) SetSupportAPI(v bool) *VenueUpsertOne

SetSupportAPI sets the "support_api" field.

func (*VenueUpsertOne) SetTakerFee

func (u *VenueUpsertOne) SetTakerFee(v float64) *VenueUpsertOne

SetTakerFee sets the "taker_fee" field.

func (*VenueUpsertOne) SetTradeVolume24hBtc

func (u *VenueUpsertOne) SetTradeVolume24hBtc(v float64) *VenueUpsertOne

SetTradeVolume24hBtc sets the "trade_volume_24h_btc" field.

func (*VenueUpsertOne) SetTradeVolume24hBtcNormalized

func (u *VenueUpsertOne) SetTradeVolume24hBtcNormalized(v float64) *VenueUpsertOne

SetTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field.

func (*VenueUpsertOne) SetTrustScore

func (u *VenueUpsertOne) SetTrustScore(v int) *VenueUpsertOne

SetTrustScore sets the "trust_score" field.

func (*VenueUpsertOne) SetTrustScoreRank

func (u *VenueUpsertOne) SetTrustScoreRank(v int) *VenueUpsertOne

SetTrustScoreRank sets the "trust_score_rank" field.

func (*VenueUpsertOne) SetType

func (u *VenueUpsertOne) SetType(v venue.Type) *VenueUpsertOne

SetType sets the "type" field.

func (*VenueUpsertOne) SetVenueID

func (u *VenueUpsertOne) SetVenueID(v string) *VenueUpsertOne

SetVenueID sets the "venue_id" field.

func (*VenueUpsertOne) SetYearEstablished

func (u *VenueUpsertOne) SetYearEstablished(v int) *VenueUpsertOne

SetYearEstablished sets the "year_established" field.

func (*VenueUpsertOne) Update

func (u *VenueUpsertOne) Update(set func(*VenueUpsert)) *VenueUpsertOne

Update allows overriding fields `UPDATE` values. See the VenueCreate.OnConflict documentation for more info.

func (*VenueUpsertOne) UpdateAlertNotice

func (u *VenueUpsertOne) UpdateAlertNotice() *VenueUpsertOne

UpdateAlertNotice sets the "alert_notice" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateCentralized

func (u *VenueUpsertOne) UpdateCentralized() *VenueUpsertOne

UpdateCentralized sets the "centralized" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateCountry

func (u *VenueUpsertOne) UpdateCountry() *VenueUpsertOne

UpdateCountry sets the "country" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateHasTradingIncentive

func (u *VenueUpsertOne) UpdateHasTradingIncentive() *VenueUpsertOne

UpdateHasTradingIncentive sets the "has_trading_incentive" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateImage

func (u *VenueUpsertOne) UpdateImage() *VenueUpsertOne

UpdateImage sets the "image" field to the value that was provided on create.

func (u *VenueUpsertOne) UpdateLinks() *VenueUpsertOne

UpdateLinks sets the "links" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateMakerFee

func (u *VenueUpsertOne) UpdateMakerFee() *VenueUpsertOne

UpdateMakerFee sets the "maker_fee" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateName

func (u *VenueUpsertOne) UpdateName() *VenueUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateNewValues

func (u *VenueUpsertOne) UpdateNewValues() *VenueUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Venue.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VenueUpsertOne) UpdatePublicNotice

func (u *VenueUpsertOne) UpdatePublicNotice() *VenueUpsertOne

UpdatePublicNotice sets the "public_notice" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateSpreadFee

func (u *VenueUpsertOne) UpdateSpreadFee() *VenueUpsertOne

UpdateSpreadFee sets the "spread_fee" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateSupportAPI

func (u *VenueUpsertOne) UpdateSupportAPI() *VenueUpsertOne

UpdateSupportAPI sets the "support_api" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateTakerFee

func (u *VenueUpsertOne) UpdateTakerFee() *VenueUpsertOne

UpdateTakerFee sets the "taker_fee" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateTradeVolume24hBtc

func (u *VenueUpsertOne) UpdateTradeVolume24hBtc() *VenueUpsertOne

UpdateTradeVolume24hBtc sets the "trade_volume_24h_btc" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateTradeVolume24hBtcNormalized

func (u *VenueUpsertOne) UpdateTradeVolume24hBtcNormalized() *VenueUpsertOne

UpdateTradeVolume24hBtcNormalized sets the "trade_volume_24h_btc_normalized" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateTrustScore

func (u *VenueUpsertOne) UpdateTrustScore() *VenueUpsertOne

UpdateTrustScore sets the "trust_score" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateTrustScoreRank

func (u *VenueUpsertOne) UpdateTrustScoreRank() *VenueUpsertOne

UpdateTrustScoreRank sets the "trust_score_rank" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateType

func (u *VenueUpsertOne) UpdateType() *VenueUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateVenueID

func (u *VenueUpsertOne) UpdateVenueID() *VenueUpsertOne

UpdateVenueID sets the "venue_id" field to the value that was provided on create.

func (*VenueUpsertOne) UpdateYearEstablished

func (u *VenueUpsertOne) UpdateYearEstablished() *VenueUpsertOne

UpdateYearEstablished sets the "year_established" field to the value that was provided on create.

type VenueWhereInput

type VenueWhereInput struct {
	Predicates []predicate.Venue  `json:"-"`
	Not        *VenueWhereInput   `json:"not,omitempty"`
	Or         []*VenueWhereInput `json:"or,omitempty"`
	And        []*VenueWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "venue_id" field predicates.
	VenueID             *string  `json:"venueID,omitempty"`
	VenueIDNEQ          *string  `json:"venueIDNEQ,omitempty"`
	VenueIDIn           []string `json:"venueIDIn,omitempty"`
	VenueIDNotIn        []string `json:"venueIDNotIn,omitempty"`
	VenueIDGT           *string  `json:"venueIDGT,omitempty"`
	VenueIDGTE          *string  `json:"venueIDGTE,omitempty"`
	VenueIDLT           *string  `json:"venueIDLT,omitempty"`
	VenueIDLTE          *string  `json:"venueIDLTE,omitempty"`
	VenueIDContains     *string  `json:"venueIDContains,omitempty"`
	VenueIDHasPrefix    *string  `json:"venueIDHasPrefix,omitempty"`
	VenueIDHasSuffix    *string  `json:"venueIDHasSuffix,omitempty"`
	VenueIDEqualFold    *string  `json:"venueIDEqualFold,omitempty"`
	VenueIDContainsFold *string  `json:"venueIDContainsFold,omitempty"`

	// "type" field predicates.
	Type      *venue.Type  `json:"type,omitempty"`
	TypeNEQ   *venue.Type  `json:"typeNEQ,omitempty"`
	TypeIn    []venue.Type `json:"typeIn,omitempty"`
	TypeNotIn []venue.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"`

	// "year_established" field predicates.
	YearEstablished       *int  `json:"yearEstablished,omitempty"`
	YearEstablishedNEQ    *int  `json:"yearEstablishedNEQ,omitempty"`
	YearEstablishedIn     []int `json:"yearEstablishedIn,omitempty"`
	YearEstablishedNotIn  []int `json:"yearEstablishedNotIn,omitempty"`
	YearEstablishedGT     *int  `json:"yearEstablishedGT,omitempty"`
	YearEstablishedGTE    *int  `json:"yearEstablishedGTE,omitempty"`
	YearEstablishedLT     *int  `json:"yearEstablishedLT,omitempty"`
	YearEstablishedLTE    *int  `json:"yearEstablishedLTE,omitempty"`
	YearEstablishedIsNil  bool  `json:"yearEstablishedIsNil,omitempty"`
	YearEstablishedNotNil bool  `json:"yearEstablishedNotNil,omitempty"`

	// "country" field predicates.
	Country             *string  `json:"country,omitempty"`
	CountryNEQ          *string  `json:"countryNEQ,omitempty"`
	CountryIn           []string `json:"countryIn,omitempty"`
	CountryNotIn        []string `json:"countryNotIn,omitempty"`
	CountryGT           *string  `json:"countryGT,omitempty"`
	CountryGTE          *string  `json:"countryGTE,omitempty"`
	CountryLT           *string  `json:"countryLT,omitempty"`
	CountryLTE          *string  `json:"countryLTE,omitempty"`
	CountryContains     *string  `json:"countryContains,omitempty"`
	CountryHasPrefix    *string  `json:"countryHasPrefix,omitempty"`
	CountryHasSuffix    *string  `json:"countryHasSuffix,omitempty"`
	CountryIsNil        bool     `json:"countryIsNil,omitempty"`
	CountryNotNil       bool     `json:"countryNotNil,omitempty"`
	CountryEqualFold    *string  `json:"countryEqualFold,omitempty"`
	CountryContainsFold *string  `json:"countryContainsFold,omitempty"`

	// "image" field predicates.
	Image             *string  `json:"image,omitempty"`
	ImageNEQ          *string  `json:"imageNEQ,omitempty"`
	ImageIn           []string `json:"imageIn,omitempty"`
	ImageNotIn        []string `json:"imageNotIn,omitempty"`
	ImageGT           *string  `json:"imageGT,omitempty"`
	ImageGTE          *string  `json:"imageGTE,omitempty"`
	ImageLT           *string  `json:"imageLT,omitempty"`
	ImageLTE          *string  `json:"imageLTE,omitempty"`
	ImageContains     *string  `json:"imageContains,omitempty"`
	ImageHasPrefix    *string  `json:"imageHasPrefix,omitempty"`
	ImageHasSuffix    *string  `json:"imageHasSuffix,omitempty"`
	ImageIsNil        bool     `json:"imageIsNil,omitempty"`
	ImageNotNil       bool     `json:"imageNotNil,omitempty"`
	ImageEqualFold    *string  `json:"imageEqualFold,omitempty"`
	ImageContainsFold *string  `json:"imageContainsFold,omitempty"`

	// "has_trading_incentive" field predicates.
	HasTradingIncentive       *bool `json:"hasTradingIncentive,omitempty"`
	HasTradingIncentiveNEQ    *bool `json:"hasTradingIncentiveNEQ,omitempty"`
	HasTradingIncentiveIsNil  bool  `json:"hasTradingIncentiveIsNil,omitempty"`
	HasTradingIncentiveNotNil bool  `json:"hasTradingIncentiveNotNil,omitempty"`

	// "centralized" field predicates.
	Centralized       *bool `json:"centralized,omitempty"`
	CentralizedNEQ    *bool `json:"centralizedNEQ,omitempty"`
	CentralizedIsNil  bool  `json:"centralizedIsNil,omitempty"`
	CentralizedNotNil bool  `json:"centralizedNotNil,omitempty"`

	// "public_notice" field predicates.
	PublicNotice             *string  `json:"publicNotice,omitempty"`
	PublicNoticeNEQ          *string  `json:"publicNoticeNEQ,omitempty"`
	PublicNoticeIn           []string `json:"publicNoticeIn,omitempty"`
	PublicNoticeNotIn        []string `json:"publicNoticeNotIn,omitempty"`
	PublicNoticeGT           *string  `json:"publicNoticeGT,omitempty"`
	PublicNoticeGTE          *string  `json:"publicNoticeGTE,omitempty"`
	PublicNoticeLT           *string  `json:"publicNoticeLT,omitempty"`
	PublicNoticeLTE          *string  `json:"publicNoticeLTE,omitempty"`
	PublicNoticeContains     *string  `json:"publicNoticeContains,omitempty"`
	PublicNoticeHasPrefix    *string  `json:"publicNoticeHasPrefix,omitempty"`
	PublicNoticeHasSuffix    *string  `json:"publicNoticeHasSuffix,omitempty"`
	PublicNoticeIsNil        bool     `json:"publicNoticeIsNil,omitempty"`
	PublicNoticeNotNil       bool     `json:"publicNoticeNotNil,omitempty"`
	PublicNoticeEqualFold    *string  `json:"publicNoticeEqualFold,omitempty"`
	PublicNoticeContainsFold *string  `json:"publicNoticeContainsFold,omitempty"`

	// "alert_notice" field predicates.
	AlertNotice             *string  `json:"alertNotice,omitempty"`
	AlertNoticeNEQ          *string  `json:"alertNoticeNEQ,omitempty"`
	AlertNoticeIn           []string `json:"alertNoticeIn,omitempty"`
	AlertNoticeNotIn        []string `json:"alertNoticeNotIn,omitempty"`
	AlertNoticeGT           *string  `json:"alertNoticeGT,omitempty"`
	AlertNoticeGTE          *string  `json:"alertNoticeGTE,omitempty"`
	AlertNoticeLT           *string  `json:"alertNoticeLT,omitempty"`
	AlertNoticeLTE          *string  `json:"alertNoticeLTE,omitempty"`
	AlertNoticeContains     *string  `json:"alertNoticeContains,omitempty"`
	AlertNoticeHasPrefix    *string  `json:"alertNoticeHasPrefix,omitempty"`
	AlertNoticeHasSuffix    *string  `json:"alertNoticeHasSuffix,omitempty"`
	AlertNoticeIsNil        bool     `json:"alertNoticeIsNil,omitempty"`
	AlertNoticeNotNil       bool     `json:"alertNoticeNotNil,omitempty"`
	AlertNoticeEqualFold    *string  `json:"alertNoticeEqualFold,omitempty"`
	AlertNoticeContainsFold *string  `json:"alertNoticeContainsFold,omitempty"`

	// "trust_score" field predicates.
	TrustScore       *int  `json:"trustScore,omitempty"`
	TrustScoreNEQ    *int  `json:"trustScoreNEQ,omitempty"`
	TrustScoreIn     []int `json:"trustScoreIn,omitempty"`
	TrustScoreNotIn  []int `json:"trustScoreNotIn,omitempty"`
	TrustScoreGT     *int  `json:"trustScoreGT,omitempty"`
	TrustScoreGTE    *int  `json:"trustScoreGTE,omitempty"`
	TrustScoreLT     *int  `json:"trustScoreLT,omitempty"`
	TrustScoreLTE    *int  `json:"trustScoreLTE,omitempty"`
	TrustScoreIsNil  bool  `json:"trustScoreIsNil,omitempty"`
	TrustScoreNotNil bool  `json:"trustScoreNotNil,omitempty"`

	// "trust_score_rank" field predicates.
	TrustScoreRank       *int  `json:"trustScoreRank,omitempty"`
	TrustScoreRankNEQ    *int  `json:"trustScoreRankNEQ,omitempty"`
	TrustScoreRankIn     []int `json:"trustScoreRankIn,omitempty"`
	TrustScoreRankNotIn  []int `json:"trustScoreRankNotIn,omitempty"`
	TrustScoreRankGT     *int  `json:"trustScoreRankGT,omitempty"`
	TrustScoreRankGTE    *int  `json:"trustScoreRankGTE,omitempty"`
	TrustScoreRankLT     *int  `json:"trustScoreRankLT,omitempty"`
	TrustScoreRankLTE    *int  `json:"trustScoreRankLTE,omitempty"`
	TrustScoreRankIsNil  bool  `json:"trustScoreRankIsNil,omitempty"`
	TrustScoreRankNotNil bool  `json:"trustScoreRankNotNil,omitempty"`

	// "trade_volume_24h_btc" field predicates.
	TradeVolume24hBtc       *float64  `json:"tradeVolume24hBtc,omitempty"`
	TradeVolume24hBtcNEQ    *float64  `json:"tradeVolume24hBtcNEQ,omitempty"`
	TradeVolume24hBtcIn     []float64 `json:"tradeVolume24hBtcIn,omitempty"`
	TradeVolume24hBtcNotIn  []float64 `json:"tradeVolume24hBtcNotIn,omitempty"`
	TradeVolume24hBtcGT     *float64  `json:"tradeVolume24hBtcGT,omitempty"`
	TradeVolume24hBtcGTE    *float64  `json:"tradeVolume24hBtcGTE,omitempty"`
	TradeVolume24hBtcLT     *float64  `json:"tradeVolume24hBtcLT,omitempty"`
	TradeVolume24hBtcLTE    *float64  `json:"tradeVolume24hBtcLTE,omitempty"`
	TradeVolume24hBtcIsNil  bool      `json:"tradeVolume24hBtcIsNil,omitempty"`
	TradeVolume24hBtcNotNil bool      `json:"tradeVolume24hBtcNotNil,omitempty"`

	// "trade_volume_24h_btc_normalized" field predicates.
	TradeVolume24hBtcNormalized       *float64  `json:"tradeVolume24hBtcNormalized,omitempty"`
	TradeVolume24hBtcNormalizedNEQ    *float64  `json:"tradeVolume24hBtcNormalizedNEQ,omitempty"`
	TradeVolume24hBtcNormalizedIn     []float64 `json:"tradeVolume24hBtcNormalizedIn,omitempty"`
	TradeVolume24hBtcNormalizedNotIn  []float64 `json:"tradeVolume24hBtcNormalizedNotIn,omitempty"`
	TradeVolume24hBtcNormalizedGT     *float64  `json:"tradeVolume24hBtcNormalizedGT,omitempty"`
	TradeVolume24hBtcNormalizedGTE    *float64  `json:"tradeVolume24hBtcNormalizedGTE,omitempty"`
	TradeVolume24hBtcNormalizedLT     *float64  `json:"tradeVolume24hBtcNormalizedLT,omitempty"`
	TradeVolume24hBtcNormalizedLTE    *float64  `json:"tradeVolume24hBtcNormalizedLTE,omitempty"`
	TradeVolume24hBtcNormalizedIsNil  bool      `json:"tradeVolume24hBtcNormalizedIsNil,omitempty"`
	TradeVolume24hBtcNormalizedNotNil bool      `json:"tradeVolume24hBtcNormalizedNotNil,omitempty"`

	// "maker_fee" field predicates.
	MakerFee       *float64  `json:"makerFee,omitempty"`
	MakerFeeNEQ    *float64  `json:"makerFeeNEQ,omitempty"`
	MakerFeeIn     []float64 `json:"makerFeeIn,omitempty"`
	MakerFeeNotIn  []float64 `json:"makerFeeNotIn,omitempty"`
	MakerFeeGT     *float64  `json:"makerFeeGT,omitempty"`
	MakerFeeGTE    *float64  `json:"makerFeeGTE,omitempty"`
	MakerFeeLT     *float64  `json:"makerFeeLT,omitempty"`
	MakerFeeLTE    *float64  `json:"makerFeeLTE,omitempty"`
	MakerFeeIsNil  bool      `json:"makerFeeIsNil,omitempty"`
	MakerFeeNotNil bool      `json:"makerFeeNotNil,omitempty"`

	// "taker_fee" field predicates.
	TakerFee       *float64  `json:"takerFee,omitempty"`
	TakerFeeNEQ    *float64  `json:"takerFeeNEQ,omitempty"`
	TakerFeeIn     []float64 `json:"takerFeeIn,omitempty"`
	TakerFeeNotIn  []float64 `json:"takerFeeNotIn,omitempty"`
	TakerFeeGT     *float64  `json:"takerFeeGT,omitempty"`
	TakerFeeGTE    *float64  `json:"takerFeeGTE,omitempty"`
	TakerFeeLT     *float64  `json:"takerFeeLT,omitempty"`
	TakerFeeLTE    *float64  `json:"takerFeeLTE,omitempty"`
	TakerFeeIsNil  bool      `json:"takerFeeIsNil,omitempty"`
	TakerFeeNotNil bool      `json:"takerFeeNotNil,omitempty"`

	// "spread_fee" field predicates.
	SpreadFee       *bool `json:"spreadFee,omitempty"`
	SpreadFeeNEQ    *bool `json:"spreadFeeNEQ,omitempty"`
	SpreadFeeIsNil  bool  `json:"spreadFeeIsNil,omitempty"`
	SpreadFeeNotNil bool  `json:"spreadFeeNotNil,omitempty"`

	// "support_api" field predicates.
	SupportAPI       *bool `json:"supportAPI,omitempty"`
	SupportAPINEQ    *bool `json:"supportAPINEQ,omitempty"`
	SupportAPIIsNil  bool  `json:"supportAPIIsNil,omitempty"`
	SupportAPINotNil bool  `json:"supportAPINotNil,omitempty"`

	// "ticker" edge predicates.
	HasTicker     *bool               `json:"hasTicker,omitempty"`
	HasTickerWith []*TickerWhereInput `json:"hasTickerWith,omitempty"`

	// "trading_pair" edge predicates.
	HasTradingPair     *bool                    `json:"hasTradingPair,omitempty"`
	HasTradingPairWith []*TradingPairWhereInput `json:"hasTradingPairWith,omitempty"`

	// "market" edge predicates.
	HasMarket     *bool               `json:"hasMarket,omitempty"`
	HasMarketWith []*MarketWhereInput `json:"hasMarketWith,omitempty"`
}

VenueWhereInput represents a where input for filtering Venue queries.

func (*VenueWhereInput) AddPredicates

func (i *VenueWhereInput) AddPredicates(predicates ...predicate.Venue)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*VenueWhereInput) Filter

func (i *VenueWhereInput) Filter(q *VenueQuery) (*VenueQuery, error)

Filter applies the VenueWhereInput filter on the VenueQuery builder.

func (*VenueWhereInput) P

P returns a predicate for filtering venues. An error is returned if the input is empty or invalid.

type Venues

type Venues []*Venue

Venues is a parsable slice of Venue.

Directories

Path Synopsis
Package mock_entities is a generated GoMock package.
Package mock_entities is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL