@@ -27,7 +27,7 @@ import RoutingUtil from './routing-util'
2727const UNAUTHORIZED_ERROR_CODE = 'Neo.ClientError.Security.Unauthorized'
2828
2929class ConnectionProvider {
30- acquireConnection ( mode ) {
30+ acquireConnection ( accessMode , db ) {
3131 throw new Error ( 'Abstract function' )
3232 }
3333
@@ -50,7 +50,7 @@ export class DirectConnectionProvider extends ConnectionProvider {
5050 this . _driverOnErrorCallback = driverOnErrorCallback
5151 }
5252
53- acquireConnection ( mode ) {
53+ acquireConnection ( accessMode , db ) {
5454 const connectionPromise = this . _connectionPool . acquire ( this . _hostPort )
5555 return this . _withAdditionalOnErrorCallback (
5656 connectionPromise ,
@@ -81,7 +81,7 @@ export class LoadBalancer extends ConnectionProvider {
8181 this . _useSeedRouter = false
8282 }
8383
84- acquireConnection ( accessMode ) {
84+ acquireConnection ( accessMode , db ) {
8585 const connectionPromise = this . _freshRoutingTable ( accessMode ) . then (
8686 routingTable => {
8787 if ( accessMode === READ ) {
@@ -282,7 +282,7 @@ export class LoadBalancer extends ConnectionProvider {
282282 . acquire ( routerAddress )
283283 . then ( connection => {
284284 const connectionProvider = new SingleConnectionProvider ( connection )
285- return new Session ( READ , connectionProvider )
285+ return new Session ( { mode : READ , connectionProvider } )
286286 } )
287287 . catch ( error => {
288288 // unable to acquire connection towards the given router
@@ -340,7 +340,7 @@ export class SingleConnectionProvider extends ConnectionProvider {
340340 this . _connection = connection
341341 }
342342
343- acquireConnection ( mode ) {
343+ acquireConnection ( mode , db ) {
344344 const connection = this . _connection
345345 this . _connection = null
346346 return Promise . resolve ( connection )
0 commit comments