Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Purpose) predicate.Purpose
- func HasDocuments() predicate.Purpose
- func HasDocumentsWith(preds ...predicate.Document) predicate.Purpose
- func HasNodes() predicate.Purpose
- func HasNodesWith(preds ...predicate.Node) predicate.Purpose
- func ID(id int) predicate.Purpose
- func IDEQ(id int) predicate.Purpose
- func IDGT(id int) predicate.Purpose
- func IDGTE(id int) predicate.Purpose
- func IDIn(ids ...int) predicate.Purpose
- func IDLT(id int) predicate.Purpose
- func IDLTE(id int) predicate.Purpose
- func IDNEQ(id int) predicate.Purpose
- func IDNotIn(ids ...int) predicate.Purpose
- func Not(p predicate.Purpose) predicate.Purpose
- func Or(predicates ...predicate.Purpose) predicate.Purpose
- func PrimaryPurposeEQ(v PrimaryPurpose) predicate.Purpose
- func PrimaryPurposeIn(vs ...PrimaryPurpose) predicate.Purpose
- func PrimaryPurposeNEQ(v PrimaryPurpose) predicate.Purpose
- func PrimaryPurposeNotIn(vs ...PrimaryPurpose) predicate.Purpose
- func PrimaryPurposeValidator(pp PrimaryPurpose) error
- func ValidColumn(column string) bool
- type OrderOption
- func ByDocuments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDocumentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByNodes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNodesCount(opts ...sql.OrderTermOption) OrderOption
- func ByPrimaryPurpose(opts ...sql.OrderTermOption) OrderOption
- type PrimaryPurpose
Constants ¶
const ( // Label holds the string label denoting the purpose type in the database. Label = "purpose" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldPrimaryPurpose holds the string denoting the primary_purpose field in the database. FieldPrimaryPurpose = "primary_purpose" // EdgeDocuments holds the string denoting the documents edge name in mutations. EdgeDocuments = "documents" // EdgeNodes holds the string denoting the nodes edge name in mutations. EdgeNodes = "nodes" // Table holds the table name of the purpose in the database. Table = "purposes" // DocumentsTable is the table that holds the documents relation/edge. The primary key declared below. DocumentsTable = "document_purposes" // DocumentsInverseTable is the table name for the Document entity. // It exists in this package in order to avoid circular dependency with the "document" package. DocumentsInverseTable = "documents" // NodesTable is the table that holds the nodes relation/edge. The primary key declared below. NodesTable = "node_primary_purposes" // NodesInverseTable is the table name for the Node entity. // It exists in this package in order to avoid circular dependency with the "node" package. NodesInverseTable = "nodes" )
Variables ¶
var ( // DocumentsPrimaryKey and DocumentsColumn2 are the table columns denoting the // primary key for the documents relation (M2M). DocumentsPrimaryKey = []string{"document_id", "purpose_id"} // NodesPrimaryKey and NodesColumn2 are the table columns denoting the // primary key for the nodes relation (M2M). NodesPrimaryKey = []string{"node_id", "purpose_id"} )
var Columns = []string{ FieldID, FieldPrimaryPurpose, }
Columns holds all SQL columns for purpose fields.
Functions ¶
func HasDocuments ¶ added in v0.2.0
HasDocuments applies the HasEdge predicate on the "documents" edge.
func HasDocumentsWith ¶ added in v0.2.0
HasDocumentsWith applies the HasEdge predicate on the "documents" edge with a given conditions (other predicates).
func HasNodesWith ¶ added in v0.2.0
HasNodesWith applies the HasEdge predicate on the "nodes" edge with a given conditions (other predicates).
func PrimaryPurposeEQ ¶
func PrimaryPurposeEQ(v PrimaryPurpose) predicate.Purpose
PrimaryPurposeEQ applies the EQ predicate on the "primary_purpose" field.
func PrimaryPurposeIn ¶
func PrimaryPurposeIn(vs ...PrimaryPurpose) predicate.Purpose
PrimaryPurposeIn applies the In predicate on the "primary_purpose" field.
func PrimaryPurposeNEQ ¶
func PrimaryPurposeNEQ(v PrimaryPurpose) predicate.Purpose
PrimaryPurposeNEQ applies the NEQ predicate on the "primary_purpose" field.
func PrimaryPurposeNotIn ¶
func PrimaryPurposeNotIn(vs ...PrimaryPurpose) predicate.Purpose
PrimaryPurposeNotIn applies the NotIn predicate on the "primary_purpose" field.
func PrimaryPurposeValidator ¶
func PrimaryPurposeValidator(pp PrimaryPurpose) error
PrimaryPurposeValidator is a validator for the "primary_purpose" field enum values. It is called by the builders before save.
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 Purpose queries.
func ByDocuments ¶ added in v0.2.0
func ByDocuments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByDocuments orders the results by documents terms.
func ByDocumentsCount ¶ added in v0.2.0
func ByDocumentsCount(opts ...sql.OrderTermOption) OrderOption
ByDocumentsCount orders the results by documents count.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByNodes ¶ added in v0.2.0
func ByNodes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByNodes orders the results by nodes terms.
func ByNodesCount ¶ added in v0.2.0
func ByNodesCount(opts ...sql.OrderTermOption) OrderOption
ByNodesCount orders the results by nodes count.
func ByPrimaryPurpose ¶
func ByPrimaryPurpose(opts ...sql.OrderTermOption) OrderOption
ByPrimaryPurpose orders the results by the primary_purpose field.
type PrimaryPurpose ¶
type PrimaryPurpose string
PrimaryPurpose defines the type for the "primary_purpose" enum field.
const ( PrimaryPurposeUNKNOWN_PURPOSE PrimaryPurpose = "UNKNOWN_PURPOSE" PrimaryPurposeAPPLICATION PrimaryPurpose = "APPLICATION" PrimaryPurposeARCHIVE PrimaryPurpose = "ARCHIVE" PrimaryPurposeBOM PrimaryPurpose = "BOM" PrimaryPurposeCONFIGURATION PrimaryPurpose = "CONFIGURATION" PrimaryPurposeCONTAINER PrimaryPurpose = "CONTAINER" PrimaryPurposeDATA PrimaryPurpose = "DATA" PrimaryPurposeDEVICE PrimaryPurpose = "DEVICE" PrimaryPurposeDEVICE_DRIVER PrimaryPurpose = "DEVICE_DRIVER" PrimaryPurposeDOCUMENTATION PrimaryPurpose = "DOCUMENTATION" PrimaryPurposeEVIDENCE PrimaryPurpose = "EVIDENCE" PrimaryPurposeEXECUTABLE PrimaryPurpose = "EXECUTABLE" PrimaryPurposeFILE PrimaryPurpose = "FILE" PrimaryPurposeFIRMWARE PrimaryPurpose = "FIRMWARE" PrimaryPurposeFRAMEWORK PrimaryPurpose = "FRAMEWORK" PrimaryPurposeINSTALL PrimaryPurpose = "INSTALL" PrimaryPurposeLIBRARY PrimaryPurpose = "LIBRARY" PrimaryPurposeMACHINE_LEARNING_MODEL PrimaryPurpose = "MACHINE_LEARNING_MODEL" PrimaryPurposeMANIFEST PrimaryPurpose = "MANIFEST" PrimaryPurposeMODEL PrimaryPurpose = "MODEL" PrimaryPurposeMODULE PrimaryPurpose = "MODULE" PrimaryPurposeOPERATING_SYSTEM PrimaryPurpose = "OPERATING_SYSTEM" PrimaryPurposeOTHER PrimaryPurpose = "OTHER" PrimaryPurposePATCH PrimaryPurpose = "PATCH" PrimaryPurposePLATFORM PrimaryPurpose = "PLATFORM" PrimaryPurposeREQUIREMENT PrimaryPurpose = "REQUIREMENT" PrimaryPurposeSOURCE PrimaryPurpose = "SOURCE" PrimaryPurposeSPECIFICATION PrimaryPurpose = "SPECIFICATION" PrimaryPurposeTEST PrimaryPurpose = "TEST" )
PrimaryPurpose values.
func (PrimaryPurpose) String ¶
func (pp PrimaryPurpose) String() string