Double quote around column names

This means filters still work even with column names that contain spaces
This commit is contained in:
Simon Willison 2017-10-25 07:47:20 -07:00
commit d94d4465d7

2
app.py
View file

@ -225,7 +225,7 @@ class RowView(BaseView):
pk_values = compound_pks_from_path(pk_path)
pks = pks_for_table(conn, table)
wheres = [
'{}=?'.format(pk)
'"{}"=?'.format(pk)
for pk in pks
]
sql = 'select * from "{}" where {}'.format(