We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0fef0c commit 6bf7aeaCopy full SHA for 6bf7aea
src/duckdb.mjs
@@ -84,8 +84,14 @@ export class DuckDBClient {
84
}
85
86
async queryRow(query, params) {
87
- const results = await this.query(query, params);
88
- return results.length ? results[0] : null;
+ const result = await this.queryStream(query, params);
+ const reader = result.readRows();
89
+ try {
90
+ const {done, value} = await reader.next();
91
+ return done || !value.length ? null : value[0];
92
+ } finally {
93
+ await reader.return();
94
+ }
95
96
97
async sql(strings, ...args) {
0 commit comments