ent: add AND operator for type predicates

Reviewed By: alexsn

Differential Revision: D16668249

fbshipit-source-id: 1554c3af9779fd551a90218c604d23b5bf8b8c6b
This commit is contained in:
Ariel Mashraki
2019-08-06 14:38:28 -07:00
committed by Facebook Github Bot
parent 4565455ee4
commit 2fd1b728f3
20 changed files with 348 additions and 71 deletions

View File

@@ -127,6 +127,14 @@
}
{{- end }}
{{ define "dialect/sql/predicate/and" -}}
func(s *sql.Selector) {
for _, p := range predicates {
p(s)
}
}
{{- end }}
{{ define "dialect/sql/predicate/or" -}}
func(s *sql.Selector) {
for i, p := range predicates {