@@ -55,7 +55,8 @@ class Session {
5555  private  _writeConnectionHolder : ConnectionHolder 
5656  private  _open : boolean 
5757  private  _hasTx : boolean 
58-   private  _lastBookmark : Bookmark 
58+   private  _bookmarkIn : Bookmark 
59+   private  _bookmarkOut ?: string 
5960  private  _transactionExecutor : TransactionExecutor 
6061  private  _impersonatedUser ?: string 
6162  private  _onComplete : ( meta : any )  =>  void 
@@ -117,7 +118,7 @@ class Session {
117118    this . _open  =  true 
118119    this . _hasTx  =  false 
119120    this . _impersonatedUser  =  impersonatedUser 
120-     this . _lastBookmark  =  bookmark  ||  Bookmark . empty ( ) 
121+     this . _bookmarkIn  =  bookmark  ||  Bookmark . empty ( ) 
121122    this . _transactionExecutor  =  _createTransactionExecutor ( config ) 
122123    this . _onComplete  =  this . _onCompleteCallback . bind ( this ) 
123124    this . _databaseNameResolved  =  this . _database  !==  '' 
@@ -150,7 +151,7 @@ class Session {
150151    return  this . _run ( validatedQuery ,  params ,  connection  =>  { 
151152      this . _assertSessionIsOpen ( ) 
152153      return  ( connection  as  Connection ) . protocol ( ) . run ( validatedQuery ,  params ,  { 
153-         bookmark : this . _lastBookmark , 
154+         bookmark : this . _bookmarkIn , 
154155        txConfig : autoCommitTxConfig , 
155156        mode : this . _mode , 
156157        database : this . _database , 
@@ -271,7 +272,7 @@ class Session {
271272      reactive : this . _reactive , 
272273      fetchSize : this . _fetchSize 
273274    } ) 
274-     tx . _begin ( this . _lastBookmark ,  txConfig ) 
275+     tx . _begin ( this . _bookmarkIn ,  txConfig ) 
275276    return  tx 
276277  } 
277278
@@ -296,10 +297,10 @@ class Session {
296297  /** 
297298   * Return the bookmark received following the last completed {@link  Transaction}. 
298299   * 
299-    * @return  {string[]  } A reference to a previous transaction. 
300+    * @return  {string | undefined  } A reference to a previous transaction if present . 
300301   */ 
301-   lastBookmark ( ) : string [ ]  { 
302-     return  this . _lastBookmark . values ( ) 
302+   lastBookmark ( ) : string   |   undefined  { 
303+     return  this . _bookmarkOut 
303304  } 
304305
305306  /** 
@@ -360,7 +361,7 @@ class Session {
360361  /** 
361362   * Sets the resolved database name in the session context. 
362363   * @private  
363-    * @param  {string| undefined } database The resolved database name 
364+    * @param  {string |  undefined } database The resolved database name 
364365   * @returns  {void } 
365366   */ 
366367  _onDatabaseNameResolved ( database ?: string ) : void { 
@@ -376,12 +377,13 @@ class Session {
376377  /** 
377378   * Update value of the last bookmark. 
378379   * @private  
379-    * @param  {Bookmark } newBookmark - The new bookmark. 
380+    * @param  {string | undefined } newBookmark - The new bookmark. 
380381   * @returns  {void } 
381382   */ 
382-   _updateBookmark ( newBookmark ?: Bookmark ) : void { 
383-     if  ( newBookmark  &&  ! newBookmark . isEmpty ( ) )  { 
384-       this . _lastBookmark  =  newBookmark 
383+   _updateBookmark ( newBookmark ?: string ) : void { 
384+     if  ( newBookmark  !==  undefined )  { 
385+       this . _bookmarkIn  =  new  Bookmark ( newBookmark ) 
386+       this . _bookmarkOut  =  newBookmark 
385387    } 
386388  } 
387389
@@ -414,8 +416,8 @@ class Session {
414416   * @param  {Object } meta Connection metadatada 
415417   * @returns  {void } 
416418   */ 
417-   _onCompleteCallback ( meta : {  bookmark : string  |   string [ ]   } ) : void { 
418-     this . _updateBookmark ( new   Bookmark ( meta . bookmark ) ) 
419+   _onCompleteCallback ( meta : {  bookmark : string  } ) : void { 
420+     this . _updateBookmark ( meta . bookmark ) 
419421  } 
420422
421423  /** 
0 commit comments