66} from "../types" ;
77import { Statement } from "../statement" ;
88import { generateUserAgent } from "../common/util" ;
9- import { ConnectionError , CompositeError } from "../common/errors" ;
9+ import { CompositeError } from "../common/errors" ;
1010import JSONbig from "json-bigint" ;
1111
1212const defaultQuerySettings = {
@@ -17,11 +17,6 @@ const defaultResponseSettings = {
1717 normalizeData : false
1818} ;
1919
20- export interface AccountInfo {
21- id : string ;
22- infraVersion : number ;
23- }
24-
2520const updateParametersHeader = "Firebolt-Update-Parameters" ;
2621const allowedUpdateParameters = [ "database" ] ;
2722const updateEndpointHeader = "Firebolt-Update-Endpoint" ;
@@ -34,7 +29,6 @@ export abstract class Connection {
3429 protected options : ConnectionOptions ;
3530 protected userAgent : string ;
3631 protected parameters : Record < string , string > ;
37- protected accountInfo : AccountInfo | undefined ;
3832 engineEndpoint ! : string ;
3933 activeRequests = new Set < { abort : ( ) => void } > ( ) ;
4034
@@ -53,13 +47,6 @@ export abstract class Connection {
5347
5448 abstract resolveEngineEndpoint ( ) : Promise < string > ;
5549
56- abstract resolveAccountInfo ( ) : Promise < AccountInfo > ;
57-
58- async resolveAccountId ( ) {
59- const accInfo = await this . resolveAccountInfo ( ) ;
60- return accInfo . id ;
61- }
62-
6350 protected getRequestUrl ( executeQueryOptions : ExecuteQueryOptions ) : string {
6451 const params = this . getBaseParameters ( executeQueryOptions ) ;
6552
@@ -132,16 +119,6 @@ export abstract class Connection {
132119
133120 private async handleUpdateEndpointHeader ( headerValue : string ) : Promise < void > {
134121 const [ endpoint , newParams ] = this . splitEndpoint ( headerValue ) ;
135-
136- // Validate account_id if present
137- const currentAccountId =
138- this . accountInfo ?. id ?? ( await this . resolveAccountId ( ) ) ;
139- if ( newParams . account_id && currentAccountId !== newParams . account_id ) {
140- throw new ConnectionError ( {
141- message : `Failed to execute USE ENGINE command. Account parameter mismatch. Contact support.`
142- } ) ;
143- }
144-
145122 // Remove url parameters and update engineEndpoint
146123 this . engineEndpoint = endpoint ;
147124 this . parameters = {
0 commit comments