@@ -869,10 +869,15 @@ class Connection extends EventEmitter {
869869 let binds = [ ] ;
870870 let options = { } ;
871871
872+ errors . assert ( this . _impl , errors . ERR_INVALID_CONNECTION ) ;
873+
872874 // process arguments
873875 if ( nodbUtil . isObject ( sql ) && typeof sql . statement === 'string' ) {
874876 errors . assertArgCount ( arguments , 1 , 2 ) ;
875877 if ( sql . values ) {
878+ if ( this . _impl . _callLevelTraceData ) {
879+ this . _impl . _callLevelTraceData . values = sql . values ;
880+ }
876881 binds = await this . _processExecuteBinds ( sql . values ) ;
877882 }
878883 sql = sql . statement ;
@@ -883,18 +888,23 @@ class Connection extends EventEmitter {
883888 errors . assertArgCount ( arguments , 1 , 3 ) ;
884889 errors . assertParamValue ( typeof sql === 'string' , 1 ) ;
885890 if ( arguments . length >= 2 ) {
891+ if ( this . _impl . _callLevelTraceData ) {
892+ this . _impl . _callLevelTraceData . values = a2 ;
893+ }
886894 binds = await this . _processExecuteBinds ( a2 ) ;
887895 }
888896 if ( arguments . length == 3 ) {
889897 options = this . _verifyExecOpts ( a3 , false ) ;
890898 }
891899 }
892900 this . _addDefaultsToExecOpts ( options ) ;
893- errors . assert ( this . _impl , errors . ERR_INVALID_CONNECTION ) ;
894901
895902 // perform actual execute
896903 let result ;
897904 try {
905+ if ( this . _impl . _callLevelTraceData ) {
906+ this . _impl . _callLevelTraceData . statement = sql ;
907+ }
898908 result = await this . _impl . execute ( sql , numIters , binds , options , false ) ;
899909 } catch ( err ) {
900910 if ( err . errorNum === 1406 )
@@ -1035,6 +1045,63 @@ class Connection extends EventEmitter {
10351045 return this . _impl && this . _impl . getDbName ( ) ;
10361046 }
10371047
1048+ //---------------------------------------------------------------------------
1049+ // hostName (READONLY)
1050+ //
1051+ // Property for identifying the hostName of the Oracle Database.
1052+ //---------------------------------------------------------------------------
1053+ get hostName ( ) {
1054+ return this . _impl && this . _impl . getHostName ( ) ;
1055+ }
1056+
1057+ //---------------------------------------------------------------------------
1058+ // port (READONLY)
1059+ //
1060+ // Property for identifying the port to which client is connected.
1061+ //---------------------------------------------------------------------------
1062+ get port ( ) {
1063+ return this . _impl && this . _impl . getPort ( ) ;
1064+ }
1065+
1066+ //---------------------------------------------------------------------------
1067+ // protocol (READONLY)
1068+ //
1069+ // Property for identifying the protocol used to connect to Oracle Database.
1070+ //---------------------------------------------------------------------------
1071+ get protocol ( ) {
1072+ return this . _impl && this . _impl . getProtocol ( ) ;
1073+ }
1074+
1075+ //---------------------------------------------------------------------------
1076+ // connectString (READONLY)
1077+ //
1078+ // User provided connectString to connect to Oracle Database.
1079+ //---------------------------------------------------------------------------
1080+ get connectString ( ) {
1081+ return this . _impl && this . _impl . _connectString ;
1082+ }
1083+
1084+ //---------------------------------------------------------------------------
1085+ // user
1086+ //
1087+ // User property provided to connect to Oracle Database.
1088+ //---------------------------------------------------------------------------
1089+ get user ( ) {
1090+ if ( this . currentSchema . length ) {
1091+ return this . currentSchema ;
1092+ }
1093+ return this . _impl && this . _impl . _user ;
1094+ }
1095+
1096+ //---------------------------------------------------------------------------
1097+ // connectTraceConfig
1098+ //
1099+ // Property for getting the connection related config.
1100+ //---------------------------------------------------------------------------
1101+ get connectTraceConfig ( ) {
1102+ return this . _impl && this . _impl . _getConnectTraceConfig ( ) ;
1103+ }
1104+
10381105 //---------------------------------------------------------------------------
10391106 // getDbObjectClass()
10401107 //
0 commit comments