mirror of
https://github.com/ent/ent.git
synced 2026-04-28 05:30:56 +03:00
entc/gen: allow users to alter Query initialization using templates (#1453)
* Templating: Allow user to alter Query struct init * Update entc/gen/template/dialect/sql/query.tmpl Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com> * pr feedback * renamed template * changed sql to * * to tabs * removed old template * update bin-data * Update entc/integration/template/ent/template/query.tmpl Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com> * restore newline * update bindata Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
This commit is contained in:
@@ -11,6 +11,11 @@ in the LICENSE file in the root directory of this source tree.
|
||||
{{- with $.UnexportedForeignKeys }}
|
||||
withFKs bool
|
||||
{{- end }}
|
||||
{{- with $tmpls := matchTemplate "dialect/sql/query/fields/additional/*" }}
|
||||
{{- range $tmpl := $tmpls }}
|
||||
{{ xtemplate $tmpl $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ define "dialect/sql/query" }}
|
||||
|
||||
Reference in New Issue
Block a user