mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-26 02:44:33 +02:00
fix: quote convert dry-run identifiers
This commit is contained in:
parent
8f0c06e188
commit
10a6e82f9a
2 changed files with 24 additions and 5 deletions
|
|
@ -3088,12 +3088,12 @@ def convert(
|
|||
db.conn.create_function("preview_transform", 1, preview)
|
||||
sql = """
|
||||
select
|
||||
[{column}] as value,
|
||||
preview_transform([{column}]) as preview
|
||||
from [{table}]{where} limit 10
|
||||
{column} as value,
|
||||
preview_transform({column}) as preview
|
||||
from {table}{where} limit 10
|
||||
""".format(
|
||||
column=columns[0],
|
||||
table=table,
|
||||
column=quote_identifier(columns[0]),
|
||||
table=quote_identifier(table),
|
||||
where=" where {}".format(where) if where is not None else "",
|
||||
)
|
||||
for row in db.conn.execute(sql, where_args).fetchall():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue