We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6058924 commit 9329dd2Copy full SHA for 9329dd2
src/duckdb.js
@@ -43,7 +43,12 @@ export class DuckDBClient {
43
const connection = await this._db.connect();
44
let reader, batch;
45
try {
46
- reader = await connection.send(query, params);
+ if (params?.length > 0) {
47
+ const statement = await connection.prepare(query);
48
+ reader = await statement.send(...params);
49
+ } else {
50
+ reader = await connection.send(query);
51
+ }
52
batch = await reader.next();
53
if (batch.done) throw new Error("missing first batch");
54
} catch (error) {
0 commit comments