Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Tag) predicate.Tag
- func HasQuestions() predicate.Tag
- func HasQuestionsWith(preds ...predicate.Question) predicate.Tag
- func ID(id int) predicate.Tag
- func IDEQ(id int) predicate.Tag
- func IDGT(id int) predicate.Tag
- func IDGTE(id int) predicate.Tag
- func IDIn(ids ...int) predicate.Tag
- func IDLT(id int) predicate.Tag
- func IDLTE(id int) predicate.Tag
- func IDNEQ(id int) predicate.Tag
- func IDNotIn(ids ...int) predicate.Tag
- func Name(v string) predicate.Tag
- func NameContains(v string) predicate.Tag
- func NameContainsFold(v string) predicate.Tag
- func NameEQ(v string) predicate.Tag
- func NameEqualFold(v string) predicate.Tag
- func NameGT(v string) predicate.Tag
- func NameGTE(v string) predicate.Tag
- func NameHasPrefix(v string) predicate.Tag
- func NameHasSuffix(v string) predicate.Tag
- func NameIn(vs ...string) predicate.Tag
- func NameLT(v string) predicate.Tag
- func NameLTE(v string) predicate.Tag
- func NameNEQ(v string) predicate.Tag
- func NameNotIn(vs ...string) predicate.Tag
- func Not(p predicate.Tag) predicate.Tag
- func Or(predicates ...predicate.Tag) predicate.Tag
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the tag type in the database. Label = "tag" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeQuestions holds the string denoting the questions edge name in mutations. EdgeQuestions = "questions" // Table holds the table name of the tag in the database. Table = "tags" // QuestionsTable is the table that holds the questions relation/edge. The primary key declared below. QuestionsTable = "tag_questions" // QuestionsInverseTable is the table name for the Question entity. // It exists in this package in order to avoid circular dependency with the "question" package. QuestionsInverseTable = "questions" )
Variables ¶
var Columns = []string{ FieldID, FieldName, }
Columns holds all SQL columns for tag fields.
var ForeignKeys = []string{
"user_tags",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "tags" table and are not defined as standalone fields in the schema.
var ( // QuestionsPrimaryKey and QuestionsColumn2 are the table columns denoting the // primary key for the questions relation (M2M). QuestionsPrimaryKey = []string{"tag_id", "question_id"} )
Functions ¶
func HasQuestions ¶
HasQuestions applies the HasEdge predicate on the "questions" edge.
func HasQuestionsWith ¶
HasQuestionsWith applies the HasEdge predicate on the "questions" 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Tag queries.
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 ByQuestions ¶
func ByQuestions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByQuestions orders the results by questions terms.
func ByQuestionsCount ¶
func ByQuestionsCount(opts ...sql.OrderTermOption) OrderOption
ByQuestionsCount orders the results by questions count.