property

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

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the property type in the database.
	Label = "property"
	// 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldData holds the string denoting the data field in the database.
	FieldData = "data"
	// 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 property in the database.
	Table = "properties"
	// DocumentsTable is the table that holds the documents relation/edge. The primary key declared below.
	DocumentsTable = "document_properties"
	// 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_properties"
	// 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", "property_id"}
	// NodesPrimaryKey and NodesColumn2 are the table columns denoting the
	// primary key for the nodes relation (M2M).
	NodesPrimaryKey = []string{"node_id", "property_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 property fields.

Functions

func And

func And(predicates ...predicate.Property) predicate.Property

And groups predicates with the AND operator between them.

func Data

func Data(v string) predicate.Property

Data applies equality check predicate on the "data" field. It's identical to DataEQ.

func DataContains

func DataContains(v string) predicate.Property

DataContains applies the Contains predicate on the "data" field.

func DataContainsFold

func DataContainsFold(v string) predicate.Property

DataContainsFold applies the ContainsFold predicate on the "data" field.

func DataEQ

func DataEQ(v string) predicate.Property

DataEQ applies the EQ predicate on the "data" field.

func DataEqualFold

func DataEqualFold(v string) predicate.Property

DataEqualFold applies the EqualFold predicate on the "data" field.

func DataGT

func DataGT(v string) predicate.Property

DataGT applies the GT predicate on the "data" field.

func DataGTE

func DataGTE(v string) predicate.Property

DataGTE applies the GTE predicate on the "data" field.

func DataHasPrefix

func DataHasPrefix(v string) predicate.Property

DataHasPrefix applies the HasPrefix predicate on the "data" field.

func DataHasSuffix

func DataHasSuffix(v string) predicate.Property

DataHasSuffix applies the HasSuffix predicate on the "data" field.

func DataIn

func DataIn(vs ...string) predicate.Property

DataIn applies the In predicate on the "data" field.

func DataLT

func DataLT(v string) predicate.Property

DataLT applies the LT predicate on the "data" field.

func DataLTE

func DataLTE(v string) predicate.Property

DataLTE applies the LTE predicate on the "data" field.

func DataNEQ

func DataNEQ(v string) predicate.Property

DataNEQ applies the NEQ predicate on the "data" field.

func DataNotIn

func DataNotIn(vs ...string) predicate.Property

DataNotIn applies the NotIn predicate on the "data" field.

func HasDocuments

func HasDocuments() predicate.Property

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

func HasDocumentsWith

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

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

func HasNodes

func HasNodes() predicate.Property

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

func HasNodesWith

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

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

func ID

func ID(id uuid.UUID) predicate.Property

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Property

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Property

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Property

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Property

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Property

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Property

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Property

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Property

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Property

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Property

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Property

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Property

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Property

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Property

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Property

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Property

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Property

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Property

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Property

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Property

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Property) predicate.Property

Or groups predicates with the OR operator between them.

func ProtoMessage

func ProtoMessage(v *sbom.Property) predicate.Property

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

func ProtoMessageEQ

func ProtoMessageEQ(v *sbom.Property) predicate.Property

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

func ProtoMessageGT

func ProtoMessageGT(v *sbom.Property) predicate.Property

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

func ProtoMessageGTE

func ProtoMessageGTE(v *sbom.Property) predicate.Property

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

func ProtoMessageIn

func ProtoMessageIn(vs ...*sbom.Property) predicate.Property

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

func ProtoMessageLT

func ProtoMessageLT(v *sbom.Property) predicate.Property

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

func ProtoMessageLTE

func ProtoMessageLTE(v *sbom.Property) predicate.Property

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

func ProtoMessageNEQ

func ProtoMessageNEQ(v *sbom.Property) predicate.Property

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

func ProtoMessageNotIn

func ProtoMessageNotIn(vs ...*sbom.Property) predicate.Property

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

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 Property queries.

func ByData

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

ByData orders the results by the data field.

func ByDocuments

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

ByDocuments orders the results by documents terms.

func ByDocumentsCount

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 ByName

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

ByName orders the results by the name field.

func ByNodes

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

ByNodes orders the results by nodes terms.

func ByNodesCount

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

ByNodesCount orders the results by nodes count.

Jump to

Keyboard shortcuts

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