sql writer
This commit is contained in:
9
pkg/writers/pgsql/templates/create_table_composed.tmpl
Normal file
9
pkg/writers/pgsql/templates/create_table_composed.tmpl
Normal file
@@ -0,0 +1,9 @@
|
||||
{{/* Example of table creation using composition */}}
|
||||
{{- define "create_table_composed" -}}
|
||||
CREATE TABLE IF NOT EXISTS {{template "qualified_table" .}} (
|
||||
{{- range $i, $col := .Columns}}
|
||||
{{- if $i}},{{end}}
|
||||
{{template "column_definition" $col}}
|
||||
{{- end}}
|
||||
);
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user