Double quote around column names

This means filters still work even with column names that contain spaces
magic-columns
Simon Willison 2017-10-25 07:47:20 -07:00
rodzic e55bc3b2fa
commit d94d4465d7
1 zmienionych plików z 1 dodań i 1 usunięć

2
app.py
Wyświetl plik

@ -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(