Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Submission) predicate.Submission
- func CreatedAt(v time.Time) predicate.Submission
- func CreatedAtEQ(v time.Time) predicate.Submission
- func CreatedAtGT(v time.Time) predicate.Submission
- func CreatedAtGTE(v time.Time) predicate.Submission
- func CreatedAtIn(vs ...time.Time) predicate.Submission
- func CreatedAtLT(v time.Time) predicate.Submission
- func CreatedAtLTE(v time.Time) predicate.Submission
- func CreatedAtNEQ(v time.Time) predicate.Submission
- func CreatedAtNotIn(vs ...time.Time) predicate.Submission
- func HasProblem() predicate.Submission
- func HasProblemWith(preds ...predicate.Problem) predicate.Submission
- func ID(id int) predicate.Submission
- func IDEQ(id int) predicate.Submission
- func IDGT(id int) predicate.Submission
- func IDGTE(id int) predicate.Submission
- func IDIn(ids ...int) predicate.Submission
- func IDLT(id int) predicate.Submission
- func IDLTE(id int) predicate.Submission
- func IDNEQ(id int) predicate.Submission
- func IDNotIn(ids ...int) predicate.Submission
- func Not(p predicate.Submission) predicate.Submission
- func Or(predicates ...predicate.Submission) predicate.Submission
- func StatusEQ(v Status) predicate.Submission
- func StatusIn(vs ...Status) predicate.Submission
- func StatusNEQ(v Status) predicate.Submission
- func StatusNotIn(vs ...Status) predicate.Submission
- func StatusValidator(s Status) error
- func TestCount(v int) predicate.Submission
- func TestCountEQ(v int) predicate.Submission
- func TestCountGT(v int) predicate.Submission
- func TestCountGTE(v int) predicate.Submission
- func TestCountIn(vs ...int) predicate.Submission
- func TestCountLT(v int) predicate.Submission
- func TestCountLTE(v int) predicate.Submission
- func TestCountNEQ(v int) predicate.Submission
- func TestCountNotIn(vs ...int) predicate.Submission
- func UpdatedAt(v time.Time) predicate.Submission
- func UpdatedAtEQ(v time.Time) predicate.Submission
- func UpdatedAtGT(v time.Time) predicate.Submission
- func UpdatedAtGTE(v time.Time) predicate.Submission
- func UpdatedAtIn(vs ...time.Time) predicate.Submission
- func UpdatedAtLT(v time.Time) predicate.Submission
- func UpdatedAtLTE(v time.Time) predicate.Submission
- func UpdatedAtNEQ(v time.Time) predicate.Submission
- func UpdatedAtNotIn(vs ...time.Time) predicate.Submission
- func ValidColumn(column string) bool
- func VerdictEQ(v Verdict) predicate.Submission
- func VerdictIn(vs ...Verdict) predicate.Submission
- func VerdictNEQ(v Verdict) predicate.Submission
- func VerdictNotIn(vs ...Verdict) predicate.Submission
- func VerdictValidator(v Verdict) error
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByProblemField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByTestCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByVerdict(opts ...sql.OrderTermOption) OrderOption
- type Status
- type Verdict
Constants ¶
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" )
const DefaultStatus = StatusPending
StatusPending is the default value of the Status enum.
const DefaultVerdict = VerdictOK
VerdictOK is the default value of the Verdict enum.
Variables ¶
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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldVerdict, FieldTestCount, }
Columns holds all SQL columns for submission fields.
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 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 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 ¶
func Not(p predicate.Submission) predicate.Submission
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 ¶
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 ¶
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 ¶
VerdictValidator is a validator for the "verdict" field enum values. It is called by the builders before save.
Types ¶
type OrderOption ¶
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 ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Status) UnmarshalGQL ¶
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 ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Verdict) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.