comment
This commit is contained in:
@ -1,9 +1,3 @@
|
|||||||
-- -----------------------------------------------------
|
|
||||||
-- THIS IS GENERATED CODE, DO NOT EDIT MANUALLY!
|
|
||||||
-- ALL CHANGES WILL BE LOST AFTER THE NEXT RUN
|
|
||||||
-- OF generate.py
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
|
|
||||||
#for $table in $tables
|
#for $table in $tables
|
||||||
CREATE TABLE ${table.name}_t (
|
CREATE TABLE ${table.name}_t (
|
||||||
id serial not null primary key
|
id serial not null primary key
|
||||||
|
@ -6,6 +6,7 @@ with open("schema.json") as schemaFile:
|
|||||||
schema = json.load(schemaFile)
|
schema = json.load(schemaFile)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for table in schema["tables"]:
|
for table in schema["tables"]:
|
||||||
for column in table["columns"]:
|
for column in table["columns"]:
|
||||||
if column["sqltype"] == 'serial':
|
if column["sqltype"] == 'serial':
|
||||||
@ -31,6 +32,7 @@ for table in schema["tables"]:
|
|||||||
|
|
||||||
|
|
||||||
for f in glob.glob("*.tmpl"):
|
for f in glob.glob("*.tmpl"):
|
||||||
|
print(f"process {f}")
|
||||||
tmpl = Template(file=f, searchList=[schema])
|
tmpl = Template(file=f, searchList=[schema])
|
||||||
with open(f[:-5], 'w') as outFile:
|
with open(f[:-5], 'w') as outFile:
|
||||||
outFile.write(str(tmpl))
|
outFile.write(str(tmpl))
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
#####################################################
|
|
||||||
### THIS IS GENERATED CODE, DO NOT EDIT MANUALLY! ###
|
|
||||||
### ALL CHANGES WILL BE LOST AFTER THE NEXT RUN ###
|
|
||||||
### OF generate.py ###
|
|
||||||
#####################################################
|
|
||||||
|
|
||||||
|
|
||||||
from db import dbGetMany, dbGetOne
|
from db import dbGetMany, dbGetOne
|
||||||
|
|
||||||
#for $table in $tables
|
#for $table in $tables
|
||||||
|
@ -1,11 +1,3 @@
|
|||||||
#####################################################
|
|
||||||
### THIS IS GENERATED CODE, DO NOT EDIT MANUALLY! ###
|
|
||||||
### ALL CHANGES WILL BE LOST AFTER THE NEXT RUN ###
|
|
||||||
### OF generate.py ###
|
|
||||||
#####################################################
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
openapi: 3.0.0
|
openapi: 3.0.0
|
||||||
info:
|
info:
|
||||||
title: hv2-api
|
title: hv2-api
|
||||||
|
Reference in New Issue
Block a user