Skip to content

Commit ebd81f3

Browse files
committed
chore: pass data as dict?
1 parent b4c6861 commit ebd81f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

duckdb_engine/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ def get_view_names(
223223
include: Optional[Any] = None,
224224
**kw: Any,
225225
) -> Any:
226-
s = "SELECT table_name FROM information_schema.tables WHERE table_type='VIEW' and table_schema=?"
227-
rs = connection.execute(text(s), schema if schema is not None else "main")
226+
s = "SELECT table_name FROM information_schema.tables WHERE table_type='VIEW' and table_schema=:schema_name"
227+
rs = connection.execute(
228+
text(s), {"schema_name": schema if schema is not None else "main"}
229+
)
228230

229231
return [row[0] for row in rs]
230232

0 commit comments

Comments
 (0)