Skip to content

Commit b514a6b

Browse files
authored
refactor: don't use firstValueFrom if using toArray (#6)
Closes #5
1 parent 5c30926 commit b514a6b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { FlightSqlClient } from "./flightsql";
33
import { arrow as fsql } from "./generated/flightsql";
44
import { RecordBatch } from "apache-arrow";
55
import { pipe, toArray } from "iter-ops";
6-
import { firstValueFrom } from "./async_util";
76

87
/**
98
* Options for creating a new client.
@@ -78,7 +77,7 @@ export class QueryResult {
7877
* @returns an array of Arrow record batches
7978
*/
8079
public async collectToArrow(): Promise<RecordBatch[]> {
81-
const batches = await firstValueFrom(pipe(this.raw, toArray()));
80+
const batches = await pipe(this.raw, toArray()).first;
8281
return batches ?? [];
8382
}
8483

0 commit comments

Comments
 (0)