mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-12 11:34:09 +02:00
Views should be double quoted too
This commit is contained in:
parent
69888ee07c
commit
98dd284f6b
3 changed files with 20 additions and 13 deletions
|
|
@ -1177,7 +1177,9 @@ class Database:
|
|||
assert not (
|
||||
ignore and replace
|
||||
), "Use one or the other of ignore/replace, not both"
|
||||
create_sql = "CREATE VIEW {name} AS {sql}".format(name=name, sql=sql)
|
||||
create_sql = "CREATE VIEW {name} AS {sql}".format(
|
||||
name=quote_identifier(name), sql=sql
|
||||
)
|
||||
if ignore or replace:
|
||||
# Does view exist already?
|
||||
if name in self.view_names():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue