Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.EdgeType) predicate.EdgeType
- func HasDocuments() predicate.EdgeType
- func HasDocumentsWith(preds ...predicate.Document) predicate.EdgeType
- func HasFrom() predicate.EdgeType
- func HasFromWith(preds ...predicate.Node) predicate.EdgeType
- func HasNodeLists() predicate.EdgeType
- func HasNodeListsWith(preds ...predicate.NodeList) predicate.EdgeType
- func HasTo() predicate.EdgeType
- func HasToWith(preds ...predicate.Node) predicate.EdgeType
- func ID(id uuid.UUID) predicate.EdgeType
- func IDEQ(id uuid.UUID) predicate.EdgeType
- func IDGT(id uuid.UUID) predicate.EdgeType
- func IDGTE(id uuid.UUID) predicate.EdgeType
- func IDIn(ids ...uuid.UUID) predicate.EdgeType
- func IDLT(id uuid.UUID) predicate.EdgeType
- func IDLTE(id uuid.UUID) predicate.EdgeType
- func IDNEQ(id uuid.UUID) predicate.EdgeType
- func IDNotIn(ids ...uuid.UUID) predicate.EdgeType
- func NodeID(v uuid.UUID) predicate.EdgeType
- func NodeIDEQ(v uuid.UUID) predicate.EdgeType
- func NodeIDIn(vs ...uuid.UUID) predicate.EdgeType
- func NodeIDNEQ(v uuid.UUID) predicate.EdgeType
- func NodeIDNotIn(vs ...uuid.UUID) predicate.EdgeType
- func Not(p predicate.EdgeType) predicate.EdgeType
- func Or(predicates ...predicate.EdgeType) predicate.EdgeType
- func ProtoMessage(v *sbom.Edge) predicate.EdgeType
- func ProtoMessageEQ(v *sbom.Edge) predicate.EdgeType
- func ProtoMessageGT(v *sbom.Edge) predicate.EdgeType
- func ProtoMessageGTE(v *sbom.Edge) predicate.EdgeType
- func ProtoMessageIn(vs ...*sbom.Edge) predicate.EdgeType
- func ProtoMessageLT(v *sbom.Edge) predicate.EdgeType
- func ProtoMessageLTE(v *sbom.Edge) predicate.EdgeType
- func ProtoMessageNEQ(v *sbom.Edge) predicate.EdgeType
- func ProtoMessageNotIn(vs ...*sbom.Edge) predicate.EdgeType
- func ToNodeID(v uuid.UUID) predicate.EdgeType
- func ToNodeIDEQ(v uuid.UUID) predicate.EdgeType
- func ToNodeIDIn(vs ...uuid.UUID) predicate.EdgeType
- func ToNodeIDNEQ(v uuid.UUID) predicate.EdgeType
- func ToNodeIDNotIn(vs ...uuid.UUID) predicate.EdgeType
- func TypeEQ(v Type) predicate.EdgeType
- func TypeIn(vs ...Type) predicate.EdgeType
- func TypeNEQ(v Type) predicate.EdgeType
- func TypeNotIn(vs ...Type) predicate.EdgeType
- func TypeValidator(_type Type) error
- func ValidColumn(column string) bool
- type OrderOption
- func ByDocuments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDocumentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByFromField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByNodeID(opts ...sql.OrderTermOption) OrderOption
- func ByNodeLists(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNodeListsCount(opts ...sql.OrderTermOption) OrderOption
- func ByToField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByToNodeID(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- type Type
Constants ¶
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 ¶
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"} )
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"
var Columns = []string{ FieldID, FieldProtoMessage, FieldType, FieldNodeID, FieldToNodeID, }
Columns holds all SQL columns for edgetype 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 HasFromWith ¶
HasFromWith applies the HasEdge predicate on the "from" edge with a given conditions (other predicates).
func HasNodeLists ¶ added in v0.2.0
HasNodeLists applies the HasEdge predicate on the "node_lists" edge.
func HasNodeListsWith ¶ added in v0.2.0
HasNodeListsWith applies the HasEdge predicate on the "node_lists" edge with a given conditions (other predicates).
func HasToWith ¶
HasToWith applies the HasEdge predicate on the "to" edge with a given conditions (other predicates).
func NodeID ¶
NodeID applies equality check predicate on the "node_id" field. It's identical to NodeIDEQ.
func NodeIDNotIn ¶
NodeIDNotIn applies the NotIn predicate on the "node_id" field.
func ProtoMessage ¶ added in v0.2.0
ProtoMessage applies equality check predicate on the "proto_message" field. It's identical to ProtoMessageEQ.
func ProtoMessageEQ ¶ added in v0.2.0
ProtoMessageEQ applies the EQ predicate on the "proto_message" field.
func ProtoMessageGT ¶ added in v0.2.0
ProtoMessageGT applies the GT predicate on the "proto_message" field.
func ProtoMessageGTE ¶ added in v0.2.0
ProtoMessageGTE applies the GTE predicate on the "proto_message" field.
func ProtoMessageIn ¶ added in v0.2.0
ProtoMessageIn applies the In predicate on the "proto_message" field.
func ProtoMessageLT ¶ added in v0.2.0
ProtoMessageLT applies the LT predicate on the "proto_message" field.
func ProtoMessageLTE ¶ added in v0.2.0
ProtoMessageLTE applies the LTE predicate on the "proto_message" field.
func ProtoMessageNEQ ¶ added in v0.2.0
ProtoMessageNEQ applies the NEQ predicate on the "proto_message" field.
func ProtoMessageNotIn ¶ added in v0.2.0
ProtoMessageNotIn applies the NotIn predicate on the "proto_message" field.
func ToNodeID ¶
ToNodeID applies equality check predicate on the "to_node_id" field. It's identical to ToNodeIDEQ.
func ToNodeIDEQ ¶
ToNodeIDEQ applies the EQ predicate on the "to_node_id" field.
func ToNodeIDIn ¶
ToNodeIDIn applies the In predicate on the "to_node_id" field.
func ToNodeIDNEQ ¶
ToNodeIDNEQ applies the NEQ predicate on the "to_node_id" field.
func ToNodeIDNotIn ¶
ToNodeIDNotIn applies the NotIn predicate on the "to_node_id" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" 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 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.