packageversion

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the packageversion type in the database.
	Label = "package_version"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldNameID holds the string denoting the name_id field in the database.
	FieldNameID = "name_id"
	// FieldVersion holds the string denoting the version field in the database.
	FieldVersion = "version"
	// FieldSubpath holds the string denoting the subpath field in the database.
	FieldSubpath = "subpath"
	// FieldQualifiers holds the string denoting the qualifiers field in the database.
	FieldQualifiers = "qualifiers"
	// FieldHash holds the string denoting the hash field in the database.
	FieldHash = "hash"
	// EdgeName holds the string denoting the name edge name in mutations.
	EdgeName = "name"
	// EdgeOccurrences holds the string denoting the occurrences edge name in mutations.
	EdgeOccurrences = "occurrences"
	// EdgeSbom holds the string denoting the sbom edge name in mutations.
	EdgeSbom = "sbom"
	// EdgeEqualPackages holds the string denoting the equal_packages edge name in mutations.
	EdgeEqualPackages = "equal_packages"
	// Table holds the table name of the packageversion in the database.
	Table = "package_versions"
	// NameTable is the table that holds the name relation/edge.
	NameTable = "package_versions"
	// NameInverseTable is the table name for the PackageName entity.
	// It exists in this package in order to avoid circular dependency with the "packagename" package.
	NameInverseTable = "package_names"
	// NameColumn is the table column denoting the name relation/edge.
	NameColumn = "name_id"
	// OccurrencesTable is the table that holds the occurrences relation/edge.
	OccurrencesTable = "occurrences"
	// OccurrencesInverseTable is the table name for the Occurrence entity.
	// It exists in this package in order to avoid circular dependency with the "occurrence" package.
	OccurrencesInverseTable = "occurrences"
	// OccurrencesColumn is the table column denoting the occurrences relation/edge.
	OccurrencesColumn = "package_id"
	// SbomTable is the table that holds the sbom relation/edge.
	SbomTable = "bill_of_materials"
	// SbomInverseTable is the table name for the BillOfMaterials entity.
	// It exists in this package in order to avoid circular dependency with the "billofmaterials" package.
	SbomInverseTable = "bill_of_materials"
	// SbomColumn is the table column denoting the sbom relation/edge.
	SbomColumn = "package_id"
	// EqualPackagesTable is the table that holds the equal_packages relation/edge. The primary key declared below.
	EqualPackagesTable = "pkg_equal_packages"
	// EqualPackagesInverseTable is the table name for the PkgEqual entity.
	// It exists in this package in order to avoid circular dependency with the "pkgequal" package.
	EqualPackagesInverseTable = "pkg_equals"
)

Variables

View Source
var (
	// DefaultVersion holds the default value on creation for the "version" field.
	DefaultVersion string
	// DefaultSubpath holds the default value on creation for the "subpath" field.
	DefaultSubpath string
)

Columns holds all SQL columns for packageversion fields.

View Source
var (
	// EqualPackagesPrimaryKey and EqualPackagesColumn2 are the table columns denoting the
	// primary key for the equal_packages relation (M2M).
	EqualPackagesPrimaryKey = []string{"pkg_equal_id", "package_version_id"}
)

Functions

func And

And groups predicates with the AND operator between them.

func HasEqualPackages

func HasEqualPackages() predicate.PackageVersion

HasEqualPackages applies the HasEdge predicate on the "equal_packages" edge.

func HasEqualPackagesWith

func HasEqualPackagesWith(preds ...predicate.PkgEqual) predicate.PackageVersion

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

func HasName

func HasName() predicate.PackageVersion

HasName applies the HasEdge predicate on the "name" edge.

func HasNameWith

func HasNameWith(preds ...predicate.PackageName) predicate.PackageVersion

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

func HasOccurrences

func HasOccurrences() predicate.PackageVersion

HasOccurrences applies the HasEdge predicate on the "occurrences" edge.

func HasOccurrencesWith

func HasOccurrencesWith(preds ...predicate.Occurrence) predicate.PackageVersion

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

func HasSbom

func HasSbom() predicate.PackageVersion

HasSbom applies the HasEdge predicate on the "sbom" edge.

func HasSbomWith

func HasSbomWith(preds ...predicate.BillOfMaterials) predicate.PackageVersion

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

func Hash

Hash applies equality check predicate on the "hash" field. It's identical to HashEQ.

func HashContains

