Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Document) predicate.Document
- func HasAnnotations() predicate.Document
- func HasAnnotationsWith(preds ...predicate.Annotation) predicate.Document
- func HasMetadata() predicate.Document
- func HasMetadataWith(preds ...predicate.Metadata) predicate.Document
- func HasNodeList() predicate.Document
- func HasNodeListWith(preds ...predicate.NodeList) predicate.Document
- func ID(id string) predicate.Document
- func IDContainsFold(id string) predicate.Document
- func IDEQ(id string) predicate.Document
- func IDEqualFold(id string) predicate.Document
- func IDGT(id string) predicate.Document
- func IDGTE(id string) predicate.Document
- func IDIn(ids ...string) predicate.Document
- func IDLT(id string) predicate.Document
- func IDLTE(id string) predicate.Document
- func IDNEQ(id string) predicate.Document
- func IDNotIn(ids ...string) predicate.Document
- func Not(p predicate.Document) predicate.Document
- func Or(predicates ...predicate.Document) predicate.Document
- func ValidColumn(column string) bool
- type OrderOption
- func ByAnnotations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAnnotationsCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMetadataField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByNodeListField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the document type in the database. Label = "document" // FieldID holds the string denoting the id field in the database. FieldID = "id" // EdgeMetadata holds the string denoting the metadata edge name in mutations. EdgeMetadata = "metadata" // EdgeNodeList holds the string denoting the node_list edge name in mutations. EdgeNodeList = "node_list" // EdgeAnnotations holds the string denoting the annotations edge name in mutations. EdgeAnnotations = "annotations" // Table holds the table name of the document in the database. Table = "documents" // MetadataTable is the table that holds the metadata relation/edge. MetadataTable = "metadata" // MetadataInverseTable is the table name for the Metadata entity. // It exists in this package in order to avoid circular dependency with the "metadata" package. MetadataInverseTable = "metadata" // MetadataColumn is the table column denoting the metadata relation/edge. MetadataColumn = "id" // NodeListTable is the table that holds the node_list relation/edge. NodeListTable = "node_lists" // NodeListInverseTable is the table name for the NodeList entity. // It exists in this package in order to avoid circular dependency with the "nodelist" package. NodeListInverseTable = "node_lists" // NodeListColumn is the table column denoting the node_list relation/edge. NodeListColumn = "document_id" // AnnotationsTable is the table that holds the annotations relation/edge. AnnotationsTable = "annotations" // AnnotationsInverseTable is the table name for the Annotation entity. // It exists in this package in order to avoid circular dependency with the "annotation" package. AnnotationsInverseTable = "annotations" // AnnotationsColumn is the table column denoting the annotations relation/edge. AnnotationsColumn = "document_id" )
Variables ¶
var Columns = []string{ FieldID, }
Columns holds all SQL columns for document fields.
Functions ¶
func HasAnnotations ¶ added in v0.1.4
HasAnnotations applies the HasEdge predicate on the "annotations" edge.
func HasAnnotationsWith ¶ added in v0.1.4
func HasAnnotationsWith(preds ...predicate.Annotation) predicate.Document
HasAnnotationsWith applies the HasEdge predicate on the "annotations" edge with a given conditions (other predicates).
func HasMetadata ¶
HasMetadata applies the HasEdge predicate on the "metadata" edge.
func HasMetadataWith ¶
HasMetadataWith applies the HasEdge predicate on the "metadata" edge with a given conditions (other predicates).
func HasNodeList ¶
HasNodeList applies the HasEdge predicate on the "node_list" edge.
func HasNodeListWith ¶
HasNodeListWith applies the HasEdge predicate on the "node_list" edge with a given conditions (other predicates).
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID 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 Document queries.
func ByAnnotations ¶ added in v0.1.4
func ByAnnotations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAnnotations orders the results by annotations terms.
func ByAnnotationsCount ¶ added in v0.1.4
func ByAnnotationsCount(opts ...sql.OrderTermOption) OrderOption
ByAnnotationsCount orders the results by annotations count.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByMetadataField ¶
func ByMetadataField(field string, opts ...sql.OrderTermOption) OrderOption
ByMetadataField orders the results by metadata field.
func ByNodeListField ¶
func ByNodeListField(field string, opts ...sql.OrderTermOption) OrderOption
ByNodeListField orders the results by node_list field.