edgetype

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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the edgetype type in the database.
	Label = "edge_type"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldProtoMessage holds the string denoting the proto_message field in the database.
	FieldProtoMessage = "proto_message"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldNodeID holds the string denoting the node_id field in the database.
	FieldNodeID = "node_id"
	// FieldToNodeID holds the string denoting the to_node_id field in the database.
	FieldToNodeID = "to_node_id"
	// EdgeFrom holds the string denoting the from edge name in mutations.
	EdgeFrom = "from"
	// EdgeTo holds the string denoting the to edge name in mutations.
	EdgeTo = "to"
	// EdgeDocuments holds the string denoting the documents edge name in mutations.
	EdgeDocuments = "documents"
	// EdgeNodeLists holds the string denoting the node_lists edge name in mutations.
	EdgeNodeLists = "node_lists"
	// Table holds the table name of the edgetype in the database.
	Table = "edge_types"
	// FromTable is the table that holds the from relation/edge.
	FromTable = "edge_types"
	// FromInverseTable is the table name for the Node entity.
	// It exists in this package in order to avoid circular dependency with the "node" package.
	FromInverseTable = "nodes"
	// FromColumn is the table column denoting the from relation/edge.
	FromColumn = "node_id"
	// ToTable is the table that holds the to relation/edge.
	ToTable = "edge_types"
	// ToInverseTable is the table name for the Node entity.
	// It exists in this package in order to avoid circular dependency with the "node" package.
	ToInverseTable = "nodes"
	// ToColumn is the table column denoting the to relation/edge.
	ToColumn = "to_node_id"
	// DocumentsTable is the table that holds the documents relation/edge. The primary key declared below.
	DocumentsTable = "document_edge_types"
	// 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"
	// NodeListsTable is the table that holds the node_lists relation/edge. The primary key declared below.
	NodeListsTable = "node_list_edges"
	// NodeListsInverseTable is the table name for the NodeList entity.
	// It exists in this package in order to avoid circular dependency with the "nodelist" package.
	NodeListsInverseTable = "node_lists"
)

Variables

View Source
var (
	// DocumentsPrimaryKey and DocumentsColumn2 are the table columns denoting the
	// primary key for the documents relation (M2M).
	DocumentsPrimaryKey = []string{"document_id", "edge_type_id"}
	// NodeListsPrimaryKey and NodeListsColumn2 are the table columns denoting the
	// primary key for the node_lists relation (M2M).
	NodeListsPrimaryKey = []string{"node_list_id", "edge_type_id"}
)
View Source
var (
	Hooks [1]ent.Hook
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/protobom/storage/internal/backends/ent/runtime"

Columns holds all SQL columns for edgetype fields.

Functions

func And

func And(predicates ...predicate.EdgeType) predicate.EdgeType

And groups predicates with the AND operator between them.

func HasDocuments added in v0.2.0

func HasDocuments() predicate.EdgeType

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

func HasDocumentsWith added in v0.2.0

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

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

func HasFrom

func HasFrom() predicate.EdgeType

HasFrom applies the HasEdge predicate on the "from" edge.

func HasFromWith

func HasFromWith(preds ...predicate.Node) predicate.EdgeType

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

func HasNodeLists added in v0.2.0

func HasNodeLists() predicate.EdgeType

HasNodeLists applies the HasEdge predicate on the "node_lists" edge.

func HasNodeListsWith added in v0.2.0

func HasNodeListsWith(preds ...predicate.NodeList) predicate.EdgeType

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

func HasTo

func HasTo() predicate.EdgeType

HasTo applies the HasEdge predicate on the "to" edge.

func HasToWith

func HasToWith(preds ...predicate.Node) predicate.EdgeType

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

func ID

func ID(id uuid.UUID) predicate.EdgeType

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.EdgeType

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.EdgeType

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.EdgeType

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.EdgeType

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.EdgeType

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.EdgeType

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.EdgeType

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.EdgeType

IDNotIn applies the NotIn predicate on the ID field.

func NodeID

func NodeID(v uuid.UUID) predicate.EdgeType

NodeID applies equality check predicate on the "node_id" field. It's identical to NodeIDEQ.

func NodeIDEQ

func NodeIDEQ(v uuid.UUID) predicate.EdgeType

NodeIDEQ applies the EQ predicate on the "node_id" field.

func NodeIDIn

func NodeIDIn(vs ...uuid.UUID) predicate.EdgeType

NodeIDIn applies the In predicate on the "node_id" field.

func NodeIDNEQ

func NodeIDNEQ(v uuid.UUID) predicate.EdgeType

NodeIDNEQ applies the NEQ predicate on the "node_id" field.

func NodeIDNotIn

func NodeIDNotIn(vs ...uuid.UUID) predicate.EdgeType

NodeIDNotIn applies the NotIn predicate on the "node_id" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.EdgeType) predicate.EdgeType

Or groups predicates with the OR operator between them.

func ProtoMessage added in v0.2.0

func ProtoMessage(v *sbom.Edge) predicate.EdgeType

ProtoMessage applies equality check predicate on the "proto_message" field. It's identical to ProtoMessageEQ.

func ProtoMessageEQ added in v0.2.0

func ProtoMessageEQ(v *sbom.Edge) predicate.EdgeType

ProtoMessageEQ applies the EQ predicate on the "proto_message" field.

func ProtoMessageGT added in v0.2.0

func ProtoMessageGT(v *sbom.Edge) predicate.EdgeType

ProtoMessageGT applies the GT predicate on the "proto_message" field.

func ProtoMessageGTE added in v0.2.0