func HashContains(v string) predicate.PackageVersion

HashContains applies the Contains predicate on the "hash" field.

func HashContainsFold

func HashContainsFold(v string) predicate.PackageVersion

HashContainsFold applies the ContainsFold predicate on the "hash" field.

func HashEQ

HashEQ applies the EQ predicate on the "hash" field.

func HashEqualFold

func HashEqualFold(v string) predicate.PackageVersion

HashEqualFold applies the EqualFold predicate on the "hash" field.

func HashGT

HashGT applies the GT predicate on the "hash" field.

func HashGTE

func HashGTE(v string) predicate.PackageVersion

HashGTE applies the GTE predicate on the "hash" field.

func HashHasPrefix

func HashHasPrefix(v string) predicate.PackageVersion

HashHasPrefix applies the HasPrefix predicate on the "hash" field.

func HashHasSuffix

func HashHasSuffix(v string) predicate.PackageVersion

HashHasSuffix applies the HasSuffix predicate on the "hash" field.

func HashIn

func HashIn(vs ...string) predicate.PackageVersion

HashIn applies the In predicate on the "hash" field.

func HashLT

HashLT applies the LT predicate on the "hash" field.

func HashLTE

func HashLTE(v string) predicate.PackageVersion

HashLTE applies the LTE predicate on the "hash" field.

func HashNEQ

func HashNEQ(v string) predicate.PackageVersion

HashNEQ applies the NEQ predicate on the "hash" field.

func HashNotIn

func HashNotIn(vs ...string) predicate.PackageVersion

HashNotIn applies the NotIn predicate on the "hash" field.

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.PackageVersion

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.PackageVersion

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.PackageVersion

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.PackageVersion

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.PackageVersion

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.PackageVersion

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.PackageVersion

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.PackageVersion

IDNotIn applies the NotIn predicate on the ID field.

func NameID

func NameID(v int) predicate.PackageVersion

NameID applies equality check predicate on the "name_id" field. It's identical to NameIDEQ.

func NameIDEQ

func NameIDEQ(v int) predicate.PackageVersion

NameIDEQ applies the EQ predicate on the "name_id" field.

func NameIDIn

func NameIDIn(vs ...int) predicate.PackageVersion

NameIDIn applies the In predicate on the "name_id" field.

func NameIDNEQ

func NameIDNEQ(v int) predicate.PackageVersion

NameIDNEQ applies the NEQ predicate on the "name_id" field.

func NameIDNotIn

func NameIDNotIn(vs ...int) predicate.PackageVersion

NameIDNotIn applies the NotIn predicate on the "name_id" field.

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func QualifiersContains

func QualifiersContains(key, value string) func(*sql.Selector)

QualifiersContains filters out package versions that do not have the given qualifier key/value pair.

func QualifiersIsEmpty

func QualifiersIsEmpty() func(*sql.Selector)

QualifiersIsEmpty filters out package versions that have no qualifiers. It accounts for null, empty array, and null literal json value.

func QualifiersIsNil

func QualifiersIsNil() predicate.PackageVersion

QualifiersIsNil applies the IsNil predicate on the "qualifiers" field.

func QualifiersMatch

func QualifiersMatch(spec []*model.PackageQualifierSpec, matchOnlyEmptyQualifiers bool) func(*sql.Selector)

QualifiersMatch constructs a JSON field query for the given qualifiers. If the value is nil, it will query for the key only. If the value is not nil, it will query for the key/value pair. Each additional spec will be ANDed together.

func QualifiersNotNil

func QualifiersNotNil() predicate.PackageVersion

QualifiersNotNil applies the NotNil predicate on the "qualifiers" field.

func QualifiersWithKeys

func QualifiersWithKeys(key string, keys ...string) func(*sql.Selector)

QualifiersWithKeys filters out package versions that do not have the given qualifier keys.

func Subpath

func Subpath(v string) predicate.PackageVersion

Subpath applies equality check predicate on the "subpath" field. It's identical to SubpathEQ.

func SubpathContains

func SubpathContains(v string) predicate.PackageVersion

SubpathContains applies the Contains predicate on the "subpath" field.

func SubpathContainsFold

func SubpathContainsFold(v string) predicate.PackageVersion

SubpathContainsFold applies the ContainsFold predicate on the "subpath" field.

func SubpathEQ

func SubpathEQ(v string) predicate.PackageVersion

SubpathEQ applies the EQ predicate on the "subpath" field.

