File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ describe('6. dmlReturning.js', function(){
343
343
) ;
344
344
} )
345
345
346
- it ( '6.1.11 Negative test - throws correct error message ' , function ( done ) {
346
+ it ( '6.1.11 Negative test - wrong SQL got correct error thrown ' , function ( done ) {
347
347
connection . should . be . ok ;
348
348
var wrongSQL = "UPDATE oracledb_dmlreturn SET doesnotexist = 'X' WHERE id = :id RETURNING name INTO :rn" ;
349
349
@@ -362,6 +362,23 @@ describe('6. dmlReturning.js', function(){
362
362
}
363
363
) ;
364
364
} )
365
+
366
+ it ( '6.1.12 Negative test - data type is not supported with DML Returning statments' , function ( done ) {
367
+ var sql = "UPDATE oracledb_dmlreturn SET name = 'Leslie Lin' WHERE id = :id RETURNING name INTO :rn " ;
368
+ var bindVar =
369
+ {
370
+ id : 1002 ,
371
+ rn : { type : oracledb . BUFFER , dir : oracledb . BIND_OUT }
372
+ } ;
373
+
374
+ connection . execute ( sql , bindVar , function ( err , result ) {
375
+ should . exist ( err ) ;
376
+ // NJS-028: raw database type is not supported with DML Returning statements
377
+ ( err . message ) . should . startWith ( 'NJS-028: ' ) ;
378
+ done ( ) ;
379
+ } ) ;
380
+
381
+ } )
365
382
366
383
} ) // 6.1
367
384
Original file line number Diff line number Diff line change 118
118
6.1.9 DELETE statement with Array binding
119
119
6.1.10 Stress test - support 4k varchars
120
120
6.1.11 Negative test - throws correct error message
121
+ 6.1.12 6.1.12 Negative test - data type is not supported with DML Returning statments
122
+ 6.2 DATE and TIMESTAMP data
123
+ 6.2.1 INSERT statement, single row matched, Object binding, no bind in data
124
+ 6.2.2 INSERT statement with JavaScript date bind in
125
+ 6.2.3 INSERT statement with Array binding
126
+ 6.2.4 UPDATE statement with single row matched
127
+ 6.2.5 UPDATE statements with multiple rows matched, ARRAY binding format
128
+ 6.2.6 UPDATE statements, multiple rows, TIMESTAMP data
129
+ 6.2.7 DELETE statement, single row matched, Object binding format
130
+ 6.2.8 DELETE statement, multiple rows matched, Array binding format
131
+ 6.2.9 Negative test - bind value and type mismatch
132
+
121
133
122
134
7. autoCommit.js
123
135
7.1 autoCommit takes effect when setting oracledb.autoCommit before connecting
You can’t perform that action at this time.
0 commit comments