File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,15 @@ export abstract class Connection {
8181 const strSettings = Object . entries ( settings ?? { } ) . reduce <
8282 Record < string , string >
8383 > ( ( acc , [ key , value ] ) => {
84- if ( value !== undefined ) {
84+ if ( key === "internal" ) {
85+ // Unwrap internal settings from array
86+ const internalSettings = value as Record < string , string | number > [ ] ;
87+ internalSettings . forEach ( setting => {
88+ Object . entries ( setting ) . forEach ( ( [ internalKey , internalValue ] ) => {
89+ acc [ internalKey ] = internalValue . toString ( ) ;
90+ } ) ;
91+ } ) ;
92+ } else if ( value !== undefined ) {
8593 acc [ key ] = value . toString ( ) ;
8694 }
8795 return acc ;
Original file line number Diff line number Diff line change 11import { makeConnection } from "../connection" ;
22import { Authenticator } from "../auth" ;
3- import {
4- Context ,
5- ConnectionOptions ,
6- FireboltClientOptions ,
7- SettingValues
8- } from "../types" ;
3+ import { Context , ConnectionOptions , FireboltClientOptions } from "../types" ;
94import { ResourceManager } from "../service" ;
105
116export class FireboltCore {
@@ -38,7 +33,7 @@ export class FireboltCore {
3833 await connection . resolveEngineEndpoint ( ) ;
3934 // auto_start_stop_control is only available for v2
4035 const settings = auth . isServiceAccount ( )
41- ? { auto_start_stop_control : SettingValues . IGNORE }
36+ ? { internal : [ { auto_start_stop_control : "ignore" } ] }
4237 : { } ;
4338 await connection . execute ( "select 1" , { settings } ) ;
4439 }
Original file line number Diff line number Diff line change @@ -29,16 +29,12 @@ export enum OutputFormat {
2929 JSON = "JSON"
3030}
3131
32- export enum SettingValues {
33- IGNORE = "ignore"
34- }
35-
3632export type QuerySettings = Record <
3733 string ,
38- string | number | boolean | undefined
34+ string | number | boolean | undefined | Record < string , string | number > [ ]
3935> & {
4036 output_format ?: OutputFormat ;
41- auto_start_stop_control ?: SettingValues ;
37+ internal ?: Record < string , string | number > [ ] ;
4238} ;
4339
4440export type RowParser = ( row : string , isLastRow : boolean ) => any ;
You can’t perform that action at this time.
0 commit comments