generated comment

This commit is contained in:
Wolfgang Hottgenroth 2021-08-28 21:12:08 +02:00
parent a63076c07c
commit 95fbafb217
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F
4 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,8 @@
# THIS FILE HAS BEEN GENERATED
# DO NOT EDIT MANUALLY
from db import dbGetMany, dbGetOne
def get_accounts(user, token_info):

View File

@ -1,3 +1,5 @@
$GENERATED_PYTHON_COMMENT
from db import dbGetMany, dbGetOne
#for $table in $tables

View File

@ -42,6 +42,15 @@ for table in schema["tables"]:
column["jstype"] = 'number'
table["selectors"] = [ y["name"] for y in sorted([ x for x in columns if "selector" in x ], key=lambda x: x["selector"])]
schema["GENERATED_SQL_COMMENT"] = """
-- THIS FILE HAS BEEN GENERATED
-- DO NOT EDIT MANUALLY
"""
schema["GENERATED_PYTHON_COMMENT"] = """
# THIS FILE HAS BEEN GENERATED
# DO NOT EDIT MANUALLY
"""
for f in glob.glob(args.template):
print(f"process {f}")
tmpl = Template(file=f, searchList=[schema])

View File

@ -1,3 +1,5 @@
$GENERATED_SQL_COMMENT
#for $table in $tables
CREATE TABLE ${table.name}_t (
id serial not null primary key