Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Property) predicate.Property
- func Data(v string) predicate.Property
- func DataContains(v string) predicate.Property
- func DataContainsFold(v string) predicate.Property
- func DataEQ(v string) predicate.Property
- func DataEqualFold(v string) predicate.Property
- func DataGT(v string) predicate.Property
- func DataGTE(v string) predicate.Property
- func DataHasPrefix(v string) predicate.Property
- func DataHasSuffix(v string) predicate.Property
- func DataIn(vs ...string) predicate.Property
- func DataLT(v string) predicate.Property
- func DataLTE(v string) predicate.Property
- func DataNEQ(v string) predicate.Property
- func DataNotIn(vs ...string) predicate.Property
- func HasDocuments() predicate.Property
- func HasDocumentsWith(preds ...predicate.Document) predicate.Property
- func HasNodes() predicate.Property
- func HasNodesWith(preds ...predicate.Node) predicate.Property
- func ID(id uuid.UUID) predicate.Property
- func IDEQ(id uuid.UUID) predicate.Property
- func IDGT(id uuid.UUID) predicate.Property
- func IDGTE(id uuid.UUID) predicate.Property
- func IDIn(ids ...uuid.UUID) predicate.Property
- func IDLT(id uuid.UUID) predicate.Property
- func IDLTE(id uuid.UUID) predicate.Property
- func IDNEQ(id uuid.UUID) predicate.Property
- func IDNotIn(ids ...uuid.UUID) predicate.Property
- func Name(v string) predicate.Property
- func NameContains(v string) predicate.Property
- func NameContainsFold(v string) predicate.Property
- func NameEQ(v string) predicate.Property
- func NameEqualFold(v string) predicate.Property
- func NameGT(v string) predicate.Property
- func NameGTE(v string) predicate.Property
- func NameHasPrefix(v string) predicate.Property
- func NameHasSuffix(v string) predicate.Property
- func NameIn(vs ...string) predicate.Property
- func NameLT(v string) predicate.Property
- func NameLTE(v string) predicate.Property
- func NameNEQ(v string) predicate.Property
- func NameNotIn(vs ...string) predicate.Property
- func Not(p predicate.Property) predicate.Property
- func Or(predicates ...predicate.Property) predicate.Property
- func ProtoMessage(v *sbom.Property) predicate.Property
- func ProtoMessageEQ(v *sbom.Property) predicate.Property
- func ProtoMessageGT(v *sbom.Property) predicate.Property
- func ProtoMessageGTE(v *sbom.Property) predicate.Property
- func ProtoMessageIn(vs ...*sbom.Property) predicate.Property
- func ProtoMessageLT(v *sbom.Property) predicate.Property
- func ProtoMessageLTE(v *sbom.Property) predicate.Property
- func ProtoMessageNEQ(v *sbom.Property) predicate.Property
- func ProtoMessageNotIn(vs ...*sbom.Property) predicate.Property
- func ValidColumn(column string) bool
- type OrderOption
- func ByData(opts ...sql.OrderTermOption) OrderOption
- func ByDocuments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDocumentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByNodes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNodesCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"} )
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, FieldName, FieldData, }
Columns holds all SQL columns for property fields.
Functions ¶
func DataContains ¶
DataContains applies the Contains predicate on the "data" field.
func DataContainsFold ¶
DataContainsFold applies the ContainsFold predicate on the "data" field.
func DataEqualFold ¶
DataEqualFold applies the EqualFold predicate on the "data" field.
func DataHasPrefix ¶
DataHasPrefix applies the HasPrefix predicate on the "data" field.
func DataHasSuffix ¶
DataHasSuffix applies the HasSuffix predicate on the "data" field.
func HasDocuments ¶
HasDocuments applies the HasEdge predicate on the "documents" edge.
func HasDocumentsWith ¶
HasDocumentsWith applies the HasEdge predicate on the "documents" edge with a given conditions (other predicates).
func HasNodesWith ¶
HasNodesWith applies the HasEdge predicate on the "nodes" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ProtoMessage ¶
ProtoMessage applies equality check predicate on the "proto_message" field. It's identical to ProtoMessageEQ.
func ProtoMessageEQ ¶
ProtoMessageEQ applies the EQ predicate on the "proto_message" field.
func ProtoMessageGT ¶
ProtoMessageGT applies the GT predicate on the "proto_message" field.
func ProtoMessageGTE ¶
ProtoMessageGTE applies the GTE predicate on the "proto_message" field.
func ProtoMessageIn ¶
ProtoMessageIn applies the In predicate on the "proto_message" field.
func ProtoMessageLT ¶
ProtoMessageLT applies the LT predicate on the "proto_message" field.
func ProtoMessageLTE ¶
ProtoMessageLTE applies the LTE predicate on the "proto_message" field.
func ProtoMessageNEQ ¶
ProtoMessageNEQ applies the NEQ predicate on the "proto_message" field.
func ProtoMessageNotIn ¶
ProtoMessageNotIn applies the NotIn predicate on the "proto_message" field.
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 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.