submission

package
v0.0.0-...-bcec15c Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the submission type in the database.
	Label = "submission"
	// 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"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldVerdict holds the string denoting the verdict field in the database.
	FieldVerdict = "verdict"
	// FieldTestCount holds the string denoting the test_count field in the database.
	FieldTestCount = "test_count"
	// EdgeProblem holds the string denoting the problem edge name in mutations.
	EdgeProblem = "problem"
	// Table holds the table name of the submission in the database.
	Table = "submissions"
	// ProblemTable is the table that holds the problem relation/edge.
	ProblemTable = "submissions"
	// ProblemInverseTable is the table name for the Problem entity.
	// It exists in this package in order to avoid circular dependency with the "problem" package.
	ProblemInverseTable = "problems"
	// ProblemColumn is the table column denoting the problem relation/edge.
	ProblemColumn = "problem_submissions"
)
View Source
const DefaultStatus = StatusPending

StatusPending is the default value of the Status enum.

View Source
const DefaultVerdict = VerdictOK

VerdictOK is the default value of the Verdict 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
	// DefaultTestCount holds the default value on creation for the "test_count" field.
	DefaultTestCount int
	// TestCountValidator is a validator for the "test_count" field. It is called by the builders before save.
	TestCountValidator func(int) error
)

Columns holds all SQL columns for submission fields.

View Source
var ForeignKeys = []string{
	"problem_submissions",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "submissions" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Submission) predicate.Submission

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Submission

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Submission

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Submission

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Submission

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Submission

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Submission

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Submission

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

func CreatedAtNotIn

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

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

func HasProblem

func HasProblem() predicate.Submission

HasProblem applies the HasEdge predicate on the "problem" edge.

func HasProblemWith

func HasProblemWith(preds ...predicate.Problem) predicate.Submission

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

func ID

func ID(id int) predicate.Submission

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Submission

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Submission

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Submission

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Submission

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Submission

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Submission

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Submission) predicate.Submission

Or groups predicates with the OR operator between them.

func StatusEQ

func StatusEQ(v Status) predicate.Submission

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Submission

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Submission

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Submission

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

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

func TestCount

func TestCount(v int) predicate.Submission

TestCount applies equality check predicate on the "test_count" field. It's identical to TestCountEQ.

func TestCountEQ

func TestCountEQ(v int) predicate.Submission

TestCountEQ applies the EQ predicate on the "test_count" field.

func TestCountGT

func TestCountGT(v int) predicate.Submission

TestCountGT applies the GT predicate on the "test_count" field.

func TestCountGTE

func TestCountGTE(v int) predicate.Submission

TestCountGTE applies the GTE predicate on the "test_count" field.

func TestCountIn

func TestCountIn(vs ...int) predicate.Submission

TestCountIn applies the In predicate on the "test_count" field.

func TestCountLT

func TestCountLT(v int) predicate.Submission

TestCountLT applies the LT predicate on the "test_count" field.

func TestCountLTE

func TestCountLTE(v int) predicate.Submission

TestCountLTE applies the LTE predicate on the "test_count" field.

func TestCountNEQ

func TestCountNEQ(v int) predicate.Submission

TestCountNEQ applies the NEQ predicate on the "test_count" field.

func TestCountNotIn

func TestCountNotIn(vs ...int) predicate.Submission

TestCountNotIn applies the NotIn predicate on the "test_count" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Submission

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Submission

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Submission

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Submission

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Submission

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Submission

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Submission

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

func UpdatedAtNotIn

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

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).

func VerdictEQ

func VerdictEQ(v Verdict) predicate.Submission

VerdictEQ applies the EQ predicate on the "verdict" field.

func VerdictIn

func VerdictIn(vs ...Verdict) predicate.Submission

VerdictIn applies the In predicate on the "verdict" field.

func VerdictNEQ

func VerdictNEQ(v Verdict) predicate.Submission

VerdictNEQ applies the NEQ predicate on the "verdict" field.

func VerdictNotIn

func VerdictNotIn(vs ...Verdict) predicate.Submission

VerdictNotIn applies the NotIn predicate on the "verdict" field.

func VerdictValidator

func VerdictValidator(v Verdict) error

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Submission queries.

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 ByProblemField

func ByProblemField(field string, opts ...sql.OrderTermOption) OrderOption

ByProblemField orders the results by problem field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByTestCount

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

ByTestCount orders the results by the test_count field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByVerdict

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

ByVerdict orders the results by the verdict field.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusPending   Status = "pending"
	StatusCompiling Status = "compiling"
	StatusJudging   Status = "judging"
	StatusFinished  Status = "finished"
)

Status values.

func (Status) MarshalGQL

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

MarshalGQL implements graphql.Marshaler interface.

func (Status) String

func (s Status) String() string

func (*Status) UnmarshalGQL

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

UnmarshalGQL implements graphql.Unmarshaler interface.

type Verdict

type Verdict string

Verdict defines the type for the "verdict" enum field.

const (
	VerdictOK      Verdict = "OK"
	VerdictTLE     Verdict = "TLE"
	VerdictMLE     Verdict = "MLE"
	VerdictILE     Verdict = "ILE"
	VerdictWA      Verdict = "WA"
	VerdictCE      Verdict = "CE"
	VerdictRE      Verdict = "RE"
	VerdictPE      Verdict = "PE"
	VerdictCRASHED Verdict = "CRASHED"
	VerdictOTHER   Verdict = "OTHER"
)

Verdict values.

func (Verdict) MarshalGQL

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

MarshalGQL implements graphql.Marshaler interface.

func (Verdict) String

func (v Verdict) String() string

func (*Verdict) UnmarshalGQL

func (e *Verdict) 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