mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/38 Only `IsNil` and `NotNil` predicates are supported this moment Reviewed By: alexsn Differential Revision: D17444976 fbshipit-source-id: 37336fa0bc7749af995933baee2e23bb7366dd78
43 lines
984 B
Cheetah
43 lines
984 B
Cheetah
{{/*
|
|
Copyright 2019-present Facebook Inc. All rights reserved.
|
|
This source code is licensed under the Apache 2.0 license found
|
|
in the LICENSE file in the root directory of this source tree.
|
|
*/}}
|
|
|
|
{{ define "import" }}
|
|
import (
|
|
"fmt"
|
|
"context"
|
|
"errors"
|
|
"math"
|
|
"strconv"
|
|
"strings"
|
|
"time"
|
|
{{- /* ignore generting on graph specififc templates */}}
|
|
{{- if not (eq $.Config.Package $.Package) }}
|
|
"{{ $.Config.Package }}/predicate"
|
|
"{{ $.Config.Package }}/{{ $.Package }}"
|
|
{{- with $.Config.Schema }}
|
|
"{{ . }}"
|
|
{{- end }}
|
|
{{- range $_, $f := $.StructFields }}
|
|
{{- with $f.PkgPath }}
|
|
"{{ . }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- range $_, $f := $.Fields }}
|
|
{{- with $f.Type.PkgPath }}
|
|
"{{ . }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
"github.com/facebookincubator/ent"
|
|
"github.com/facebookincubator/ent/dialect"
|
|
{{- range $_, $storage := $.Storage }}
|
|
{{- range $_, $import := $storage.Imports }}
|
|
"{{ $import }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
)
|
|
{{ end }}
|