Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Match) predicate.Match
- func CreatedTs(v time.Time) predicate.Match
- func CreatedTsEQ(v time.Time) predicate.Match
- func CreatedTsGT(v time.Time) predicate.Match
- func CreatedTsGTE(v time.Time) predicate.Match
- func CreatedTsIn(vs ...time.Time) predicate.Match
- func CreatedTsLT(v time.Time) predicate.Match
- func CreatedTsLTE(v time.Time) predicate.Match
- func CreatedTsNEQ(v time.Time) predicate.Match
- func CreatedTsNotIn(vs ...time.Time) predicate.Match
- func FetchStatusEQ(v FetchStatus) predicate.Match
- func FetchStatusIn(vs ...FetchStatus) predicate.Match
- func FetchStatusNEQ(v FetchStatus) predicate.Match
- func FetchStatusNotIn(vs ...FetchStatus) predicate.Match
- func FetchStatusValidator(fs FetchStatus) error
- func HasMap() predicate.Match
- func HasMapWith(preds ...predicate.OsnMap) predicate.Match
- func HasRoles() predicate.Match
- func HasRolesWith(preds ...predicate.PlayerRole) predicate.Match
- func ID(id int) predicate.Match
- func IDEQ(id int) predicate.Match
- func IDGT(id int) predicate.Match
- func IDGTE(id int) predicate.Match
- func IDIn(ids ...int) predicate.Match
- func IDLT(id int) predicate.Match
- func IDLTE(id int) predicate.Match
- func IDNEQ(id int) predicate.Match
- func IDNotIn(ids ...int) predicate.Match
- func MatchHash(v string) predicate.Match
- func MatchHashContains(v string) predicate.Match
- func MatchHashContainsFold(v string) predicate.Match
- func MatchHashEQ(v string) predicate.Match
- func MatchHashEqualFold(v string) predicate.Match
- func MatchHashGT(v string) predicate.Match
- func MatchHashGTE(v string) predicate.Match
- func MatchHashHasPrefix(v string) predicate.Match
- func MatchHashHasSuffix(v string) predicate.Match
- func MatchHashIn(vs ...string) predicate.Match
- func MatchHashLT(v string) predicate.Match
- func MatchHashLTE(v string) predicate.Match
- func MatchHashNEQ(v string) predicate.Match
- func MatchHashNotIn(vs ...string) predicate.Match
- func Not(p predicate.Match) predicate.Match
- func Or(predicates ...predicate.Match) predicate.Match
- func Season(v int8) predicate.Match
- func SeasonEQ(v int8) predicate.Match
- func SeasonGT(v int8) predicate.Match
- func SeasonGTE(v int8) predicate.Match
- func SeasonIn(vs ...int8) predicate.Match
- func SeasonLT(v int8) predicate.Match
- func SeasonLTE(v int8) predicate.Match
- func SeasonNEQ(v int8) predicate.Match
- func SeasonNotIn(vs ...int8) predicate.Match
- func TurnCount(v int) predicate.Match
- func TurnCountEQ(v int) predicate.Match
- func TurnCountGT(v int) predicate.Match
- func TurnCountGTE(v int) predicate.Match
- func TurnCountIn(vs ...int) predicate.Match
- func TurnCountLT(v int) predicate.Match
- func TurnCountLTE(v int) predicate.Match
- func TurnCountNEQ(v int) predicate.Match
- func TurnCountNotIn(vs ...int) predicate.Match
- func ValidColumn(column string) bool
- func Version(v int) predicate.Match
- func VersionEQ(v int) predicate.Match
- func VersionGT(v int) predicate.Match
- func VersionGTE(v int) predicate.Match
- func VersionIn(vs ...int) predicate.Match
- func VersionLT(v int) predicate.Match
- func VersionLTE(v int) predicate.Match
- func VersionNEQ(v int) predicate.Match
- func VersionNotIn(vs ...int) predicate.Match
- type FetchStatus
- type OrderOption
- func ByCreatedTs(opts ...sql.OrderTermOption) OrderOption
- func ByFetchStatus(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMapField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByMatchHash(opts ...sql.OrderTermOption) OrderOption
- func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRolesCount(opts ...sql.OrderTermOption) OrderOption
- func BySeason(opts ...sql.OrderTermOption) OrderOption
- func ByTurnCount(opts ...sql.OrderTermOption) OrderOption
- func ByVersion(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the match type in the database. Label = "match" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldMatchHash holds the string denoting the match_hash field in the database. FieldMatchHash = "match_hash" // FieldVersion holds the string denoting the version field in the database. FieldVersion = "version" // FieldSeason holds the string denoting the season field in the database. FieldSeason = "season" // FieldCreatedTs holds the string denoting the created_ts field in the database. FieldCreatedTs = "created_ts" // FieldTurnCount holds the string denoting the turn_count field in the database. FieldTurnCount = "turn_count" // FieldFetchStatus holds the string denoting the fetch_status field in the database. FieldFetchStatus = "fetch_status" // EdgeMap holds the string denoting the map edge name in mutations. EdgeMap = "map" // EdgeRoles holds the string denoting the roles edge name in mutations. EdgeRoles = "roles" // Table holds the table name of the match in the database. Table = "matches" // MapTable is the table that holds the map relation/edge. MapTable = "matches" // MapInverseTable is the table name for the OsnMap entity. // It exists in this package in order to avoid circular dependency with the "osnmap" package. MapInverseTable = "osn_maps" // MapColumn is the table column denoting the map relation/edge. MapColumn = "osn_map_matches" // RolesTable is the table that holds the roles relation/edge. The primary key declared below. RolesTable = "player_role_match" // RolesInverseTable is the table name for the PlayerRole entity. // It exists in this package in order to avoid circular dependency with the "playerrole" package. RolesInverseTable = "player_roles" )
const DefaultFetchStatus = FetchStatusLISTED
FetchStatusLISTED is the default value of the FetchStatus enum.
Variables ¶
var ( // DefaultSeason holds the default value on creation for the "season" field. DefaultSeason int8 // DefaultCreatedTs holds the default value on creation for the "created_ts" field. DefaultCreatedTs func() time.Time )
var Columns = []string{ FieldID, FieldMatchHash, FieldVersion, FieldSeason, FieldCreatedTs, FieldTurnCount, FieldFetchStatus, }
Columns holds all SQL columns for match fields.
var ForeignKeys = []string{
"osn_map_matches",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "matches" table and are not defined as standalone fields in the schema.
var ( // RolesPrimaryKey and RolesColumn2 are the table columns denoting the // primary key for the roles relation (M2M). RolesPrimaryKey = []string{"role_match", "id"} )
Functions ¶
func CreatedTs ¶
CreatedTs applies equality check predicate on the "created_ts" field. It's identical to CreatedTsEQ.
func CreatedTsEQ ¶
CreatedTsEQ applies the EQ predicate on the "created_ts" field.
func CreatedTsGT ¶
CreatedTsGT applies the GT predicate on the "created_ts" field.
func CreatedTsGTE ¶
CreatedTsGTE applies the GTE predicate on the "created_ts" field.
func CreatedTsIn ¶
CreatedTsIn applies the In predicate on the "created_ts" field.
func CreatedTsLT ¶
CreatedTsLT applies the LT predicate on the "created_ts" field.
func CreatedTsLTE ¶
CreatedTsLTE applies the LTE predicate on the "created_ts" field.
func CreatedTsNEQ ¶
CreatedTsNEQ applies the NEQ predicate on the "created_ts" field.
func CreatedTsNotIn ¶
CreatedTsNotIn applies the NotIn predicate on the "created_ts" field.
func FetchStatusEQ ¶
func FetchStatusEQ(v FetchStatus) predicate.Match
FetchStatusEQ applies the EQ predicate on the "fetch_status" field.
func FetchStatusIn ¶
func FetchStatusIn(vs ...FetchStatus) predicate.Match
FetchStatusIn applies the In predicate on the "fetch_status" field.
func FetchStatusNEQ ¶
func FetchStatusNEQ(v FetchStatus) predicate.Match
FetchStatusNEQ applies the NEQ predicate on the "fetch_status" field.
func FetchStatusNotIn ¶
func FetchStatusNotIn(vs ...FetchStatus) predicate.Match
FetchStatusNotIn applies the NotIn predicate on the "fetch_status" field.
func FetchStatusValidator ¶
func FetchStatusValidator(fs FetchStatus) error
FetchStatusValidator is a validator for the "fetch_status" field enum values. It is called by the builders before save.
func HasMapWith ¶
HasMapWith applies the HasEdge predicate on the "map" edge with a given conditions (other predicates).
func HasRolesWith ¶
func HasRolesWith(preds ...predicate.PlayerRole) predicate.Match
HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).
func MatchHash ¶
MatchHash applies equality check predicate on the "match_hash" field. It's identical to MatchHashEQ.
func MatchHashContains ¶
MatchHashContains applies the Contains predicate on the "match_hash" field.
func MatchHashContainsFold ¶
MatchHashContainsFold applies the ContainsFold predicate on the "match_hash" field.
func MatchHashEQ ¶
MatchHashEQ applies the EQ predicate on the "match_hash" field.
func MatchHashEqualFold ¶
MatchHashEqualFold applies the EqualFold predicate on the "match_hash" field.
func MatchHashGT ¶
MatchHashGT applies the GT predicate on the "match_hash" field.
func MatchHashGTE ¶
MatchHashGTE applies the GTE predicate on the "match_hash" field.
func MatchHashHasPrefix ¶
MatchHashHasPrefix applies the HasPrefix predicate on the "match_hash" field.
func MatchHashHasSuffix ¶
MatchHashHasSuffix applies the HasSuffix predicate on the "match_hash" field.
func MatchHashIn ¶
MatchHashIn applies the In predicate on the "match_hash" field.
func MatchHashLT ¶
MatchHashLT applies the LT predicate on the "match_hash" field.
func MatchHashLTE ¶
MatchHashLTE applies the LTE predicate on the "match_hash" field.
func MatchHashNEQ ¶
MatchHashNEQ applies the NEQ predicate on the "match_hash" field.
func MatchHashNotIn ¶
MatchHashNotIn applies the NotIn predicate on the "match_hash" field.
func Season ¶
Season applies equality check predicate on the "season" field. It's identical to SeasonEQ.
func SeasonNotIn ¶
SeasonNotIn applies the NotIn predicate on the "season" field.
func TurnCount ¶
TurnCount applies equality check predicate on the "turn_count" field. It's identical to TurnCountEQ.
func TurnCountEQ ¶
TurnCountEQ applies the EQ predicate on the "turn_count" field.
func TurnCountGT ¶
TurnCountGT applies the GT predicate on the "turn_count" field.
func TurnCountGTE ¶
TurnCountGTE applies the GTE predicate on the "turn_count" field.
func TurnCountIn ¶
TurnCountIn applies the In predicate on the "turn_count" field.
func TurnCountLT ¶
TurnCountLT applies the LT predicate on the "turn_count" field.
func TurnCountLTE ¶
TurnCountLTE applies the LTE predicate on the "turn_count" field.
func TurnCountNEQ ¶
TurnCountNEQ applies the NEQ predicate on the "turn_count" field.
func TurnCountNotIn ¶
TurnCountNotIn applies the NotIn predicate on the "turn_count" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Version ¶
Version applies equality check predicate on the "version" field. It's identical to VersionEQ.
func VersionGTE ¶
VersionGTE applies the GTE predicate on the "version" field.
func VersionLTE ¶
VersionLTE applies the LTE predicate on the "version" field.
func VersionNEQ ¶
VersionNEQ applies the NEQ predicate on the "version" field.
func VersionNotIn ¶
VersionNotIn applies the NotIn predicate on the "version" field.
Types ¶
type FetchStatus ¶
type FetchStatus string
FetchStatus defines the type for the "fetch_status" enum field.
const ( FetchStatusUNKNOWN FetchStatus = "UNKNOWN" FetchStatusLISTED FetchStatus = "LISTED" FetchStatusFETCHED FetchStatus = "FETCHED" FetchStatusUNWRAPPED FetchStatus = "UNWRAPPED" FetchStatusCONVERTED FetchStatus = "CONVERTED" FetchStatusCANONICAL FetchStatus = "CANONICAL" FetchStatusVALIDATED FetchStatus = "VALIDATED" FetchStatusINDEXED FetchStatus = "INDEXED" FetchStatusINVALID FetchStatus = "INVALID" FetchStatusLEGACY FetchStatus = "LEGACY" )
FetchStatus values.
func (FetchStatus) String ¶
func (fs FetchStatus) String() string
type OrderOption ¶
OrderOption defines the ordering options for the Match queries.
func ByCreatedTs ¶
func ByCreatedTs(opts ...sql.OrderTermOption) OrderOption
ByCreatedTs orders the results by the created_ts field.
func ByFetchStatus ¶
func ByFetchStatus(opts ...sql.OrderTermOption) OrderOption
ByFetchStatus orders the results by the fetch_status field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByMapField ¶
func ByMapField(field string, opts ...sql.OrderTermOption) OrderOption
ByMapField orders the results by map field.
func ByMatchHash ¶
func ByMatchHash(opts ...sql.OrderTermOption) OrderOption
ByMatchHash orders the results by the match_hash field.
func ByRoles ¶
func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRoles orders the results by roles terms.
func ByRolesCount ¶
func ByRolesCount(opts ...sql.OrderTermOption) OrderOption
ByRolesCount orders the results by roles count.
func BySeason ¶
func BySeason(opts ...sql.OrderTermOption) OrderOption
BySeason orders the results by the season field.
func ByTurnCount ¶
func ByTurnCount(opts ...sql.OrderTermOption) OrderOption
ByTurnCount orders the results by the turn_count field.
func ByVersion ¶
func ByVersion(opts ...sql.OrderTermOption) OrderOption
ByVersion orders the results by the version field.