doc

package
v0.11.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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
)
View Source
var Columns = []string{
	FieldID,
	FieldText,
}

Columns holds all SQL columns for doc fields.

View Source
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.

View Source
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 And

func And(predicates ...predicate.Doc) predicate.Doc

And groups predicates with the AND operator between them.

func HasChildren

func HasChildren() predicate.Doc

HasChildren applies the HasEdge predicate on the "children" edge.

func HasChildrenWith

func HasChildrenWith(preds ...predicate.Doc) predicate.Doc

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

func HasParent

func HasParent() predicate.Doc

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.Doc) predicate.Doc

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

func HasRelated added in v0.11.2

func HasRelated() predicate.Doc

HasRelated applies the HasEdge predicate on the "related" edge.

func HasRelatedWith added in v0.11.2

func HasRelatedWith(preds ...predicate.Doc) predicate.Doc

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

func ID

func ID(id schema.DocID) predicate.Doc

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id schema.DocID) predicate.Doc

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id schema.DocID) predicate.Doc

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id schema.DocID) predicate.Doc

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...schema.DocID) predicate.Doc

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id schema.DocID) predicate.Doc

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id schema.DocID) predicate.Doc

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id schema.DocID) predicate.Doc

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...schema.DocID) predicate.Doc

IDNotIn applies the NotIn predicate on the ID field.

func Not

func Not(p predicate.Doc) predicate.Doc

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Doc) predicate.Doc

Or groups predicates with the OR operator between them.

func Text

func Text(v string) predicate.Doc

Text applies equality check predicate on the "text" field. It's identical to TextEQ.

func TextContains

func TextContains(v string) predicate.Doc

TextContains applies the Contains predicate on the "text" field.

func TextContainsFold

func TextContainsFold(v string) predicate.Doc

TextContainsFold applies the ContainsFold predicate on the "text" field.

func TextEQ

func TextEQ(v string) predicate.Doc

TextEQ applies the EQ predicate on the "text" field.

func TextEqualFold

func TextEqualFold(v string) predicate.Doc

TextEqualFold applies the EqualFold predicate on the "text" field.

func TextGT

func TextGT(v string) predicate.Doc

TextGT applies the GT predicate on the "text" field.

func TextGTE

func TextGTE(v string) predicate.Doc

TextGTE applies the GTE predicate on the "text" field.

func TextHasPrefix

func TextHasPrefix(v string) predicate.Doc

TextHasPrefix applies the HasPrefix predicate on the "text" field.

func TextHasSuffix

func TextHasSuffix(v string) predicate.Doc

TextHasSuffix applies the HasSuffix predicate on the "text" field.

func TextIn

func TextIn(vs ...string) predicate.Doc

TextIn applies the In predicate on the "text" field.

func TextIsNil

func TextIsNil() predicate.Doc

TextIsNil applies the IsNil predicate on the "text" field.

func TextLT

func TextLT(v string) predicate.Doc

TextLT applies the LT predicate on the "text" field.

func TextLTE

func TextLTE(v string) predicate.Doc

TextLTE applies the LTE predicate on the "text" field.

func TextNEQ

func TextNEQ(v string) predicate.Doc

TextNEQ applies the NEQ predicate on the "text" field.

func TextNotIn

func TextNotIn(vs ...string) predicate.Doc

TextNotIn applies the NotIn predicate on the "text" field.

func TextNotNil

func TextNotNil() predicate.Doc

TextNotNil applies the NotNil predicate on the "text" 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