@@ -148,7 +148,7 @@ describe('42. dataTypeRaw.js', function() {
148
148
} )
149
149
} )
150
150
151
- describe ( '42.3 DML Returning' , function ( ) {
151
+ describe ( '42.3 DML Returning - Currently not support RAW ' , function ( ) {
152
152
153
153
before ( 'create table' , function ( done ) {
154
154
assist . createTable ( connection , tableName , done ) ;
@@ -176,12 +176,13 @@ describe('42. dataTypeRaw.js', function() {
176
176
n : seq ,
177
177
c : { type : oracledb . BUFFER , val : bindValue , dir : oracledb . BIND_IN } ,
178
178
rid : { type : oracledb . NUMBER , dir : oracledb . BIND_OUT } ,
179
- rc : { type : oracledb . STRING , dir : oracledb . BIND_OUT , maxSize : 2000 }
179
+ rc : { type : oracledb . BUFFER , dir : oracledb . BIND_OUT , maxSize : 2000 }
180
180
} ,
181
181
{ autoCommit : true } ,
182
182
function ( err , result ) {
183
- should . not . exist ( err ) ;
184
- // console.log(result);
183
+ should . exist ( err ) ;
184
+ ( err . message ) . should . startWith ( 'NJS-028' ) ;
185
+ // NJS-028: raw database type is not supported with DML Returning statements
185
186
// (result.outBinds.rc[0].toString('hex')).should.eql(bindValue.toString('hex'));
186
187
// (result.outBinds.rc[0].length).should.be.exactly(size);
187
188
done ( ) ;
@@ -200,11 +201,12 @@ describe('42. dataTypeRaw.js', function() {
200
201
seq ,
201
202
{ type : oracledb . BUFFER , val : bindValue , dir : oracledb . BIND_IN } ,
202
203
{ type : oracledb . NUMBER , dir : oracledb . BIND_OUT } ,
203
- { type : oracledb . STRING , dir : oracledb . BIND_OUT , maxSize : 2000 }
204
+ { type : oracledb . BUFFER , dir : oracledb . BIND_OUT , maxSize : 2000 }
204
205
] ,
205
206
{ autoCommit : true } ,
206
207
function ( err , result ) {
207
- should . not . exist ( err ) ;
208
+ should . exist ( err ) ;
209
+ ( err . message ) . should . startWith ( 'NJS-028' ) ;
208
210
// console.log(result);
209
211
// (result.outBinds.rc[0].toString('hex')).should.eql(bindValue.toString('hex'));
210
212
// (result.outBinds.rc[0].length).should.be.exactly(size);
@@ -224,11 +226,12 @@ describe('42. dataTypeRaw.js', function() {
224
226
n : seq ,
225
227
c : { type : oracledb . BUFFER , val : bindValue , dir : oracledb . BIND_IN } ,
226
228
rid : { type : oracledb . NUMBER , dir : oracledb . BIND_OUT } ,
227
- rc : { type : oracledb . STRING , dir : oracledb . BIND_OUT , maxSize : size * 2 } // should be size
229
+ rc : { type : oracledb . BUFFER , dir : oracledb . BIND_OUT , maxSize : size * 2 } // should be size
228
230
} ,
229
231
{ autoCommit : true } ,
230
232
function ( err , result ) {
231
- should . not . exist ( err ) ;
233
+ should . exist ( err ) ;
234
+ ( err . message ) . should . startWith ( 'NJS-028' ) ;
232
235
// console.log(result);
233
236
// (result.outBinds.rc[0].toString('hex')).should.eql(bindValue.toString('hex'));
234
237
// (result.outBinds.rc[0].length).should.be.exactly(size);
@@ -249,11 +252,12 @@ describe('42. dataTypeRaw.js', function() {
249
252
n : seq ,
250
253
c : { type : oracledb . BUFFER , val : bindValue , dir : oracledb . BIND_IN } ,
251
254
rid : { type : oracledb . NUMBER , dir : oracledb . BIND_OUT } ,
252
- rc : { type : oracledb . STRING , dir : oracledb . BIND_OUT , maxSize : 2000 }
255
+ rc : { type : oracledb . BUFFER , dir : oracledb . BIND_OUT , maxSize : 2000 }
253
256
} ,
254
257
{ autoCommit : true } ,
255
258
function ( err , result ) {
256
- should . not . exist ( err ) ;
259
+ should . exist ( err ) ;
260
+ ( err . message ) . should . startWith ( 'NJS-028' ) ;
257
261
// console.log(result);
258
262
// (result.outBinds.rc[0].toString('hex')).should.eql(bindValue.toString('hex'));
259
263
// (result.outBinds.rc[0].length).should.be.exactly(size);
@@ -271,11 +275,12 @@ describe('42. dataTypeRaw.js', function() {
271
275
[
272
276
seq ,
273
277
{ type : oracledb . NUMBER , dir : oracledb . BIND_OUT } ,
274
- { type : oracledb . STRING , dir : oracledb . BIND_OUT , maxSize : 2000 }
278
+ { type : oracledb . BUFFER , dir : oracledb . BIND_OUT , maxSize : 2000 }
275
279
] ,
276
280
{ autoCommit : true } ,
277
281
function ( err , result ) {
278
- should . not . exist ( err ) ;
282
+ should . exist ( err ) ;
283
+ ( err . message ) . should . startWith ( 'NJS-028' ) ;
279
284
// console.log(result);
280
285
// (result.outBinds.rc[0].toString('hex')).should.eql(bindValue.toString('hex'));
281
286
// (result.outBinds.rc[0].length).should.be.exactly(size);
@@ -293,11 +298,12 @@ describe('42. dataTypeRaw.js', function() {
293
298
{
294
299
n : seq ,
295
300
rid : { type : oracledb . NUMBER , dir : oracledb . BIND_OUT } ,
296
- rc : { type : oracledb . STRING , dir : oracledb . BIND_OUT , maxSize : 2000 }
301
+ rc : { type : oracledb . BUFFER , dir : oracledb . BIND_OUT , maxSize : 2000 }
297
302
} ,
298
303
{ autoCommit : true } ,
299
304
function ( err , result ) {
300
- should . not . exist ( err ) ;
305
+ should . exist ( err ) ;
306
+ ( err . message ) . should . startWith ( 'NJS-028' ) ;
301
307
// console.log(result);
302
308
// (result.outBinds.rc[0].toString('hex')).should.eql(bindValue.toString('hex'));
303
309
// (result.outBinds.rc[0].length).should.be.exactly(size);
@@ -416,4 +422,4 @@ describe('42. dataTypeRaw.js', function() {
416
422
} )
417
423
} ) // 42.4
418
424
419
- } )
425
+ } )
0 commit comments