fix: table cols in double quotes

master
phga 3 years ago
parent 86282b1ab7
commit 7505b0a990

@ -53,11 +53,11 @@ with open(out_file_path, "w") as of:
vals = ""
for i in range(len(indices)):
if i != 0:
cols += f", {indices[i]}"
vals += f", {wrap_types(values[i])}"
cols += f', "{indices[i]}"'
vals += f', {wrap_types(values[i])}'
else:
cols += f"{indices[i]}"
vals += f"{wrap_types(values[i])}"
cols += f'"{indices[i]}"'
vals += f'{wrap_types(values[i])}'
# INSERT INTO $DB.$TABLE ($COL1, $COL2, ...) VALUES ($VAL1, $VAL2, ...)
of.write(f'INSERT INTO {db_table} ({cols}) VALUES ({vals})\n')
count += 1

Loading…
Cancel
Save