// Code generated by ent, DO NOT EDIT.

package dynamicexecutionmetrics

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.DynamicExecutionMetrics {
	return predicate.DynamicExecutionMetrics(sql.FieldEQ(FieldID, id))
}

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

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

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

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

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

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

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

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

// HasMetrics applies the HasEdge predicate on the "metrics" edge.
func HasMetrics() predicate.DynamicExecutionMetrics {
	return predicate.DynamicExecutionMetrics(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.DynamicExecutionMetrics {
	return predicate.DynamicExecutionMetrics(func(s *sql.Selector) {
		step := newMetricsStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasRaceStatistics applies the HasEdge predicate on the "race_statistics" edge.
func HasRaceStatistics() predicate.DynamicExecutionMetrics {
	return predicate.DynamicExecutionMetrics(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, RaceStatisticsTable, RaceStatisticsColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasRaceStatisticsWith applies the HasEdge predicate on the "race_statistics" edge with a given conditions (other predicates).
func HasRaceStatisticsWith(preds ...predicate.RaceStatistics) predicate.DynamicExecutionMetrics {
	return predicate.DynamicExecutionMetrics(func(s *sql.Selector) {
		step := newRaceStatisticsStep()
		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.DynamicExecutionMetrics) predicate.DynamicExecutionMetrics {
	return predicate.DynamicExecutionMetrics(sql.AndPredicates(predicates...))
}

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

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