problem

package
v0.0.0-...-52a3571 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldCreatedTime holds the string denoting the created_time field in the database.
	FieldCreatedTime = "created_time"
	// EdgeAuthor holds the string denoting the author edge name in mutations.
	EdgeAuthor = "author"
	// EdgeSolvedBy holds the string denoting the solved_by edge name in mutations.
	EdgeSolvedBy = "solved_by"
	// EdgeTags holds the string denoting the tags edge name in mutations.
	EdgeTags = "tags"
	// Table holds the table name of the problem in the database.
	Table = "problems"
	// AuthorTable is the table that holds the author relation/edge.
	AuthorTable = "problems"
	// AuthorInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	AuthorInverseTable = "users"
	// AuthorColumn is the table column denoting the author relation/edge.
	AuthorColumn = "user_created_problems"
	// SolvedByTable is the table that holds the solved_by relation/edge. The primary key declared below.
	SolvedByTable = "user_solved_problems"
	// SolvedByInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	SolvedByInverseTable = "users"
	// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
	TagsTable = "problem_tags"
	// TagsInverseTable is the table name for the Tag entity.
	// It exists in this package in order to avoid circular dependency with the "tag" package.
	TagsInverseTable = "tags"
)

Variables

View Source
var (
	// SolvedByPrimaryKey and SolvedByColumn2 are the table columns denoting the
	// primary key for the solved_by relation (M2M).
	SolvedByPrimaryKey = []string{"user_id", "problem_id"}
	// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
	// primary key for the tags relation (M2M).
	TagsPrimaryKey = []string{"problem_id", "tag_id"}
)
View Source
var (
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func(string) error
	// DefaultCreatedTime holds the default value on creation for the "created_time" field.
	DefaultCreatedTime time.Time
)

Columns holds all SQL columns for problem fields.

View Source
var ForeignKeys = []string{
	"user_created_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 And

func And(predicates ...predicate.Problem) predicate.Problem

And groups predicates with the AND operator between them.

func Content

func Content(v string) predicate.Problem

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentContains

func ContentContains(v string) predicate.Problem

ContentContains applies the Contains predicate on the "content" field.

func ContentContainsFold

func ContentContainsFold(v string) predicate.Problem

ContentContainsFold applies the ContainsFold predicate on the "content" field.

func ContentEQ

func ContentEQ(v string) predicate.Problem

ContentEQ applies the EQ predicate on the "content" field.

func ContentEqualFold

func ContentEqualFold(v string) predicate.Problem

ContentEqualFold applies the EqualFold predicate on the "content" field.

func ContentGT

func ContentGT(v string) predicate.Problem

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v string) predicate.Problem

ContentGTE applies the GTE predicate on the "content" field.

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Problem

ContentHasPrefix applies the HasPrefix predicate on the "content" field.

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Problem

ContentHasSuffix applies the HasSuffix predicate on the "content" field.

func ContentIn

func ContentIn(vs ...string) predicate.Problem

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v string) predicate.Problem

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v string) predicate.Problem

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v string) predicate.Problem

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

func ContentNotIn(vs ...string) predicate.Problem

ContentNotIn applies the NotIn predicate on the "content" field.

func CreatedTime

func CreatedTime(v time.Time) predicate.Problem

CreatedTime applies equality check predicate on the "created_time" field. It's identical to CreatedTimeEQ.

func CreatedTimeEQ

func CreatedTimeEQ(v time.Time) predicate.Problem

CreatedTimeEQ applies the EQ predicate on the "created_time" field.

func CreatedTimeGT

func CreatedTimeGT(v time.Time) predicate.Problem

CreatedTimeGT applies the GT predicate on the "created_time" field.

func CreatedTimeGTE

func CreatedTimeGTE(v time.Time) predicate.Problem

CreatedTimeGTE applies the GTE predicate on the "created_time" field.

func CreatedTimeIn

func CreatedTimeIn(vs ...time.Time) predicate.Problem

CreatedTimeIn applies the In predicate on the "created_time" field.

func CreatedTimeLT

func CreatedTimeLT(v time.Time) predicate.Problem

CreatedTimeLT applies the LT predicate on the "created_time" field.

func CreatedTimeLTE

func CreatedTimeLTE(v time.Time) predicate.Problem

CreatedTimeLTE applies the LTE predicate on the "created_time" field.

func CreatedTimeNEQ

func CreatedTimeNEQ(v time.Time) predicate.Problem

CreatedTimeNEQ applies the NEQ predicate on the "created_time" field.

func CreatedTimeNotIn

func CreatedTimeNotIn(vs ...time.Time) predicate.Problem

CreatedTimeNotIn applies the NotIn predicate on the "created_time" field.

func HasAuthor

func HasAuthor() predicate.Problem

HasAuthor applies the HasEdge predicate on the "author" edge.

func HasAuthorWith

func HasAuthorWith(preds ...predicate.User) predicate.Problem

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

func HasSolvedBy

func HasSolvedBy() predicate.Problem

HasSolvedBy applies the HasEdge predicate on the "solved_by" edge.

func HasSolvedByWith

func HasSolvedByWith(preds ...predicate.User) predicate.Problem

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

func HasTags

func HasTags() predicate.Problem

HasTags applies the HasEdge predicate on the "tags" edge.

func HasTagsWith

func HasTagsWith(preds ...predicate.Tag) predicate.Problem

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

func ID

func ID(id int64) predicate.Problem

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Problem

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Problem

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Problem

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Problem

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Problem

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Problem

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Problem

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Problem

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

Or groups predicates with the OR operator between them.

func Title

func Title(v string) predicate.Problem

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Problem

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Problem

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Problem

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Problem

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Problem

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Problem

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Problem

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Problem

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Problem

TitleIn applies the In predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Problem

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Problem

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Problem

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Problem

TitleNotIn applies the NotIn predicate on the "title" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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