func ProtoMessageGTE(v *sbom.Edge) predicate.EdgeType

ProtoMessageGTE applies the GTE predicate on the "proto_message" field.

func ProtoMessageIn added in v0.2.0

func ProtoMessageIn(vs ...*sbom.Edge) predicate.EdgeType

ProtoMessageIn applies the In predicate on the "proto_message" field.

func ProtoMessageLT added in v0.2.0

func ProtoMessageLT(v *sbom.Edge) predicate.EdgeType

ProtoMessageLT applies the LT predicate on the "proto_message" field.

func ProtoMessageLTE added in v0.2.0

func ProtoMessageLTE(v *sbom.Edge) predicate.EdgeType

ProtoMessageLTE applies the LTE predicate on the "proto_message" field.

func ProtoMessageNEQ added in v0.2.0

func ProtoMessageNEQ(v *sbom.Edge) predicate.EdgeType

ProtoMessageNEQ applies the NEQ predicate on the "proto_message" field.

func ProtoMessageNotIn added in v0.2.0

func ProtoMessageNotIn(vs ...*sbom.Edge) predicate.EdgeType

ProtoMessageNotIn applies the NotIn predicate on the "proto_message" field.

func ToNodeID

func ToNodeID(v uuid.UUID) predicate.EdgeType

ToNodeID applies equality check predicate on the "to_node_id" field. It's identical to ToNodeIDEQ.

func ToNodeIDEQ

func ToNodeIDEQ(v uuid.UUID) predicate.EdgeType

ToNodeIDEQ applies the EQ predicate on the "to_node_id" field.

func ToNodeIDIn

func ToNodeIDIn(vs ...uuid.UUID) predicate.EdgeType

ToNodeIDIn applies the In predicate on the "to_node_id" field.

func ToNodeIDNEQ

func ToNodeIDNEQ(v uuid.UUID) predicate.EdgeType

ToNodeIDNEQ applies the NEQ predicate on the "to_node_id" field.

func ToNodeIDNotIn

func ToNodeIDNotIn(vs ...uuid.UUID) predicate.EdgeType

ToNodeIDNotIn applies the NotIn predicate on the "to_node_id" field.

func TypeEQ

func TypeEQ(v Type) predicate.EdgeType

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.EdgeType

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.EdgeType

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.EdgeType

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" 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 EdgeType 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 ByFromField

func ByFromField(field string, opts ...sql.OrderTermOption) OrderOption

ByFromField orders the results by from field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByNodeID

func ByNodeID(opts ...sql.OrderTermOption) OrderOption

ByNodeID orders the results by the node_id field.

func ByNodeLists added in v0.2.0

func ByNodeLists(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByNodeLists orders the results by node_lists terms.

func ByNodeListsCount added in v0.2.0

func ByNodeListsCount(opts ...sql.OrderTermOption) OrderOption

ByNodeListsCount orders the results by node_lists count.

func ByToField

func ByToField(field string, opts ...sql.OrderTermOption) OrderOption

ByToField orders the results by to field.

func ByToNodeID

func ByToNodeID(opts ...sql.OrderTermOption) OrderOption

ByToNodeID orders the results by the to_node_id field.

func ByType

func ByType(opts ...sql.OrderTermOption) OrderOption

ByType orders the results by the type field.

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeUNKNOWN              Type = "UNKNOWN"
	TypeAmends               Type = "amends"
	TypeAncestor             Type = "ancestor"
	TypeBuildDependency      Type = "buildDependency"
	TypeBuildTool            Type = "buildTool"
	TypeContains             Type = "contains"
	TypeContainedBy          Type = "contained_by"
	TypeCopy                 Type = "copy"
	TypeDataFile             Type = "dataFile"
	TypeDependencyManifest   Type = "dependencyManifest"
	TypeDependsOn            Type = "dependsOn"
	TypeDependencyOf         Type = "dependencyOf"
	TypeDescendant           Type = "descendant"
	TypeDescribes            Type = "describes"
	TypeDescribedBy          Type = "describedBy"
	TypeDevDependency        Type = "devDependency"
	TypeDevTool              Type = "devTool"
	TypeDistributionArtifact Type = "distributionArtifact"
	TypeDocumentation        Type = "documentation"
	TypeDynamicLink          Type = "dynamicLink"
	TypeExample              Type = "example"
	TypeExpandedFromArchive  Type = "expandedFromArchive"
	TypeFileAdded            Type = "fileAdded"
	TypeFileDeleted          Type = "fileDeleted"
	TypeFileModified         Type = "fileModified"
	TypeGenerates            Type = "generates"
	TypeGeneratedFrom        Type = "generatedFrom"
	TypeMetafile             Type = "metafile"
	TypeOptionalComponent    Type = "optionalComponent"
	TypeOptionalDependency   Type = "optionalDependency"
	TypeOther                Type = "other"
	TypePackages             Type = "packages"
	TypePatch                Type = "patch"
	TypePrerequisite         Type = "prerequisite"
	TypePrerequisiteFor      Type = "prerequisiteFor"
	TypeProvidedDependency   Type = "providedDependency"
	TypeRequirementFor       Type = "requirementFor"
	TypeRuntimeDependency    Type = "runtimeDependency"
	TypeSpecificationFor     Type = "specificationFor"
	TypeStaticLink           Type = "staticLink"
	TypeTest                 Type = "test"
	TypeTestCase             Type = "testCase"
	TypeTestDependency       Type = "testDependency"
	TypeTestTool             Type = "testTool"
	TypeVariant              Type = "variant"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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