Files
ent/entc/gen/template/import.tmpl
Ariel Mashraki 56656dfcb6 ent/entc: configure storage driver in codegen
Summary: Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1229

Reviewed By: alexsn

Differential Revision: D16539934

fbshipit-source-id: b3a8bf1f1be6f65ad3f649cd921ea20fc24182bf
2019-07-30 02:49:22 -07:00

27 lines
506 B
Cheetah

{{ define "import" }}
import (
"fmt"
"context"
"errors"
"math"
"strconv"
"strings"
"time"
{{/* ignore generting on graph templates */}}
{{ if not (eq $.Config.Package $.Package) }}
"{{ $.Config.Package }}/predicate"
"{{ $.Config.Package }}/{{ $.Package }}"
{{ with $.Config.Schema }} "{{ . }}" {{ end }}
{{ end }}
"fbc/ent"
"fbc/ent/dialect"
{{ range $_, $storage := $.Storage -}}
{{ range $_, $import := $storage.Imports -}}
"{{ $import }}"
{{ end -}}
{{ end -}}
)
{{ end }}