Skip to content

Commit 9e32723

Browse files
committed
queryFileColumns(): don't pass path to CSV via parameter 🐛
This works around a crash I couldn't make sense of.
1 parent acf9be6 commit 9e32723

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/columns.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ const queryFileColumns = async (db, pathToFile) => {
1010
DESCRIBE (
1111
SELECT *
1212
FROM read_csv(
13-
$1,
13+
-- Using a parameter would be the proper & safer approach here, but it crashes DuckDB as of v1.3.2.
14+
-- $1,
15+
'${pathToFile}',
1416
header = true
1517
)
1618
LIMIT 1
1719
)
1820
`,
19-
[pathToFile],
21+
// [pathToFile],
2022
)
2123
return columns
2224
}

0 commit comments

Comments
 (0)