Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Doc) predicate.Doc
- func HasChildren() predicate.Doc
- func HasChildrenWith(preds ...predicate.Doc) predicate.Doc
- func HasParent() predicate.Doc
- func HasParentWith(preds ...predicate.Doc) predicate.Doc
- func HasRelated() predicate.Doc
- func HasRelatedWith(preds ...predicate.Doc) predicate.Doc
- func ID(id schema.DocID) predicate.Doc
- func IDEQ(id schema.DocID) predicate.Doc
- func IDGT(id schema.DocID) predicate.Doc
- func IDGTE(id schema.DocID) predicate.Doc
- func IDIn(ids ...schema.DocID) predicate.Doc
- func IDLT(id schema.DocID) predicate.Doc
- func IDLTE(id schema.DocID) predicate.Doc
- func IDNEQ(id schema.DocID) predicate.Doc
- func IDNotIn(ids ...schema.DocID) predicate.Doc
- func Not(p predicate.Doc) predicate.Doc
- func Or(predicates ...predicate.Doc) predicate.Doc
- func Text(v string) predicate.Doc
- func TextContains(v string) predicate.Doc
- func TextContainsFold(v string) predicate.Doc
- func TextEQ(v string) predicate.Doc
- func TextEqualFold(v string) predicate.Doc
- func TextGT(v string) predicate.Doc
- func TextGTE(v string) predicate.Doc
- func TextHasPrefix(v string) predicate.Doc
- func TextHasSuffix(v string) predicate.Doc
- func TextIn(vs ...string) predicate.Doc
- func TextIsNil() predicate.Doc
- func TextLT(v string) predicate.Doc
- func TextLTE(v string) predicate.Doc
- func TextNEQ(v string) predicate.Doc
- func TextNotIn(vs ...string) predicate.Doc
- func TextNotNil() predicate.Doc
- func ValidColumn(column string) bool
Constants ¶
const ( // Label holds the string label denoting the doc type in the database. Label = "doc" // 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" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" // EdgeChildren holds the string denoting the children edge name in mutations. EdgeChildren = "children" // EdgeRelated holds the string denoting the related edge name in mutations. EdgeRelated = "related" // Table holds the table name of the doc in the database. Table = "docs" // ParentTable is the table that holds the parent relation/edge. ParentTable = "docs" // ParentColumn is the table column denoting the parent relation/edge. ParentColumn = "doc_children" // ChildrenTable is the table that holds the children relation/edge. ChildrenTable = "docs" // ChildrenColumn is the table column denoting the children relation/edge. ChildrenColumn = "doc_children" // RelatedTable is the table that holds the related relation/edge. The primary key declared below. RelatedTable = "doc_related" )
Variables ¶
var ( // DefaultID holds the default value on creation for the "id" field. DefaultID func() schema.DocID // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(string) error )
var Columns = []string{ FieldID, FieldText, }
Columns holds all SQL columns for doc fields.
var ForeignKeys = []string{
"doc_children",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "docs" table and are not defined as standalone fields in the schema.
var ( // RelatedPrimaryKey and RelatedColumn2 are the table columns denoting the // primary key for the related relation (M2M). RelatedPrimaryKey = []string{"doc_id", "related_id"} )
Functions ¶
func HasChildren ¶
HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildrenWith ¶
HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
func HasRelated ¶ added in v0.11.2
HasRelated applies the HasEdge predicate on the "related" edge.
func HasRelatedWith ¶ added in v0.11.2
HasRelatedWith applies the HasEdge predicate on the "related" edge with a given conditions (other predicates).
func TextContains ¶
TextContains applies the Contains predicate on the "text" field.
func TextContainsFold ¶
TextContainsFold applies the ContainsFold predicate on the "text" field.
func TextEqualFold ¶
TextEqualFold applies the EqualFold predicate on the "text" field.
func TextHasPrefix ¶
TextHasPrefix applies the HasPrefix predicate on the "text" field.
func TextHasSuffix ¶
TextHasSuffix applies the HasSuffix predicate on the "text" field.
func TextNotNil ¶
TextNotNil applies the NotNil predicate on the "text" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
This section is empty.