Skip to content

Commit d0cc5a9

Browse files
committed
enable cloud fetch by default and add useLZ4Compression option to session parameters
1 parent 6d6dd8b commit d0cc5a9

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

lib/DBSQLClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default class DBSQLClient extends EventEmitter implements IDBSQLClient, I
8888
retryDelayMin: 1 * 1000, // 1 second
8989
retryDelayMax: 60 * 1000, // 60 seconds (1 minute)
9090

91-
useCloudFetch: false,
91+
useCloudFetch: true, // enabling cloud fetch by default.
9292
cloudFetchConcurrentDownloads: 10,
9393

9494
useLZ4Compression: true,

lib/DBSQLSession.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export default class DBSQLSession implements IDBSQLSession {
202202
...getArrowOptions(clientConfig),
203203
canDownloadResult: options.useCloudFetch ?? clientConfig.useCloudFetch,
204204
parameters: getQueryParameters(options.namedParameters, options.ordinalParameters),
205-
canDecompressLZ4Result: clientConfig.useLZ4Compression && Boolean(LZ4),
205+
canDecompressLZ4Result: (options.useLZ4Compression ?? clientConfig.useLZ4Compression) && Boolean(LZ4),
206206
});
207207
const response = await this.handleResponse(operationPromise);
208208
const operation = this.createOperation(response);

lib/contracts/IDBSQLSession.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export type ExecuteStatementOptions = {
1717
runAsync?: boolean;
1818
maxRows?: number | bigint | Int64 | null;
1919
useCloudFetch?: boolean;
20+
useLZ4Compression?: boolean;
2021
stagingAllowedLocalPath?: string | string[];
2122
namedParameters?: Record<string, DBSQLParameter | DBSQLParameterValue>;
2223
ordinalParameters?: Array<DBSQLParameter | DBSQLParameterValue>;

0 commit comments

Comments
 (0)