aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/generate-sql-header.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-11 18:09:02 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-11 18:09:02 +0200
commit60082c69f13715ac0e2f75c5e99578595dbfb7b9 (patch)
treebad13da819f7aaf03f3d8d679d30fd1022d64b32 /src/generate-sql-header.py
parenttest: more compact CI scripts (diff)
downloadcimple-60082c69f13715ac0e2f75c5e99578595dbfb7b9.tar.gz
cimple-60082c69f13715ac0e2f75c5e99578595dbfb7b9.zip
sqlite: rename SQL schema variables
Diffstat (limited to 'src/generate-sql-header.py')
-rwxr-xr-xsrc/generate-sql-header.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/generate-sql-header.py b/src/generate-sql-header.py
index 78f0517..52699c6 100755
--- a/src/generate-sql-header.py
+++ b/src/generate-sql-header.py
@@ -42,11 +42,11 @@ class Generator:
@property
def var_name_prefix(self):
- return f'sql_{self.name}'
+ return f'{self.name}'
def sql_file_to_var_name(self, path):
name = os.path.splitext(os.path.basename(path))[0]
- return f'{self.var_name_prefix}_{name}'
+ return f'{self.var_name_prefix}_schema_{name}'
@staticmethod
def sql_file_to_string_literal(path):
@@ -64,7 +64,7 @@ class Generator:
value = self.sql_file_to_string_literal(path)
self.write(f'static const char *const {name} = "{value}";')
self.write('')
- self.write(f'static const char *const {self.var_name_prefix}_files[] = {{')
+ self.write(f'static const char *const {self.var_name_prefix}_schemas[] = {{')
for var in vars:
self.write(f'\t{var},')
self.write('};')