purpose

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

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

View Source
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"}
)

Columns holds all SQL columns for purpose fields.

Functions

func And

func And(predicates ...predicate.Purpose) predicate.Purpose

And groups predicates with the AND operator between them.

func HasDocuments added in v0.2.0

func HasDocuments() predicate.Purpose

HasDocuments applies the HasEdge predicate on the "documents" edge.

func HasDocumentsWith added in v0.2.0

func HasDocumentsWith(preds ...predicate.Document) predicate.Purpose

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

func HasNodes added in v0.2.0

func HasNodes() predicate.Purpose

HasNodes applies the HasEdge predicate on the "nodes" edge.

func HasNodesWith added in v0.2.0

func HasNodesWith(preds ...predicate.Node) predicate.Purpose

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

func ID

func ID(id int) predicate.Purpose

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Purpose

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Purpose

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Purpose

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Purpose

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Purpose

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Purpose

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.Purpose) predicate.Purpose

Or groups predicates with the OR operator between them.

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

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

Jump to

Keyboard shortcuts

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