Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Problem) predicate.Problem
- func Code(v string) predicate.Problem
- func CodeContains(v string) predicate.Problem
- func CodeContainsFold(v string) predicate.Problem
- func CodeEQ(v string) predicate.Problem
- func CodeEqualFold(v string) predicate.Problem
- func CodeGT(v string) predicate.Problem
- func CodeGTE(v string) predicate.Problem
- func CodeHasPrefix(v string) predicate.Problem
- func CodeHasSuffix(v string) predicate.Problem
- func CodeIn(vs ...string) predicate.Problem
- func CodeLT(v string) predicate.Problem
- func CodeLTE(v string) predicate.Problem
- func CodeNEQ(v string) predicate.Problem
- func CodeNotIn(vs ...string) predicate.Problem
- func CreatedAt(v time.Time) predicate.Problem
- func CreatedAtEQ(v time.Time) predicate.Problem
- func CreatedAtGT(v time.Time) predicate.Problem
- func CreatedAtGTE(v time.Time) predicate.Problem
- func CreatedAtIn(vs ...time.Time) predicate.Problem
- func CreatedAtLT(v time.Time) predicate.Problem
- func CreatedAtLTE(v time.Time) predicate.Problem
- func CreatedAtNEQ(v time.Time) predicate.Problem
- func CreatedAtNotIn(vs ...time.Time) predicate.Problem
- func HasJudge() predicate.Problem
- func HasJudgeWith(preds ...predicate.Judge) predicate.Problem
- func HasSubmissions() predicate.Problem
- func HasSubmissionsWith(preds ...predicate.Submission) predicate.Problem
- func ID(id int) predicate.Problem
- func IDEQ(id int) predicate.Problem
- func IDGT(id int) predicate.Problem
- func IDGTE(id int) predicate.Problem
- func IDIn(ids ...int) predicate.Problem
- func IDLT(id int) predicate.Problem
- func IDLTE(id int) predicate.Problem
- func IDNEQ(id int) predicate.Problem
- func IDNotIn(ids ...int) predicate.Problem
- func Name(v string) predicate.Problem
- func NameContains(v string) predicate.Problem
- func NameContainsFold(v string) predicate.Problem
- func NameEQ(v string) predicate.Problem
- func NameEqualFold(v string) predicate.Problem
- func NameGT(v string) predicate.Problem
- func NameGTE(v string) predicate.Problem
- func NameHasPrefix(v string) predicate.Problem
- func NameHasSuffix(v string) predicate.Problem
- func NameIn(vs ...string) predicate.Problem
- func NameLT(v string) predicate.Problem
- func NameLTE(v string) predicate.Problem
- func NameNEQ(v string) predicate.Problem
- func NameNotIn(vs ...string) predicate.Problem
- func Not(p predicate.Problem) predicate.Problem
- func Or(predicates ...predicate.Problem) predicate.Problem
- func UpdatedAt(v time.Time) predicate.Problem
- func UpdatedAtEQ(v time.Time) predicate.Problem
- func UpdatedAtGT(v time.Time) predicate.Problem
- func UpdatedAtGTE(v time.Time) predicate.Problem
- func UpdatedAtIn(vs ...time.Time) predicate.Problem
- func UpdatedAtLT(v time.Time) predicate.Problem
- func UpdatedAtLTE(v time.Time) predicate.Problem
- func UpdatedAtNEQ(v time.Time) predicate.Problem
- func UpdatedAtNotIn(vs ...time.Time) predicate.Problem
- func ValidColumn(column string) bool
- type OrderOption
- func ByCode(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByJudgeField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func BySubmissions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubmissionsCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the problem type in the database. Label = "problem" // 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" // EdgeSubmissions holds the string denoting the submissions edge name in mutations. EdgeSubmissions = "submissions" // EdgeJudge holds the string denoting the judge edge name in mutations. EdgeJudge = "judge" // Table holds the table name of the problem in the database. Table = "problems" // SubmissionsTable is the table that holds the submissions relation/edge. SubmissionsTable = "submissions" // SubmissionsInverseTable is the table name for the Submission entity. // It exists in this package in order to avoid circular dependency with the "submission" package. SubmissionsInverseTable = "submissions" // SubmissionsColumn is the table column denoting the submissions relation/edge. SubmissionsColumn = "problem_submissions" // JudgeTable is the table that holds the judge relation/edge. JudgeTable = "problems" // JudgeInverseTable is the table name for the Judge entity. // It exists in this package in order to avoid circular dependency with the "judge" package. JudgeInverseTable = "judges" // JudgeColumn is the table column denoting the judge relation/edge. JudgeColumn = "judge_problems" )
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 // 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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldName, FieldCode, }
Columns holds all SQL columns for problem fields.
var ForeignKeys = []string{
"judge_problems",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "problems" table and are not defined as standalone fields in the schema.
Functions ¶
func CodeContains ¶
CodeContains applies the Contains predicate on the "code" field.
func CodeContainsFold ¶
CodeContainsFold applies the ContainsFold predicate on the "code" field.
func CodeEqualFold ¶
CodeEqualFold applies the EqualFold predicate on the "code" field.
func CodeHasPrefix ¶
CodeHasPrefix applies the HasPrefix predicate on the "code" field.
func CodeHasSuffix ¶
CodeHasSuffix applies the HasSuffix predicate on the "code" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasJudgeWith ¶
HasJudgeWith applies the HasEdge predicate on the "judge" edge with a given conditions (other predicates).
func HasSubmissions ¶
HasSubmissions applies the HasEdge predicate on the "submissions" edge.
func HasSubmissionsWith ¶
func HasSubmissionsWith(preds ...predicate.Submission) predicate.Problem
HasSubmissionsWith applies the HasEdge predicate on the "submissions" 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 UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
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).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Problem queries.
func ByCode ¶
func ByCode(opts ...sql.OrderTermOption) OrderOption
ByCode orders the results by the code 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 ByJudgeField ¶
func ByJudgeField(field string, opts ...sql.OrderTermOption) OrderOption
ByJudgeField orders the results by judge field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func BySubmissions ¶
func BySubmissions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySubmissions orders the results by submissions terms.
func BySubmissionsCount ¶
func BySubmissionsCount(opts ...sql.OrderTermOption) OrderOption
BySubmissionsCount orders the results by submissions count.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.