test seven
This commit is contained in:
@ -120,6 +120,8 @@ const (
|
||||
EdgeUe = "ue"
|
||||
// EdgeMa holds the string denoting the ma edge name in mutations.
|
||||
EdgeMa = "ma"
|
||||
// EdgeSev holds the string denoting the sev edge name in mutations.
|
||||
EdgeSev = "sev"
|
||||
// Table holds the table name of the user in the database.
|
||||
Table = "users"
|
||||
// CardTable is the table that holds the card relation/edge.
|
||||
@ -143,6 +145,13 @@ const (
|
||||
MaInverseTable = "mas"
|
||||
// MaColumn is the table column denoting the ma relation/edge.
|
||||
MaColumn = "user_ma"
|
||||
// SevTable is the table that holds the sev relation/edge.
|
||||
SevTable = "sevs"
|
||||
// SevInverseTable is the table name for the Sev entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "sev" package.
|
||||
SevInverseTable = "sevs"
|
||||
// SevColumn is the table column denoting the sev relation/edge.
|
||||
SevColumn = "user_sev"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for user fields.
|
||||
@ -575,6 +584,20 @@ func ByMa(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMaStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// BySevCount orders the results by sev count.
|
||||
func BySevCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newSevStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// BySev orders the results by sev terms.
|
||||
func BySev(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newSevStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newCardStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
@ -596,3 +619,10 @@ func newMaStep() *sqlgraph.Step {
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MaTable, MaColumn),
|
||||
)
|
||||
}
|
||||
func newSevStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(SevInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, SevTable, SevColumn),
|
||||
)
|
||||
}
|
||||
|
@ -2629,6 +2629,29 @@ func HasMaWith(preds ...predicate.Ma) predicate.User {
|
||||
})
|
||||
}
|
||||
|
||||
// HasSev applies the HasEdge predicate on the "sev" edge.
|
||||
func HasSev() predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, SevTable, SevColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasSevWith applies the HasEdge predicate on the "sev" edge with a given conditions (other predicates).
|
||||
func HasSevWith(preds ...predicate.Sev) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
step := newSevStep()
|
||||
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.User) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
|
Reference in New Issue
Block a user