Skip to content

Commit 6f6c256

Browse files
authored
Merge pull request #354 from duckdb/jray/fix-missing-awaits
fix missing awaits
2 parents d65bcf1 + 021eb8c commit 6f6c256

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/src/DuckDBConnection.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export class DuckDBConnection {
165165
types?: DuckDBType[] | Record<string, DuckDBType | undefined>
166166
): Promise<DuckDBResultReader> {
167167
const reader = await this.startThenRead(sql, values, types);
168-
reader.readAll();
168+
await reader.readAll();
169169
return reader;
170170
}
171171
public async startThenReadUntil(
@@ -175,7 +175,7 @@ export class DuckDBConnection {
175175
types?: DuckDBType[] | Record<string, DuckDBType | undefined>
176176
): Promise<DuckDBResultReader> {
177177
const reader = await this.startThenRead(sql, values, types);
178-
reader.readUntil(targetRowCount);
178+
await reader.readUntil(targetRowCount);
179179
return reader;
180180
}
181181
public async startStream(
@@ -208,7 +208,7 @@ export class DuckDBConnection {
208208
types?: DuckDBType[] | Record<string, DuckDBType | undefined>
209209
): Promise<DuckDBResultReader> {
210210
const reader = await this.startStreamThenRead(sql, values, types);
211-
reader.readAll();
211+
await reader.readAll();
212212
return reader;
213213
}
214214
public async startStreamThenReadUntil(
@@ -218,7 +218,7 @@ export class DuckDBConnection {
218218
types?: DuckDBType[] | Record<string, DuckDBType | undefined>
219219
): Promise<DuckDBResultReader> {
220220
const reader = await this.startStreamThenRead(sql, values, types);
221-
reader.readUntil(targetRowCount);
221+
await reader.readUntil(targetRowCount);
222222
return reader;
223223
}
224224
public async prepare(sql: string): Promise<DuckDBPreparedStatement> {

0 commit comments

Comments
 (0)