mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
examples: run codegen for examples
This commit is contained in:
@@ -490,6 +490,9 @@ func (pq *PetQuery) sqlQuery(ctx context.Context) *sql.Selector {
|
||||
selector = pq.sql
|
||||
selector.Select(selector.Columns(columns...)...)
|
||||
}
|
||||
if pq.unique != nil && *pq.unique {
|
||||
selector.Distinct()
|
||||
}
|
||||
for _, p := range pq.predicates {
|
||||
p(selector)
|
||||
}
|
||||
|
||||
@@ -483,6 +483,9 @@ func (uq *UserQuery) sqlQuery(ctx context.Context) *sql.Selector {
|
||||
selector = uq.sql
|
||||
selector.Select(selector.Columns(columns...)...)
|
||||
}
|
||||
if uq.unique != nil && *uq.unique {
|
||||
selector.Distinct()
|
||||
}
|
||||
for _, p := range uq.predicates {
|
||||
p(selector)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user