func SubpathEqualFold

func SubpathEqualFold(v string) predicate.PackageVersion

SubpathEqualFold applies the EqualFold predicate on the "subpath" field.

func SubpathGT

func SubpathGT(v string) predicate.PackageVersion

SubpathGT applies the GT predicate on the "subpath" field.

func SubpathGTE

func SubpathGTE(v string) predicate.PackageVersion

SubpathGTE applies the GTE predicate on the "subpath" field.

func SubpathHasPrefix

func SubpathHasPrefix(v string) predicate.PackageVersion

SubpathHasPrefix applies the HasPrefix predicate on the "subpath" field.

func SubpathHasSuffix

func SubpathHasSuffix(v string) predicate.PackageVersion

SubpathHasSuffix applies the HasSuffix predicate on the "subpath" field.

func SubpathIn

func SubpathIn(vs ...string) predicate.PackageVersion

SubpathIn applies the In predicate on the "subpath" field.

func SubpathLT

func SubpathLT(v string) predicate.PackageVersion

SubpathLT applies the LT predicate on the "subpath" field.

func SubpathLTE

func SubpathLTE(v string) predicate.PackageVersion

SubpathLTE applies the LTE predicate on the "subpath" field.

func SubpathNEQ

func SubpathNEQ(v string) predicate.PackageVersion

SubpathNEQ applies the NEQ predicate on the "subpath" field.

func SubpathNotIn

func SubpathNotIn(vs ...string) predicate.PackageVersion

SubpathNotIn applies the NotIn predicate on the "subpath" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func Version

func Version(v string) predicate.PackageVersion

Version applies equality check predicate on the "version" field. It's identical to VersionEQ.

func VersionContains

func VersionContains(v string) predicate.PackageVersion

VersionContains applies the Contains predicate on the "version" field.

func VersionContainsFold

func VersionContainsFold(v string) predicate.PackageVersion

VersionContainsFold applies the ContainsFold predicate on the "version" field.

func VersionEQ

func VersionEQ(v string) predicate.PackageVersion

VersionEQ applies the EQ predicate on the "version" field.

func VersionEqualFold

func VersionEqualFold(v string) predicate.PackageVersion

VersionEqualFold applies the EqualFold predicate on the "version" field.

func VersionGT

func VersionGT(v string) predicate.PackageVersion

VersionGT applies the GT predicate on the "version" field.

func VersionGTE

func VersionGTE(v string) predicate.PackageVersion

VersionGTE applies the GTE predicate on the "version" field.

func VersionHasPrefix

func VersionHasPrefix(v string) predicate.PackageVersion

VersionHasPrefix applies the HasPrefix predicate on the "version" field.

func VersionHasSuffix

func VersionHasSuffix(v string) predicate.PackageVersion

VersionHasSuffix applies the HasSuffix predicate on the "version" field.

func VersionIn

func VersionIn(vs ...string) predicate.PackageVersion

VersionIn applies the In predicate on the "version" field.

func VersionLT

func VersionLT(v string) predicate.PackageVersion

VersionLT applies the LT predicate on the "version" field.

func VersionLTE

func VersionLTE(v string) predicate.PackageVersion

VersionLTE applies the LTE predicate on the "version" field.

func VersionNEQ

func VersionNEQ(v string) predicate.PackageVersion

VersionNEQ applies the NEQ predicate on the "version" field.

func VersionNotIn

func VersionNotIn(vs ...string) predicate.PackageVersion

VersionNotIn applies the NotIn predicate on the "version" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the PackageVersion queries.

func ByEqualPackages

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

ByEqualPackages orders the results by equal_packages terms.

func ByEqualPackagesCount

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

ByEqualPackagesCount orders the results by equal_packages count.

func ByHash

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

ByHash orders the results by the hash field.

func ByID

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

ByID orders the results by the id field.

func ByNameField

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

ByNameField orders the results by name field.

func ByNameID

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

ByNameID orders the results by the name_id field.

func ByOccurrences

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

ByOccurrences orders the results by occurrences terms.

func ByOccurrencesCount

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

ByOccurrencesCount orders the results by occurrences count.

func BySbom

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

BySbom orders the results by sbom terms.

func BySbomCount

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

BySbomCount orders the results by sbom count.

func BySubpath

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

BySubpath orders the results by the subpath field.

func ByVersion

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

ByVersion orders the results by the version field.

Jump to

Keyboard shortcuts

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