// Code generated by ent, DO NOT EDIT.

package packagemetrics

import (
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/buildbarn/bb-portal/ent/gen/ent/predicate"
)

// ID filters vertices based on their ID field.
func ID(id int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldEQ(FieldID, id))
}

// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldEQ(FieldID, id))
}

// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldNEQ(FieldID, id))
}

// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldIn(FieldID, ids...))
}

// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldNotIn(FieldID, ids...))
}

// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldGT(FieldID, id))
}

// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldGTE(FieldID, id))
}

// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldLT(FieldID, id))
}

// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldLTE(FieldID, id))
}

// PackagesLoaded applies equality check predicate on the "packages_loaded" field. It's identical to PackagesLoadedEQ.
func PackagesLoaded(v int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldEQ(FieldPackagesLoaded, v))
}

// PackagesLoadedEQ applies the EQ predicate on the "packages_loaded" field.
func PackagesLoadedEQ(v int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldEQ(FieldPackagesLoaded, v))
}

// PackagesLoadedNEQ applies the NEQ predicate on the "packages_loaded" field.
func PackagesLoadedNEQ(v int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldNEQ(FieldPackagesLoaded, v))
}

// PackagesLoadedIn applies the In predicate on the "packages_loaded" field.
func PackagesLoadedIn(vs ...int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldIn(FieldPackagesLoaded, vs...))
}

// PackagesLoadedNotIn applies the NotIn predicate on the "packages_loaded" field.
func PackagesLoadedNotIn(vs ...int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldNotIn(FieldPackagesLoaded, vs...))
}

// PackagesLoadedGT applies the GT predicate on the "packages_loaded" field.
func PackagesLoadedGT(v int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldGT(FieldPackagesLoaded, v))
}

// PackagesLoadedGTE applies the GTE predicate on the "packages_loaded" field.
func PackagesLoadedGTE(v int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldGTE(FieldPackagesLoaded, v))
}

// PackagesLoadedLT applies the LT predicate on the "packages_loaded" field.
func PackagesLoadedLT(v int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldLT(FieldPackagesLoaded, v))
}

// PackagesLoadedLTE applies the LTE predicate on the "packages_loaded" field.
func PackagesLoadedLTE(v int64) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldLTE(FieldPackagesLoaded, v))
}

// PackagesLoadedIsNil applies the IsNil predicate on the "packages_loaded" field.
func PackagesLoadedIsNil() predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldIsNull(FieldPackagesLoaded))
}

// PackagesLoadedNotNil applies the NotNil predicate on the "packages_loaded" field.
func PackagesLoadedNotNil() predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.FieldNotNull(FieldPackagesLoaded))
}

// HasMetrics applies the HasEdge predicate on the "metrics" edge.
func HasMetrics() predicate.PackageMetrics {
	return predicate.PackageMetrics(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, true, MetricsTable, MetricsColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasMetricsWith applies the HasEdge predicate on the "metrics" edge with a given conditions (other predicates).
func HasMetricsWith(preds ...predicate.Metrics) predicate.PackageMetrics {
	return predicate.PackageMetrics(func(s *sql.Selector) {
		step := newMetricsStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasPackageLoadMetrics applies the HasEdge predicate on the "package_load_metrics" edge.
func HasPackageLoadMetrics() predicate.PackageMetrics {
	return predicate.PackageMetrics(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, PackageLoadMetricsTable, PackageLoadMetricsColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasPackageLoadMetricsWith applies the HasEdge predicate on the "package_load_metrics" edge with a given conditions (other predicates).
func HasPackageLoadMetricsWith(preds ...predicate.PackageLoadMetrics) predicate.PackageMetrics {
	return predicate.PackageMetrics(func(s *sql.Selector) {
		step := newPackageLoadMetricsStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// And groups predicates with the AND operator between them.
func And(predicates ...predicate.PackageMetrics) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.AndPredicates(predicates...))
}

// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.PackageMetrics) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.OrPredicates(predicates...))
}

// Not applies the not operator on the given predicate.
func Not(p predicate.PackageMetrics) predicate.PackageMetrics {
	return predicate.PackageMetrics(sql.NotPredicates(p))
}
