Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Definition) predicate.Definition
- func HasSynset() predicate.Definition
- func HasSynsetWith(preds ...predicate.Synset) predicate.Definition
- func ID(id int) predicate.Definition
- func IDEQ(id int) predicate.Definition
- func IDGT(id int) predicate.Definition
- func IDGTE(id int) predicate.Definition
- func IDIn(ids ...int) predicate.Definition
- func IDLT(id int) predicate.Definition
- func IDLTE(id int) predicate.Definition
- func IDNEQ(id int) predicate.Definition
- func IDNotIn(ids ...int) predicate.Definition
- func Not(p predicate.Definition) predicate.Definition
- func Or(predicates ...predicate.Definition) predicate.Definition
- func Text(v string) predicate.Definition
- func TextContains(v string) predicate.Definition
- func TextContainsFold(v string) predicate.Definition
- func TextEQ(v string) predicate.Definition
- func TextEqualFold(v string) predicate.Definition
- func TextGT(v string) predicate.Definition
- func TextGTE(v string) predicate.Definition
- func TextHasPrefix(v string) predicate.Definition
- func TextHasSuffix(v string) predicate.Definition
- func TextIn(vs ...string) predicate.Definition
- func TextLT(v string) predicate.Definition
- func TextLTE(v string) predicate.Definition
- func TextNEQ(v string) predicate.Definition
- func TextNotIn(vs ...string) predicate.Definition
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the definition type in the database. Label = "definition" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldText holds the string denoting the text field in the database. FieldText = "text" // EdgeSynset holds the string denoting the synset edge name in mutations. EdgeSynset = "synset" // Table holds the table name of the definition in the database. Table = "definitions" // SynsetTable is the table that holds the synset relation/edge. SynsetTable = "definitions" // SynsetInverseTable is the table name for the Synset entity. // It exists in this package in order to avoid circular dependency with the "synset" package. SynsetInverseTable = "synsets" // SynsetColumn is the table column denoting the synset relation/edge. SynsetColumn = "synset_definitions" )
Variables ¶
var Columns = []string{ FieldID, FieldText, }
Columns holds all SQL columns for definition fields.
var ForeignKeys = []string{
"synset_definitions",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "definitions" table and are not defined as standalone fields in the schema.
var ( // TextValidator is a validator for the "text" field. It is called by the builders before save. TextValidator func(string) error )
Functions ¶
func And ¶
func And(predicates ...predicate.Definition) predicate.Definition
And groups predicates with the AND operator between them.
func HasSynset ¶
func HasSynset() predicate.Definition
HasSynset applies the HasEdge predicate on the "synset" edge.
func HasSynsetWith ¶
func HasSynsetWith(preds ...predicate.Synset) predicate.Definition
HasSynsetWith applies the HasEdge predicate on the "synset" edge with a given conditions (other predicates).
func IDGTE ¶
func IDGTE(id int) predicate.Definition
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...int) predicate.Definition
IDIn applies the In predicate on the ID field.
func IDLTE ¶
func IDLTE(id int) predicate.Definition
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id int) predicate.Definition
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...int) predicate.Definition
IDNotIn applies the NotIn predicate on the ID field.
func Not ¶
func Not(p predicate.Definition) predicate.Definition
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.Definition) predicate.Definition
Or groups predicates with the OR operator between them.
func Text ¶
func Text(v string) predicate.Definition
Text applies equality check predicate on the "text" field. It's identical to TextEQ.
func TextContains ¶
func TextContains(v string) predicate.Definition
TextContains applies the Contains predicate on the "text" field.
func TextContainsFold ¶
func TextContainsFold(v string) predicate.Definition
TextContainsFold applies the ContainsFold predicate on the "text" field.
func TextEQ ¶
func TextEQ(v string) predicate.Definition
TextEQ applies the EQ predicate on the "text" field.
func TextEqualFold ¶
func TextEqualFold(v string) predicate.Definition
TextEqualFold applies the EqualFold predicate on the "text" field.
func TextGT ¶
func TextGT(v string) predicate.Definition
TextGT applies the GT predicate on the "text" field.
func TextGTE ¶
func TextGTE(v string) predicate.Definition
TextGTE applies the GTE predicate on the "text" field.
func TextHasPrefix ¶
func TextHasPrefix(v string) predicate.Definition
TextHasPrefix applies the HasPrefix predicate on the "text" field.
func TextHasSuffix ¶
func TextHasSuffix(v string) predicate.Definition
TextHasSuffix applies the HasSuffix predicate on the "text" field.
func TextIn ¶
func TextIn(vs ...string) predicate.Definition
TextIn applies the In predicate on the "text" field.
func TextLT ¶
func TextLT(v string) predicate.Definition
TextLT applies the LT predicate on the "text" field.
func TextLTE ¶
func TextLTE(v string) predicate.Definition
TextLTE applies the LTE predicate on the "text" field.
func TextNEQ ¶
func TextNEQ(v string) predicate.Definition
TextNEQ applies the NEQ predicate on the "text" field.
func TextNotIn ¶
func TextNotIn(vs ...string) predicate.Definition
TextNotIn applies the NotIn predicate on the "text" 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 Definition queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func BySynsetField ¶
func BySynsetField(field string, opts ...sql.OrderTermOption) OrderOption
BySynsetField orders the results by synset field.
func ByText ¶
func ByText(opts ...sql.OrderTermOption) OrderOption
ByText orders the results by the text field.