Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Document) 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 int) predicate.Document
- func IDEQ(id int) predicate.Document
- func IDGT(id int) predicate.Document
- func IDGTE(id int) predicate.Document
- func IDIn(ids ...int) predicate.Document
- func IDLT(id int) predicate.Document
- func IDLTE(id int) predicate.Document
- func IDNEQ(id int) predicate.Document
- func IDNotIn(ids ...int) predicate.Document
- func Not(p predicate.Document) predicate.Document
- func Or(predicates ...predicate.Document) predicate.Document
- func ValidColumn(column string) bool
- type 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" // Table holds the table name of the document in the database. Table = "documents" // MetadataTable is the table that holds the metadata relation/edge. MetadataTable = "documents" // 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 = "metadata_document" // NodeListTable is the table that holds the node_list relation/edge. NodeListTable = "documents" // 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 = "node_list_document" )
Variables ¶
var Columns = []string{ FieldID, }
Columns holds all SQL columns for document fields.
var ForeignKeys = []string{
"metadata_document",
"node_list_document",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "documents" table and are not defined as standalone fields in the schema.
Functions ¶
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 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 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.