File tree 2 files changed +15
-7
lines changed
2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ describe('214. dbObject15.js', () => {
62
62
await conn . execute ( plsql ) ;
63
63
64
64
plsql = `
65
- CREATE OR REPLACE TYPE ${ TEAM_T } AS VARRAY(10 ) OF ${ PLAYER_T } ;
65
+ CREATE OR REPLACE TYPE ${ TEAM_T } AS VARRAY(5 ) OF ${ PLAYER_T } ;
66
66
` ;
67
67
await conn . execute ( plsql ) ;
68
68
@@ -102,20 +102,27 @@ describe('214. dbObject15.js', () => {
102
102
}
103
103
} ) ; // 214.2
104
104
105
- it ( '214.3 Negative - delete the collection element directly' , function ( ) {
105
+ it ( '214.3 Negative - cannot add more than maximum number of elements' , function ( ) {
106
+ assert . throws (
107
+ ( ) => FrisbeeTeam . append ( { SHIRTNUMBER : 9 , NAME : 'Diogo' } ) ,
108
+ / N J S - 1 3 1 : /
109
+ ) ;
110
+ } ) ; // 214.3
111
+
112
+ it ( '214.4 Negative - Cannot delete the VARRAY collection element directly' , function ( ) {
106
113
assert . throws (
107
114
( ) => delete FrisbeeTeam [ 1 ] ,
108
115
/ N J S - 1 3 3 : /
109
116
) ;
110
- } ) ; // 214.3
117
+ } ) ; // 214.4
111
118
112
- it ( '214.4 Negative - collection.deleteElement()' , function ( ) {
119
+ it ( '214.5 Negative - collection.deleteElement()' , function ( ) {
113
120
assert . throws (
114
121
function ( ) {
115
122
const firstIndex = FrisbeeTeam . getFirstIndex ( ) ;
116
123
FrisbeeTeam . deleteElement ( firstIndex ) ;
117
124
} ,
118
125
/ N J S - 1 3 3 : /
119
126
) ;
120
- } ) ; // 214.4
127
+ } ) ; // 214.5
121
128
} ) ;
Original file line number Diff line number Diff line change @@ -4721,8 +4721,9 @@ oracledb.OUT_FORMAT_OBJECT and resultSet = true
4721
4721
214. dbObject15.js
4722
4722
214.1 Getter() - access collection elements directly
4723
4723
214.2 Setter() - access collection element directly
4724
- 214.3 Negative - delete the collection element directly
4725
- 214.4 Negative - collection.deleteElement()
4724
+ 214.3 Negative - cannot add more than maximum number of elements
4725
+ 214.4 Negative - delete the collection element directly
4726
+ 214.5 Negative - collection.deleteElement()
4726
4727
4727
4728
215. dbObject16.js
4728
4729
215.1 Collection of DATE, named Oracle type binds
You can’t perform that action at this time.
0 commit comments