ent: add license and copyright to template files

Reviewed By: alexsn

Differential Revision: D17149292

fbshipit-source-id: 837de5fad988de1e54438b47584701f2fc35326d
This commit is contained in:
Ariel Mashraki
2019-09-01 03:01:49 -07:00
committed by Facebook Github Bot
parent 5bc8568069
commit 4323141fe2
40 changed files with 240 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
{{/*
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 "dialect/sql/order" -}}
{{- $f := $.Scope.Func -}}
func(s *sql.Selector) {

View File

@@ -1,3 +1,9 @@
{{/*
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 "dialect/sql/create" }}
{{ $builder := pascal $.Scope.Builder }}
{{ $receiver := receiver $builder }}

View File

@@ -1,3 +1,9 @@
{{/*
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 "dialect/sql/decode/one" }}
{{ $receiver := $.Receiver }}

View File

@@ -1,3 +1,9 @@
{{/*
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 "dialect/sql/delete" }}
{{ $builder := pascal $.Scope.Builder }}
{{ $receiver := receiver $builder }}

View File

@@ -1,3 +1,9 @@
{{/*
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.
*/}}
{{/* custom errors and errors handlers from sql dialects */}}
{{ define "dialect/sql/errors" }}
func isSQLConstraintError(err error) (*ErrConstraintFailed, bool) {

View File

@@ -1,3 +1,9 @@
{{/*
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 "dialect/sql/group" }}
{{ $builder := pascal $.Scope.Builder }}
{{ $receiver := receiver $builder }}

View File

@@ -1,3 +1,9 @@
{{/*
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.
*/}}
{{/* constants needed for sql dialects. */}}
{{ define "dialect/sql/meta/constants" }}
// Table holds the table name of the {{ lower $.Name }} in the database.

View File

@@ -1,3 +1,9 @@
{{/*
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 "dialect/sql/predicate/id" -}}
func(s *sql.Selector) {
{{- if $.ID.IsString }}id, _ := strconv.Atoi(id){{- end }}

View File

@@ -1,3 +1,9 @@
{{/*
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 "dialect/sql/query" }}
{{ $pkg := $.Scope.Package }}
{{ $builder := pascal $.Scope.Builder }}

View File

@@ -1,3 +1,9 @@
{{/*
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 "dialect/sql/update" }}
{{ $pkg := $.Scope.Package }}
{{ $builder := pascal $.Scope.Builder }}