File tree Expand file tree Collapse file tree 2 files changed +66
-2
lines changed Expand file tree Collapse file tree 2 files changed +66
-2
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ describe('42. dataTypeRaw.js', function() {
164
164
) ;
165
165
} )
166
166
167
- it . only ( '42.3.1 INSERT statement with Object binding' , function ( done ) {
167
+ it ( '42.3.1 INSERT statement with Object binding' , function ( done ) {
168
168
var seq = 1 ;
169
169
var size = 10 ;
170
170
var bindValue = assist . createBuffer ( size ) ;
@@ -204,6 +204,7 @@ describe('42. dataTypeRaw.js', function() {
204
204
function ( err , result ) {
205
205
should . exist ( err ) ;
206
206
( err . message ) . should . startWith ( 'NJS-028' ) ;
207
+ done ( ) ;
207
208
}
208
209
) ;
209
210
} ) // 42.3.2
@@ -400,4 +401,4 @@ describe('42. dataTypeRaw.js', function() {
400
401
} )
401
402
} ) // 42.4
402
403
403
- } )
404
+ } )
Original file line number Diff line number Diff line change 23
23
*
24
24
* DESCRIPTION
25
25
* Testing driver DML Returning feature.
26
+ *
27
+ * When DML affects multiple rows we can still use the RETURING INTO,
28
+ * but now we must return the values into a collection using the
29
+ * BULK COLLECT clause.
30
+ *
26
31
*
27
32
* NUMBERING RULE
28
33
* Test numbers follow this numbering rule:
@@ -577,4 +582,62 @@ describe('6. dmlReturning.js', function(){
577
582
} )
578
583
579
584
} ) // 6.2
585
+
586
+ describe ( '6.3 BULK COLLECT clause' , function ( ) {
587
+
588
+ var connection = null ;
589
+ var tableName = "oracledb_varchar2" ;
590
+ var dataLength = 500 ;
591
+ var rows = [ ] ;
592
+ for ( var i = 0 ; i < dataLength ; i ++ )
593
+ rows [ i ] = "Row Number " + i ;
594
+
595
+ before ( function ( done ) {
596
+ async . series ( [
597
+ function ( cb ) {
598
+ oracledb . getConnection ( credential , function ( err , conn ) {
599
+ should . not . exist ( err ) ;
600
+ connection = conn ;
601
+ cb ( ) ;
602
+ } ) ;
603
+ } ,
604
+ function insertRows ( cb ) {
605
+ assist . setUp ( connection , tableName , rows , cb ) ;
606
+ }
607
+ ] , done ) ;
608
+ } ) // before
609
+
610
+ after ( function ( done ) {
611
+ async . series ( [
612
+ function ( cb ) {
613
+ connection . execute (
614
+ "DROP table " + tableName ,
615
+ function ( err ) {
616
+ should . not . exist ( err ) ;
617
+ cb ( ) ;
618
+ }
619
+ ) ;
620
+ } ,
621
+ function ( cb ) {
622
+ connection . release ( function ( err ) {
623
+ should . not . exist ( err ) ;
624
+ cb ( ) ;
625
+ } ) ;
626
+ }
627
+ ] , done ) ;
628
+ } ) // after
629
+
630
+ /* Pending case*/
631
+ it . skip ( '6.3.1 ' , function ( done ) {
632
+ connection . execute (
633
+ "SELECT * FROM " + tableName ,
634
+ function ( err , result ) {
635
+ //console.log(result);
636
+ console . log ( result . rows . length ) ;
637
+ done ( ) ;
638
+ }
639
+ ) ;
640
+ } )
641
+
642
+ } ) // 6.3
580
643
} )
You can’t perform that action at this time.
0 commit comments