File tree Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Original file line number Diff line number Diff line change @@ -735,7 +735,7 @@ describe('4. binding.js', function() {
735
735
} )
736
736
737
737
738
- it ( '4.5.1' , function ( done ) {
738
+ it ( '4.5.1 ' , function ( done ) {
739
739
connection . execute (
740
740
"insert into oracledb_raw (num) values (:id)" ,
741
741
{ id : { val : 1 , type : oracledb . NUMBER } } , // fails with error NJS-013: invalid bind direction
@@ -747,4 +747,43 @@ describe('4. binding.js', function() {
747
747
) ;
748
748
} )
749
749
} ) // 4.5
750
+
751
+ describe ( '4.6 PL/SQL block with empty outBinds' , function ( ) {
752
+
753
+ it ( '4.6.1 ' , function ( done ) {
754
+
755
+ var sql = "begin execute immediate 'drop table does_not_exist'; "
756
+ + "exception when others then "
757
+ + "if sqlcode <> -942 then "
758
+ + "raise; "
759
+ + "end if; end;" ;
760
+ var binds = [ ] ;
761
+ var options = { } ;
762
+
763
+ oracledb . getConnection (
764
+ credential ,
765
+ function ( err , connection )
766
+ {
767
+ should . not . exist ( err ) ;
768
+ connection . execute (
769
+ sql ,
770
+ binds ,
771
+ options ,
772
+ function ( err , result )
773
+ {
774
+ should . not . exist ( err ) ;
775
+ result . should . eql (
776
+ { rowsAffected : undefined ,
777
+ outBinds : undefined ,
778
+ rows : undefined ,
779
+ metaData : undefined }
780
+ ) ;
781
+ done ( ) ;
782
+ }
783
+ ) ;
784
+ }
785
+ ) ;
786
+
787
+ } )
788
+ } )
750
789
} )
Original file line number Diff line number Diff line change @@ -143,6 +143,24 @@ describe('33. dataTypeTimestamp1.js', function() {
143
143
} ) ;
144
144
} )
145
145
146
+ it ( '33.3.3 returns scalar types from PL/SQL block' , function ( done ) {
147
+ var sql = "BEGIN SELECT systimestamp into :bv from dual; END;" ;
148
+ var binds = { bv : { dir : oracledb . BIND_OUT , type : oracledb . STRING } } ;
149
+ var options = { outFormat : oracledb . OBJECT } ;
150
+
151
+ connection . execute (
152
+ sql ,
153
+ binds ,
154
+ options ,
155
+ function ( err , result ) {
156
+ should . not . exist ( err ) ;
157
+ ( result . outBinds . bv ) . should . be . a . String ;
158
+ done ( ) ;
159
+ }
160
+ ) ;
161
+
162
+ } )
163
+
146
164
} ) // end of 33.3 suite
147
165
148
166
} )
Original file line number Diff line number Diff line change 94
94
4.4 test maxSize option
95
95
4.4.1 outBind & maxSize restriction
96
96
4.4.2 default value is 200
97
- - 4.4.3 Negative - bind out data exceeds default length
97
+ 4.4.3 Negative - bind out data exceeds default length
98
98
- 4.4.4 maximum value is 32767
99
99
4.5 The default direction for binding is BIND_IN
100
100
- 4.5.1
303
303
32.3 insert SQL Date data
304
304
32.3.1 SELECT query - original data
305
305
32.3.2 SELECT query - formatted data for comparison
306
+ 33.3.3 returns scalar types from PL/SQL block
306
307
307
308
33. dataTypeTimestamp1.js
308
309
33.1 Testing JavaScript Date with database TIMESTAMP
You can’t perform that action at this time.
0 commit comments