document

package
v0.0.0-...-7acab80 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

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

View Source
var Columns = []string{
	FieldID,
}

Columns holds all SQL columns for document fields.

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

func And(predicates ...predicate.Document) predicate.Document

And groups predicates with the AND operator between them.

func HasMetadata

func HasMetadata() predicate.Document

HasMetadata applies the HasEdge predicate on the "metadata" edge.

func HasMetadataWith

func HasMetadataWith(preds ...predicate.Metadata) predicate.Document

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

func HasNodeList

func HasNodeList() predicate.Document

HasNodeList applies the HasEdge predicate on the "node_list" edge.

func HasNodeListWith

func HasNodeListWith(preds ...predicate.NodeList) predicate.Document

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

func ID

func ID(id int) predicate.Document

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Document

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Document

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Document

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Document

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Document

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Document

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Document

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Document

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Document) predicate.Document

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL