// Code generated by ent, DO NOT EDIT.
package reportdependencygraph
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the reportdependencygraph type in the database.
Label = "report_dependency_graph"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldFromPackageID holds the string denoting the from_package_id field in the database.
FieldFromPackageID = "from_package_id"
// FieldFromPackageName holds the string denoting the from_package_name field in the database.
FieldFromPackageName = "from_package_name"
// FieldFromPackageVersion holds the string denoting the from_package_version field in the database.
FieldFromPackageVersion = "from_package_version"
// FieldFromPackageEcosystem holds the string denoting the from_package_ecosystem field in the database.
FieldFromPackageEcosystem = "from_package_ecosystem"
// FieldToPackageID holds the string denoting the to_package_id field in the database.
FieldToPackageID = "to_package_id"
// FieldToPackageName holds the string denoting the to_package_name field in the database.
FieldToPackageName = "to_package_name"
// FieldToPackageVersion holds the string denoting the to_package_version field in the database.
FieldToPackageVersion = "to_package_version"
// FieldToPackageEcosystem holds the string denoting the to_package_ecosystem field in the database.
FieldToPackageEcosystem = "to_package_ecosystem"
// FieldDependencyType holds the string denoting the dependency_type field in the database.
FieldDependencyType = "dependency_type"
// FieldVersionConstraint holds the string denoting the version_constraint field in the database.
FieldVersionConstraint = "version_constraint"
// FieldDepth holds the string denoting the depth field in the database.
FieldDepth = "depth"
// FieldIsDirect holds the string denoting the is_direct field in the database.
FieldIsDirect = "is_direct"
// FieldIsRootEdge holds the string denoting the is_root_edge field in the database.
FieldIsRootEdge = "is_root_edge"
// FieldManifestID holds the string denoting the manifest_id field in the database.
FieldManifestID = "manifest_id"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
FieldUpdatedAt = "updated_at"
// Table holds the table name of the reportdependencygraph in the database.
Table = "report_dependency_graphs"
)
// Columns holds all SQL columns for reportdependencygraph fields.
var Columns = []string{
FieldID,
FieldFromPackageID,
FieldFromPackageName,
FieldFromPackageVersion,
FieldFromPackageEcosystem,
FieldToPackageID,
FieldToPackageName,
FieldToPackageVersion,
FieldToPackageEcosystem,
FieldDependencyType,
FieldVersionConstraint,
FieldDepth,
FieldIsDirect,
FieldIsRootEdge,
FieldManifestID,
FieldCreatedAt,
FieldUpdatedAt,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// FromPackageIDValidator is a validator for the "from_package_id" field. It is called by the builders before save.
FromPackageIDValidator func(string) error
// FromPackageNameValidator is a validator for the "from_package_name" field. It is called by the builders before save.
FromPackageNameValidator func(string) error
// FromPackageVersionValidator is a validator for the "from_package_version" field. It is called by the builders before save.
FromPackageVersionValidator func(string) error
// FromPackageEcosystemValidator is a validator for the "from_package_ecosystem" field. It is called by the builders before save.
FromPackageEcosystemValidator func(string) error
// ToPackageIDValidator is a validator for the "to_package_id" field. It is called by the builders before save.
ToPackageIDValidator func(string) error
// ToPackageNameValidator is a validator for the "to_package_name" field. It is called by the builders before save.
ToPackageNameValidator func(string) error
// ToPackageVersionValidator is a validator for the "to_package_version" field. It is called by the builders before save.
ToPackageVersionValidator func(string) error
// ToPackageEcosystemValidator is a validator for the "to_package_ecosystem" field. It is called by the builders before save.
ToPackageEcosystemValidator func(string) error
// DefaultDepth holds the default value on creation for the "depth" field.
DefaultDepth int
// DefaultIsDirect holds the default value on creation for the "is_direct" field.
DefaultIsDirect bool
// DefaultIsRootEdge holds the default value on creation for the "is_root_edge" field.
DefaultIsRootEdge bool
// ManifestIDValidator is a validator for the "manifest_id" field. It is called by the builders before save.
ManifestIDValidator func(string) error
)
// OrderOption defines the ordering options for the ReportDependencyGraph queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByFromPackageID orders the results by the from_package_id field.
func ByFromPackageID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFromPackageID, opts...).ToFunc()
}
// ByFromPackageName orders the results by the from_package_name field.
func ByFromPackageName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFromPackageName, opts...).ToFunc()
}
// ByFromPackageVersion orders the results by the from_package_version field.
func ByFromPackageVersion(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFromPackageVersion, opts...).ToFunc()
}
// ByFromPackageEcosystem orders the results by the from_package_ecosystem field.
func ByFromPackageEcosystem(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFromPackageEcosystem, opts...).ToFunc()
}
// ByToPackageID orders the results by the to_package_id field.
func ByToPackageID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldToPackageID, opts...).ToFunc()
}
// ByToPackageName orders the results by the to_package_name field.
func ByToPackageName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldToPackageName, opts...).ToFunc()
}
// ByToPackageVersion orders the results by the to_package_version field.
func ByToPackageVersion(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldToPackageVersion, opts...).ToFunc()
}
// ByToPackageEcosystem orders the results by the to_package_ecosystem field.
func ByToPackageEcosystem(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldToPackageEcosystem, opts...).ToFunc()
}
// ByDependencyType orders the results by the dependency_type field.
func ByDependencyType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDependencyType, opts...).ToFunc()
}
// ByVersionConstraint orders the results by the version_constraint field.
func ByVersionConstraint(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldVersionConstraint, opts...).ToFunc()
}
// ByDepth orders the results by the depth field.
func ByDepth(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDepth, opts...).ToFunc()
}
// ByIsDirect orders the results by the is_direct field.
func ByIsDirect(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsDirect, opts...).ToFunc()
}
// ByIsRootEdge orders the results by the is_root_edge field.
func ByIsRootEdge(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsRootEdge, opts...).ToFunc()
}
// ByManifestID orders the results by the manifest_id field.
func ByManifestID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldManifestID, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}