judge

package
v0.0.0-...-574e995 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the judge type in the database.
	Label = "judge"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldCode holds the string denoting the code field in the database.
	FieldCode = "code"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldConfiguration holds the string denoting the configuration field in the database.
	FieldConfiguration = "configuration"
	// EdgeProblems holds the string denoting the problems edge name in mutations.
	EdgeProblems = "problems"
	// Table holds the table name of the judge in the database.
	Table = "judges"
	// ProblemsTable is the table that holds the problems relation/edge.
	ProblemsTable = "problems"
	// ProblemsInverseTable is the table name for the Problem entity.
	// It exists in this package in order to avoid circular dependency with the "problem" package.
	ProblemsInverseTable = "problems"
	// ProblemsColumn is the table column denoting the problems relation/edge.
	ProblemsColumn = "judge_problems"
)
View Source
const DefaultType = TypeLocal

TypeLocal is the default value of the Type enum.

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// CodeValidator is a validator for the "code" field. It is called by the builders before save.
	CodeValidator func(string) error
)

Columns holds all SQL columns for judge fields.

Functions

func And

func And(predicates ...predicate.Judge) predicate.Judge

And groups predicates with the AND operator between them.

func Code

func Code(v string) predicate.Judge

Code applies equality check predicate on the "code" field. It's identical to CodeEQ.

func CodeContains

func CodeContains(v string) predicate.Judge

CodeContains applies the Contains predicate on the "code" field.

func CodeContainsFold

func CodeContainsFold(v string) predicate.Judge

CodeContainsFold applies the ContainsFold predicate on the "code" field.

func CodeEQ

func CodeEQ(v string) predicate.Judge

CodeEQ applies the EQ predicate on the "code" field.

func CodeEqualFold

func CodeEqualFold(v string) predicate.Judge

CodeEqualFold applies the EqualFold predicate on the "code" field.

func CodeGT

func CodeGT(v string) predicate.Judge

CodeGT applies the GT predicate on the "code" field.

func CodeGTE

func CodeGTE(v string) predicate.Judge

CodeGTE applies the GTE predicate on the "code" field.

func CodeHasPrefix

func CodeHasPrefix(v string) predicate.Judge

CodeHasPrefix applies the HasPrefix predicate on the "code" field.

func CodeHasSuffix

func CodeHasSuffix(v string) predicate.Judge

CodeHasSuffix applies the HasSuffix predicate on the "code" field.

func CodeIn

func CodeIn(vs ...string) predicate.Judge

CodeIn applies the In predicate on the "code" field.

func CodeLT

func CodeLT(v string) predicate.Judge

CodeLT applies the LT predicate on the "code" field.

func CodeLTE

func CodeLTE(v string) predicate.Judge

CodeLTE applies the LTE predicate on the "code" field.

func CodeNEQ

func CodeNEQ(v string) predicate.Judge

CodeNEQ applies the NEQ predicate on the "code" field.

func CodeNotIn

func CodeNotIn(vs ...string) predicate.Judge

CodeNotIn applies the NotIn predicate on the "code" field.

func Configuration

func Configuration(v string) predicate.Judge

Configuration applies equality check predicate on the "configuration" field. It's identical to ConfigurationEQ.

func ConfigurationContains

func ConfigurationContains(v string) predicate.Judge

ConfigurationContains applies the Contains predicate on the "configuration" field.

func ConfigurationContainsFold

func ConfigurationContainsFold(v string) predicate.Judge

ConfigurationContainsFold applies the ContainsFold predicate on the "configuration" field.

func ConfigurationEQ

func ConfigurationEQ(v string) predicate.Judge

ConfigurationEQ applies the EQ predicate on the "configuration" field.

func ConfigurationEqualFold

func ConfigurationEqualFold(v string) predicate.Judge

ConfigurationEqualFold applies the EqualFold predicate on the "configuration" field.

func ConfigurationGT

func ConfigurationGT(v string) predicate.Judge

ConfigurationGT applies the GT predicate on the "configuration" field.

func ConfigurationGTE

func ConfigurationGTE(v string) predicate.Judge

ConfigurationGTE applies the GTE predicate on the "configuration" field.

func ConfigurationHasPrefix

func ConfigurationHasPrefix(v string) predicate.Judge

ConfigurationHasPrefix applies the HasPrefix predicate on the "configuration" field.

func ConfigurationHasSuffix

func ConfigurationHasSuffix(v string) predicate.Judge

ConfigurationHasSuffix applies the HasSuffix predicate on the "configuration" field.

func ConfigurationIn

func ConfigurationIn(vs ...string) predicate.Judge

ConfigurationIn applies the In predicate on the "configuration" field.

func ConfigurationLT

func ConfigurationLT(v string) predicate.Judge

ConfigurationLT applies the LT predicate on the "configuration" field.

func ConfigurationLTE

func ConfigurationLTE(v string) predicate.Judge

ConfigurationLTE applies the LTE predicate on the "configuration" field.

func ConfigurationNEQ

func ConfigurationNEQ(v string) predicate.Judge

ConfigurationNEQ applies the NEQ predicate on the "configuration" field.

func ConfigurationNotIn

func ConfigurationNotIn(vs ...string) predicate.Judge

ConfigurationNotIn applies the NotIn predicate on the "configuration" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Judge

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Judge

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Judge

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Judge

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Judge

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Judge

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Judge

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Judge

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Judge

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasProblems

func HasProblems() predicate.Judge

HasProblems applies the HasEdge predicate on the "problems" edge.

func HasProblemsWith

func HasProblemsWith(preds ...predicate.Problem) predicate.Judge

HasProblemsWith applies the HasEdge predicate on the "problems" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Judge

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Judge

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Judge

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Judge

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Judge

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Judge

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Judge

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Judge

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Judge

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Judge

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Judge

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Judge

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Judge

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Judge

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Judge

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Judge

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Judge

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Judge

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Judge

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Judge

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Judge

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Judge

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Judge

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Judge) predicate.Judge

Or groups predicates with the OR operator between them.

func TypeEQ

func TypeEQ(v Type) predicate.Judge

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Judge

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Judge

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Judge

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Judge

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Judge

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Judge

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Judge

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Judge

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Judge

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Judge

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Judge

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Judge

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Judge queries.

func ByCode

func ByCode(opts ...sql.OrderTermOption) OrderOption

ByCode orders the results by the code field.

func ByConfiguration

func ByConfiguration(opts ...sql.OrderTermOption) OrderOption

ByConfiguration orders the results by the configuration field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByProblems

func ByProblems(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByProblems orders the results by problems terms.

func ByProblemsCount

func ByProblemsCount(opts ...sql.OrderTermOption) OrderOption

ByProblemsCount orders the results by problems count.

func ByType

func ByType(opts ...sql.OrderTermOption) OrderOption

ByType orders the results by the type field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeLocal      Type = "local"
	TypeCodeforces Type = "codeforces"
	TypeVjudge     Type = "vjudge"
	TypeSyoj       Type = "syoj"
	TypeNoop       Type = "noop"
)

Type values.

func (Type) MarshalGQL

func (e Type) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Type) String

func (_type Type) String() string

func (*Type) UnmarshalGQL

func (e *Type) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL