File tree 7 files changed +3
-40
lines changed
bolt-connection/src/connection-provider
bolt-connection/connection-provider 7 files changed +3
-40
lines changed Original file line number Diff line number Diff line change @@ -297,18 +297,6 @@ export default class RoutingConnectionProvider extends PooledConnectionProvider
297
297
} )
298
298
}
299
299
300
- async ensureFreshRoutingTable ( { database, accessMode } ) {
301
- const context = { database : database || DEFAULT_DB_NAME }
302
-
303
- await this . _freshRoutingTable ( {
304
- accessMode,
305
- database : context . database ,
306
- onDatabaseNameResolved : ( databaseName ) => {
307
- context . database = context . database || databaseName
308
- }
309
- } )
310
- }
311
-
312
300
async verifyConnectivityAndGetServerInfo ( { database, accessMode } ) {
313
301
const context = { database : database || DEFAULT_DB_NAME }
314
302
Original file line number Diff line number Diff line change @@ -110,10 +110,6 @@ class ConnectionProvider {
110
110
throw Error ( 'Not implemented' )
111
111
}
112
112
113
- ensureFreshRoutingTable ( param ?: { database ?: string , accessMode ?: string } ) : Promise < void > {
114
- throw Error ( 'Not implemented' )
115
- }
116
-
117
113
/**
118
114
* This method verifies the connectivity of the database by trying to acquire a connection
119
115
* for each server available in the cluster.
Original file line number Diff line number Diff line change @@ -868,9 +868,6 @@ class Driver {
868
868
const sessionMode = Session . _validateSessionMode ( defaultAccessMode )
869
869
const connectionProvider = this . _getOrCreateConnectionProvider ( )
870
870
const homeDatabase = this . homeDatabaseCache . get ( impersonatedUser ?? auth ?. principal ?? '' )
871
- if ( homeDatabase !== undefined && homeDatabase !== '' ) {
872
- void connectionProvider . ensureFreshRoutingTable ( { database : homeDatabase } )
873
- }
874
871
const bookmarks = bookmarkOrBookmarks != null
875
872
? new Bookmarks ( bookmarkOrBookmarks )
876
873
: Bookmarks . empty ( )
Original file line number Diff line number Diff line change @@ -297,18 +297,6 @@ export default class RoutingConnectionProvider extends PooledConnectionProvider
297
297
} )
298
298
}
299
299
300
- async ensureFreshRoutingTable ( { database, accessMode } ) {
301
- const context = { database : database || DEFAULT_DB_NAME }
302
-
303
- await this . _freshRoutingTable ( {
304
- accessMode,
305
- database : context . database ,
306
- onDatabaseNameResolved : ( databaseName ) => {
307
- context . database = context . database || databaseName
308
- }
309
- } )
310
- }
311
-
312
300
async verifyConnectivityAndGetServerInfo ( { database, accessMode } ) {
313
301
const context = { database : database || DEFAULT_DB_NAME }
314
302
Original file line number Diff line number Diff line change @@ -110,10 +110,6 @@ class ConnectionProvider {
110
110
throw Error ( 'Not implemented' )
111
111
}
112
112
113
- ensureFreshRoutingTable ( param ?: { database ?: string , accessMode ?: string } ) : Promise < void > {
114
- throw Error ( 'Not implemented' )
115
- }
116
-
117
113
/**
118
114
* This method verifies the connectivity of the database by trying to acquire a connection
119
115
* for each server available in the cluster.
Original file line number Diff line number Diff line change @@ -868,9 +868,6 @@ class Driver {
868
868
const sessionMode = Session . _validateSessionMode ( defaultAccessMode )
869
869
const connectionProvider = this . _getOrCreateConnectionProvider ( )
870
870
const homeDatabase = this . homeDatabaseCache . get ( impersonatedUser ?? auth ?. principal ?? '' )
871
- if ( homeDatabase !== undefined && homeDatabase !== '' ) {
872
- void connectionProvider . ensureFreshRoutingTable ( { database : homeDatabase } )
873
- }
874
871
const bookmarks = bookmarkOrBookmarks != null
875
872
? new Bookmarks ( bookmarkOrBookmarks )
876
873
: Bookmarks . empty ( )
@@ -880,7 +877,8 @@ class Driver {
880
877
database : database ?? '' ,
881
878
connectionProvider,
882
879
bookmarks,
883
- config : { ...this . _config ,
880
+ config : {
881
+ ...this . _config ,
884
882
homeDatabase
885
883
} ,
886
884
reactive,
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ class ConnectionHolder implements ConnectionHolderInterface {
175
175
private async _createConnectionPromise ( connectionProvider : ConnectionProvider , homeDatabase ?: string ) : Promise < Connection & Releasable | null > {
176
176
return await connectionProvider . acquireConnection ( {
177
177
accessMode : this . _mode ,
178
- database : ( this . _database === "" && homeDatabase !== undefined ) ? homeDatabase : this . _database ,
178
+ database : ( this . _database === '' && homeDatabase !== undefined ) ? homeDatabase : this . _database ,
179
179
bookmarks : await this . _getBookmarks ( ) ,
180
180
impersonatedUser : this . _impersonatedUser ,
181
181
onDatabaseNameResolved : this . _onDatabaseNameResolved ,
You can’t perform that action at this time.
0 commit comments