This commit is contained in:
Wolfgang Hottgenroth 2021-07-07 13:34:44 +02:00
parent 81b900374e
commit e80739d7fc
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F
5 changed files with 2 additions and 21 deletions

View File

View File

@ -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
CREATE TABLE ${table.name}_t (
id serial not null primary key

View File

@ -6,6 +6,7 @@ with open("schema.json") as schemaFile:
schema = json.load(schemaFile)
for table in schema["tables"]:
for column in table["columns"]:
if column["sqltype"] == 'serial':
@ -31,6 +32,7 @@ for table in schema["tables"]:
for f in glob.glob("*.tmpl"):
print(f"process {f}")
tmpl = Template(file=f, searchList=[schema])
with open(f[:-5], 'w') as outFile:
outFile.write(str(tmpl))

View File

@ -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
#for $table in $tables

View File

@ -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
info:
title: hv2-api