Allow column names to be reserved words

This commit is contained in:
Simon Willison 2019-01-24 19:01:10 -08:00
commit 228d595f7d
2 changed files with 5 additions and 1 deletions

View file

@ -318,7 +318,7 @@ class Table:
""".format(
upsert="OR REPLACE" if upsert else "",
table=self.name,
columns=", ".join(all_columns),
columns=", ".join("[{}]".format(c) for c in all_columns),
rows=", ".join(
"""
({placeholders})