Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Market) predicate.Market
- func HasTradingPair() predicate.Market
- func HasTradingPairWith(preds ...predicate.TradingPair) predicate.Market
- func HasVenue() predicate.Market
- func HasVenueWith(preds ...predicate.Venue) predicate.Market
- func ID(id int) predicate.Market
- func IDEQ(id int) predicate.Market
- func IDGT(id int) predicate.Market
- func IDGTE(id int) predicate.Market
- func IDIn(ids ...int) predicate.Market
- func IDLT(id int) predicate.Market
- func IDLTE(id int) predicate.Market
- func IDNEQ(id int) predicate.Market
- func IDNotIn(ids ...int) predicate.Market
- func Name(v string) predicate.Market
- func NameContains(v string) predicate.Market
- func NameContainsFold(v string) predicate.Market
- func NameEQ(v string) predicate.Market
- func NameEqualFold(v string) predicate.Market
- func NameGT(v string) predicate.Market
- func NameGTE(v string) predicate.Market
- func NameHasPrefix(v string) predicate.Market
- func NameHasSuffix(v string) predicate.Market
- func NameIn(vs ...string) predicate.Market
- func NameLT(v string) predicate.Market
- func NameLTE(v string) predicate.Market
- func NameNEQ(v string) predicate.Market
- func NameNotIn(vs ...string) predicate.Market
- func Not(p predicate.Market) predicate.Market
- func Or(predicates ...predicate.Market) predicate.Market
- func TypeEQ(v Type) predicate.Market
- func TypeIn(vs ...Type) predicate.Market
- func TypeNEQ(v Type) predicate.Market
- func TypeNotIn(vs ...Type) predicate.Market
- func TypeValidator(_type Type) error
- func ValidColumn(column string) bool
- type Type
Constants ¶
const ( // Label holds the string label denoting the market type in the database. Label = "market" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldType holds the string denoting the type field in the database. FieldType = "type" // EdgeVenue holds the string denoting the venue edge name in mutations. EdgeVenue = "venue" // EdgeTradingPair holds the string denoting the trading_pair edge name in mutations. EdgeTradingPair = "trading_pair" // Table holds the table name of the market in the database. Table = "markets" // VenueTable is the table that holds the venue relation/edge. VenueTable = "markets" // VenueInverseTable is the table name for the Venue entity. // It exists in this package in order to avoid circular dependency with the "venue" package. VenueInverseTable = "venues" // VenueColumn is the table column denoting the venue relation/edge. VenueColumn = "venue_market" // TradingPairTable is the table that holds the trading_pair relation/edge. The primary key declared below. TradingPairTable = "market_trading_pair" // TradingPairInverseTable is the table name for the TradingPair entity. // It exists in this package in order to avoid circular dependency with the "tradingpair" package. TradingPairInverseTable = "trading_pairs" )
Variables ¶
var Columns = []string{ FieldID, FieldName, FieldType, }
Columns holds all SQL columns for market fields.
var ForeignKeys = []string{
"venue_market",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "markets" table and are not defined as standalone fields in the schema.
var ( // TradingPairPrimaryKey and TradingPairColumn2 are the table columns denoting the // primary key for the trading_pair relation (M2M). TradingPairPrimaryKey = []string{"market_id", "trading_pair_id"} )
Functions ¶
func HasTradingPair ¶
HasTradingPair applies the HasEdge predicate on the "trading_pair" edge.
func HasTradingPairWith ¶
func HasTradingPairWith(preds ...predicate.TradingPair) predicate.Market
HasTradingPairWith applies the HasEdge predicate on the "trading_pair" edge with a given conditions (other predicates).
func HasVenueWith ¶
HasVenueWith applies the HasEdge predicate on the "venue" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type Type ¶
type Type string
Type defines the type for the "type" enum field.
const ( TypeSPOT_TRADING Type = "SPOT_TRADING" TypeMARGIN_TRADING Type = "MARGIN_TRADING" TypeDERIVATIVES Type = "DERIVATIVES" TypeEARN Type = "EARN" TypePERPETUAL Type = "PERPETUAL" TypeFUTURES Type = "FUTURES" TypeWARRANT Type = "WARRANT" TypeOTC Type = "OTC" TypeYIELD Type = "YIELD" TypeP2P Type = "P2P" TypeSTRATEGY_TRADING Type = "STRATEGY_TRADING" TypeSWAP_FARMING Type = "SWAP_FARMING" TypeFAN_TOKEN Type = "FAN_TOKEN" TypeETF Type = "ETF" TypeNFT Type = "NFT" TypeSWAP Type = "SWAP" TypeCFD Type = "CFD" TypeLIQUIDITY Type = "LIQUIDITY" TypeFARM Type = "FARM" )
Type values.
func (Type) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Type) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.