Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Metadata) predicate.Metadata
- func Comment(v string) predicate.Metadata
- func CommentContains(v string) predicate.Metadata
- func CommentContainsFold(v string) predicate.Metadata
- func CommentEQ(v string) predicate.Metadata
- func CommentEqualFold(v string) predicate.Metadata
- func CommentGT(v string) predicate.Metadata
- func CommentGTE(v string) predicate.Metadata
- func CommentHasPrefix(v string) predicate.Metadata
- func CommentHasSuffix(v string) predicate.Metadata
- func CommentIn(vs ...string) predicate.Metadata
- func CommentLT(v string) predicate.Metadata
- func CommentLTE(v string) predicate.Metadata
- func CommentNEQ(v string) predicate.Metadata
- func CommentNotIn(vs ...string) predicate.Metadata
- func Date(v time.Time) predicate.Metadata
- func DateEQ(v time.Time) predicate.Metadata
- func DateGT(v time.Time) predicate.Metadata
- func DateGTE(v time.Time) predicate.Metadata
- func DateIn(vs ...time.Time) predicate.Metadata
- func DateLT(v time.Time) predicate.Metadata
- func DateLTE(v time.Time) predicate.Metadata
- func DateNEQ(v time.Time) predicate.Metadata
- func DateNotIn(vs ...time.Time) predicate.Metadata
- func HasAuthors() predicate.Metadata
- func HasAuthorsWith(preds ...predicate.Person) predicate.Metadata
- func HasDocumentTypes() predicate.Metadata
- func HasDocumentTypesWith(preds ...predicate.DocumentType) predicate.Metadata
- func HasDocuments() predicate.Metadata
- func HasDocumentsWith(preds ...predicate.Document) predicate.Metadata
- func HasSourceData() predicate.Metadata
- func HasSourceDataWith(preds ...predicate.SourceData) predicate.Metadata
- func HasTools() predicate.Metadata
- func HasToolsWith(preds ...predicate.Tool) predicate.Metadata
- func ID(id uuid.UUID) predicate.Metadata
- func IDEQ(id uuid.UUID) predicate.Metadata
- func IDGT(id uuid.UUID) predicate.Metadata
- func IDGTE(id uuid.UUID) predicate.Metadata
- func IDIn(ids ...uuid.UUID) predicate.Metadata
- func IDLT(id uuid.UUID) predicate.Metadata
- func IDLTE(id uuid.UUID) predicate.Metadata
- func IDNEQ(id uuid.UUID) predicate.Metadata
- func IDNotIn(ids ...uuid.UUID) predicate.Metadata
- func Name(v string) predicate.Metadata
- func NameContains(v string) predicate.Metadata
- func NameContainsFold(v string) predicate.Metadata
- func NameEQ(v string) predicate.Metadata
- func NameEqualFold(v string) predicate.Metadata
- func NameGT(v string) predicate.Metadata
- func NameGTE(v string) predicate.Metadata
- func NameHasPrefix(v string) predicate.Metadata
- func NameHasSuffix(v string) predicate.Metadata
- func NameIn(vs ...string) predicate.Metadata
- func NameLT(v string) predicate.Metadata
- func NameLTE(v string) predicate.Metadata
- func NameNEQ(v string) predicate.Metadata
- func NameNotIn(vs ...string) predicate.Metadata
- func NativeID(v string) predicate.Metadata
- func NativeIDContains(v string) predicate.Metadata
- func NativeIDContainsFold(v string) predicate.Metadata
- func NativeIDEQ(v string) predicate.Metadata
- func NativeIDEqualFold(v string) predicate.Metadata
- func NativeIDGT(v string) predicate.Metadata
- func NativeIDGTE(v string) predicate.Metadata
- func NativeIDHasPrefix(v string) predicate.Metadata
- func NativeIDHasSuffix(v string) predicate.Metadata
- func NativeIDIn(vs ...string) predicate.Metadata
- func NativeIDLT(v string) predicate.Metadata
- func NativeIDLTE(v string) predicate.Metadata
- func NativeIDNEQ(v string) predicate.Metadata
- func NativeIDNotIn(vs ...string) predicate.Metadata
- func Not(p predicate.Metadata) predicate.Metadata
- func Or(predicates ...predicate.Metadata) predicate.Metadata
- func ProtoMessage(v *sbom.Metadata) predicate.Metadata
- func ProtoMessageEQ(v *sbom.Metadata) predicate.Metadata
- func ProtoMessageGT(v *sbom.Metadata) predicate.Metadata
- func ProtoMessageGTE(v *sbom.Metadata) predicate.Metadata
- func ProtoMessageIn(vs ...*sbom.Metadata) predicate.Metadata
- func ProtoMessageLT(v *sbom.Metadata) predicate.Metadata
- func ProtoMessageLTE(v *sbom.Metadata) predicate.Metadata
- func ProtoMessageNEQ(v *sbom.Metadata) predicate.Metadata
- func ProtoMessageNotIn(vs ...*sbom.Metadata) predicate.Metadata
- func SourceDataID(v uuid.UUID) predicate.Metadata
- func SourceDataIDEQ(v uuid.UUID) predicate.Metadata
- func SourceDataIDIn(vs ...uuid.UUID) predicate.Metadata
- func SourceDataIDIsNil() predicate.Metadata
- func SourceDataIDNEQ(v uuid.UUID) predicate.Metadata
- func SourceDataIDNotIn(vs ...uuid.UUID) predicate.Metadata
- func SourceDataIDNotNil() predicate.Metadata
- func ValidColumn(column string) bool
- func Version(v string) predicate.Metadata
- func VersionContains(v string) predicate.Metadata
- func VersionContainsFold(v string) predicate.Metadata
- func VersionEQ(v string) predicate.Metadata
- func VersionEqualFold(v string) predicate.Metadata
- func VersionGT(v string) predicate.Metadata
- func VersionGTE(v string) predicate.Metadata
- func VersionHasPrefix(v string) predicate.Metadata
- func VersionHasSuffix(v string) predicate.Metadata
- func VersionIn(vs ...string) predicate.Metadata
- func VersionLT(v string) predicate.Metadata
- func VersionLTE(v string) predicate.Metadata
- func VersionNEQ(v string) predicate.Metadata
- func VersionNotIn(vs ...string) predicate.Metadata
- type OrderOption
- func ByAuthors(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAuthorsCount(opts ...sql.OrderTermOption) OrderOption
- func ByComment(opts ...sql.OrderTermOption) OrderOption
- func ByDate(opts ...sql.OrderTermOption) OrderOption
- func ByDocumentTypes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDocumentTypesCount(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 ByNativeID(opts ...sql.OrderTermOption) OrderOption
- func BySourceDataField(field string, opts ...sql.OrderTermOption) OrderOption
- func BySourceDataID(opts ...sql.OrderTermOption) OrderOption
- func ByTools(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByToolsCount(opts ...sql.OrderTermOption) OrderOption
- func ByVersion(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the metadata type in the database. Label = "metadata" // 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" // FieldSourceDataID holds the string denoting the source_data_id field in the database. FieldSourceDataID = "source_data_id" // FieldNativeID holds the string denoting the native_id field in the database. FieldNativeID = "native_id" // FieldVersion holds the string denoting the version field in the database. FieldVersion = "version" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDate holds the string denoting the date field in the database. FieldDate = "date" // FieldComment holds the string denoting the comment field in the database. FieldComment = "comment" // EdgeTools holds the string denoting the tools edge name in mutations. EdgeTools = "tools" // EdgeAuthors holds the string denoting the authors edge name in mutations. EdgeAuthors = "authors" // EdgeDocumentTypes holds the string denoting the document_types edge name in mutations. EdgeDocumentTypes = "document_types" // EdgeSourceData holds the string denoting the source_data edge name in mutations. EdgeSourceData = "source_data" // EdgeDocuments holds the string denoting the documents edge name in mutations. EdgeDocuments = "documents" // Table holds the table name of the metadata in the database. Table = "metadata" // ToolsTable is the table that holds the tools relation/edge. The primary key declared below. ToolsTable = "metadata_tools" // ToolsInverseTable is the table name for the Tool entity. // It exists in this package in order to avoid circular dependency with the "tool" package. ToolsInverseTable = "tools" // AuthorsTable is the table that holds the authors relation/edge. The primary key declared below. AuthorsTable = "metadata_authors" // AuthorsInverseTable is the table name for the Person entity. // It exists in this package in order to avoid circular dependency with the "person" package. AuthorsInverseTable = "persons" // DocumentTypesTable is the table that holds the document_types relation/edge. The primary key declared below. DocumentTypesTable = "metadata_document_types" // DocumentTypesInverseTable is the table name for the DocumentType entity. // It exists in this package in order to avoid circular dependency with the "documenttype" package. DocumentTypesInverseTable = "document_types" // SourceDataTable is the table that holds the source_data relation/edge. SourceDataTable = "metadata" // SourceDataInverseTable is the table name for the SourceData entity. // It exists in this package in order to avoid circular dependency with the "sourcedata" package. SourceDataInverseTable = "source_data" // SourceDataColumn is the table column denoting the source_data relation/edge. SourceDataColumn = "source_data_id" // DocumentsTable is the table that holds the documents relation/edge. DocumentsTable = "documents" // 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" // DocumentsColumn is the table column denoting the documents relation/edge. DocumentsColumn = "metadata_id" )
Variables ¶
var ( // ToolsPrimaryKey and ToolsColumn2 are the table columns denoting the // primary key for the tools relation (M2M). ToolsPrimaryKey = []string{"metadata_id", "tool_id"} // AuthorsPrimaryKey and AuthorsColumn2 are the table columns denoting the // primary key for the authors relation (M2M). AuthorsPrimaryKey = []string{"metadata_id", "person_id"} // DocumentTypesPrimaryKey and DocumentTypesColumn2 are the table columns denoting the // primary key for the document_types relation (M2M). DocumentTypesPrimaryKey = []string{"metadata_id", "document_type_id"} )
var ( Hooks [1]ent.Hook // NativeIDValidator is a validator for the "native_id" field. It is called by the builders before save. NativeIDValidator func(string) error // 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, FieldSourceDataID, FieldNativeID, FieldVersion, FieldName, FieldDate, FieldComment, }
Columns holds all SQL columns for metadata fields.
Functions ¶
func Comment ¶
Comment applies equality check predicate on the "comment" field. It's identical to CommentEQ.
func CommentContains ¶
CommentContains applies the Contains predicate on the "comment" field.
func CommentContainsFold ¶
CommentContainsFold applies the ContainsFold predicate on the "comment" field.
func CommentEqualFold ¶
CommentEqualFold applies the EqualFold predicate on the "comment" field.
func CommentGTE ¶
CommentGTE applies the GTE predicate on the "comment" field.
func CommentHasPrefix ¶
CommentHasPrefix applies the HasPrefix predicate on the "comment" field.
func CommentHasSuffix ¶
CommentHasSuffix applies the HasSuffix predicate on the "comment" field.
func CommentLTE ¶
CommentLTE applies the LTE predicate on the "comment" field.
func CommentNEQ ¶
CommentNEQ applies the NEQ predicate on the "comment" field.
func CommentNotIn ¶
CommentNotIn applies the NotIn predicate on the "comment" field.
func HasAuthors ¶
HasAuthors applies the HasEdge predicate on the "authors" edge.
func HasAuthorsWith ¶
HasAuthorsWith applies the HasEdge predicate on the "authors" edge with a given conditions (other predicates).
func HasDocumentTypes ¶
HasDocumentTypes applies the HasEdge predicate on the "document_types" edge.
func HasDocumentTypesWith ¶
func HasDocumentTypesWith(preds ...predicate.DocumentType) predicate.Metadata
HasDocumentTypesWith applies the HasEdge predicate on the "document_types" edge with a given conditions (other predicates).
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 HasSourceData ¶ added in v0.2.0
HasSourceData applies the HasEdge predicate on the "source_data" edge.
func HasSourceDataWith ¶ added in v0.2.0
func HasSourceDataWith(preds ...predicate.SourceData) predicate.Metadata
HasSourceDataWith applies the HasEdge predicate on the "source_data" edge with a given conditions (other predicates).
func HasToolsWith ¶
HasToolsWith applies the HasEdge predicate on the "tools" 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 NativeID ¶ added in v0.2.0
NativeID applies equality check predicate on the "native_id" field. It's identical to NativeIDEQ.
func NativeIDContains ¶ added in v0.2.0
NativeIDContains applies the Contains predicate on the "native_id" field.
func NativeIDContainsFold ¶ added in v0.2.0
NativeIDContainsFold applies the ContainsFold predicate on the "native_id" field.
func NativeIDEQ ¶ added in v0.2.0
NativeIDEQ applies the EQ predicate on the "native_id" field.
func NativeIDEqualFold ¶ added in v0.2.0
NativeIDEqualFold applies the EqualFold predicate on the "native_id" field.
func NativeIDGT ¶ added in v0.2.0
NativeIDGT applies the GT predicate on the "native_id" field.
func NativeIDGTE ¶ added in v0.2.0
NativeIDGTE applies the GTE predicate on the "native_id" field.
func NativeIDHasPrefix ¶ added in v0.2.0
NativeIDHasPrefix applies the HasPrefix predicate on the "native_id" field.
func NativeIDHasSuffix ¶ added in v0.2.0
NativeIDHasSuffix applies the HasSuffix predicate on the "native_id" field.
func NativeIDIn ¶ added in v0.2.0
NativeIDIn applies the In predicate on the "native_id" field.
func NativeIDLT ¶ added in v0.2.0
NativeIDLT applies the LT predicate on the "native_id" field.
func NativeIDLTE ¶ added in v0.2.0
NativeIDLTE applies the LTE predicate on the "native_id" field.
func NativeIDNEQ ¶ added in v0.2.0
NativeIDNEQ applies the NEQ predicate on the "native_id" field.
func NativeIDNotIn ¶ added in v0.2.0
NativeIDNotIn applies the NotIn predicate on the "native_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 SourceDataID ¶ added in v0.2.0
SourceDataID applies equality check predicate on the "source_data_id" field. It's identical to SourceDataIDEQ.
func SourceDataIDEQ ¶ added in v0.2.0
SourceDataIDEQ applies the EQ predicate on the "source_data_id" field.
func SourceDataIDIn ¶ added in v0.2.0
SourceDataIDIn applies the In predicate on the "source_data_id" field.
func SourceDataIDIsNil ¶ added in v0.2.0
SourceDataIDIsNil applies the IsNil predicate on the "source_data_id" field.
func SourceDataIDNEQ ¶ added in v0.2.0
SourceDataIDNEQ applies the NEQ predicate on the "source_data_id" field.
func SourceDataIDNotIn ¶ added in v0.2.0
SourceDataIDNotIn applies the NotIn predicate on the "source_data_id" field.
func SourceDataIDNotNil ¶ added in v0.2.0
SourceDataIDNotNil applies the NotNil predicate on the "source_data_id" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Version ¶
Version applies equality check predicate on the "version" field. It's identical to VersionEQ.
func VersionContains ¶
VersionContains applies the Contains predicate on the "version" field.
func VersionContainsFold ¶
VersionContainsFold applies the ContainsFold predicate on the "version" field.
func VersionEqualFold ¶
VersionEqualFold applies the EqualFold predicate on the "version" field.
func VersionGTE ¶
VersionGTE applies the GTE predicate on the "version" field.
func VersionHasPrefix ¶
VersionHasPrefix applies the HasPrefix predicate on the "version" field.
func VersionHasSuffix ¶
VersionHasSuffix applies the HasSuffix predicate on the "version" field.
func VersionLTE ¶
VersionLTE applies the LTE predicate on the "version" field.
func VersionNEQ ¶
VersionNEQ applies the NEQ predicate on the "version" field.
func VersionNotIn ¶
VersionNotIn applies the NotIn predicate on the "version" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Metadata queries.
func ByAuthors ¶
func ByAuthors(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAuthors orders the results by authors terms.
func ByAuthorsCount ¶
func ByAuthorsCount(opts ...sql.OrderTermOption) OrderOption
ByAuthorsCount orders the results by authors count.
func ByComment ¶
func ByComment(opts ...sql.OrderTermOption) OrderOption
ByComment orders the results by the comment field.
func ByDate ¶
func ByDate(opts ...sql.OrderTermOption) OrderOption
ByDate orders the results by the date field.
func ByDocumentTypes ¶
func ByDocumentTypes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByDocumentTypes orders the results by document_types terms.
func ByDocumentTypesCount ¶
func ByDocumentTypesCount(opts ...sql.OrderTermOption) OrderOption
ByDocumentTypesCount orders the results by document_types count.
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 ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByNativeID ¶ added in v0.2.0
func ByNativeID(opts ...sql.OrderTermOption) OrderOption
ByNativeID orders the results by the native_id field.
func BySourceDataField ¶ added in v0.2.0
func BySourceDataField(field string, opts ...sql.OrderTermOption) OrderOption
BySourceDataField orders the results by source_data field.
func BySourceDataID ¶ added in v0.2.0
func BySourceDataID(opts ...sql.OrderTermOption) OrderOption
BySourceDataID orders the results by the source_data_id field.
func ByTools ¶
func ByTools(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTools orders the results by tools terms.
func ByToolsCount ¶
func ByToolsCount(opts ...sql.OrderTermOption) OrderOption
ByToolsCount orders the results by tools count.
func ByVersion ¶
func ByVersion(opts ...sql.OrderTermOption) OrderOption
ByVersion orders the results by the version field.