File tree 6 files changed +28
-15
lines changed
lib/thin/protocol/messages
6 files changed +28
-15
lines changed Original file line number Diff line number Diff line change @@ -853,18 +853,17 @@ Each of the configuration properties is described below.
853
853
854
854
See :ref: `Edition-Based Redefinition <ebr >` for more information.
855
855
856
- .. note ::
857
-
858
- This property can only be used in the node-oracledb Thick mode. See
859
- :ref: `enablingthick `.
860
-
861
856
**Example **
862
857
863
858
.. code-block :: javascript
864
859
865
860
const oracledb = require (' oracledb' );
866
861
oracledb .edition = ' ed_2' ;
867
862
863
+ .. versionchanged :: 6.8
864
+
865
+ Support for this property was added in node-oracledb Thin mode.
866
+
868
867
.. attribute :: oracledb.errorOnConcurrentExecute
869
868
870
869
.. versionadded :: 5.2
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ Common Changes
20
20
Thin Mode Changes
21
21
+++++++++++++++++
22
22
23
+ #) Added support for setting the :attr: `~oracledb.edition ` when connecting to
24
+ the database.
25
+
23
26
#) Fixed error message in ``NJS-131 `` to provide the correct range of the
24
27
database object collection types.
25
28
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ node-oracledb Thin and Thick modes. For more details see :ref:`modediff`.
153
153
- Yes - Out-of-Band (OOB) Connection Breaks not supported
154
154
- Yes
155
155
* - Edition Based Redefinition (EBR) (see :ref: `ebr `)
156
- - No
156
+ - Yes
157
157
- Yes
158
158
* - SQL execution (see :ref: `sqlexecution `)
159
159
- Yes
Original file line number Diff line number Diff line change @@ -213,15 +213,15 @@ updated and tested while production users are still accessing the
213
213
original version. Once every user has begun using the objects in the new
214
214
edition, the old objects can be dropped.
215
215
216
- .. note ::
217
-
218
- In this release, Edition-Based Redefinition is only supported in the
219
- node-oracledb Thick mode. See :ref: `enablingthick `.
220
-
221
216
To choose the edition, node-oracledb applications can set
222
217
:attr: `oracledb.edition ` globally, or specify a value
223
218
when :ref: `creating a pool <createpoolpoolattrsedition >` or a
224
- :ref: `standalone connection <getconnectiondbattrsedition >`.
219
+ :ref: `standalone connection <getconnectiondbattrsedition >`. You can also set
220
+ the edition by using the ``ORA_EDITION `` environment variable. The edition
221
+ value set as part of the connection parameters in
222
+ :meth: `oracledb.createPool() ` or :meth: `oracledb.getConnection() ` takes
223
+ precedence over the values specified in the :attr: `oracledb.edition ` property
224
+ or the ``ORA_EDITION `` environment variable.
225
225
226
226
The example below shows how a PL/SQL function ``DISCOUNT `` can be
227
227
created with two different implementations. The initial procedure is
Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ class AuthMessage extends Message {
107
107
this . osUser = config . osUser ;
108
108
this . program = config . program ;
109
109
this . terminal = config . terminal ;
110
+ if ( config . edition ) {
111
+ this . edition = config . edition ;
112
+ } else if ( process . env . ORA_EDITION ) {
113
+ this . edition = process . env . ORA_EDITION ;
114
+ }
110
115
this . setAuthMode ( config ) ;
111
116
}
112
117
@@ -235,6 +240,9 @@ class AuthMessage extends Message {
235
240
this . encryptedJDWPData = ED . getEncryptedJSWPData ( this . sessionKey , this . conn . jdwpData ) ;
236
241
numPairs += 1 ;
237
242
}
243
+ if ( this . edition ) {
244
+ numPairs += 1 ;
245
+ }
238
246
if ( this . schemaUser . length !== 0 ) {
239
247
numPairs += 1 ;
240
248
}
@@ -297,6 +305,9 @@ class AuthMessage extends Message {
297
305
if ( this . conn . jdwpData ) {
298
306
buf . writeKeyValue ( "AUTH_ORA_DEBUG_JDWP" , this . encryptedJDWPData ) ;
299
307
}
308
+ if ( this . edition ) {
309
+ buf . writeKeyValue ( "AUTH_ORA_EDITION" , this . edition ) ;
310
+ }
300
311
301
312
}
302
313
}
Original file line number Diff line number Diff line change @@ -65,11 +65,11 @@ describe('160. editionTest.js', function() {
65
65
66
66
before ( async function ( ) {
67
67
68
- let isRunnable = Boolean ( ! oracledb . thin && dbConfig . test . DBA_PRIVILEGE
69
- && ! dbConfig . test . drcp && ! ( await testsUtil . cmanTdmCheck ( ) ) ) ;
68
+ let isRunnable = dbConfig . test . DBA_PRIVILEGE && ! dbConfig . test . drcp
69
+ && ! ( await testsUtil . cmanTdmCheck ( ) ) ;
70
70
if ( isRunnable ) {
71
71
const connection = await oracledb . getConnection ( dbConfig ) ;
72
- if ( connection . oracleServerVersion < 1202000100 ) {
72
+ if ( connection . oracleServerVersion < 1201000200 ) {
73
73
isRunnable = false ;
74
74
}
75
75
await connection . close ( ) ;
You can’t perform that action at this time.
0 commit comments