@@ -46,23 +46,37 @@ describe('56. fetchAs.js', function() {
46
46
}
47
47
48
48
var connection = null ;
49
- before ( 'get one connection' , function ( done ) {
49
+ beforeEach ( 'get one connection' , function ( done ) {
50
50
oracledb . getConnection ( credential , function ( err , conn ) {
51
51
should . not . exist ( err ) ;
52
52
connection = conn ;
53
53
done ( ) ;
54
54
} ) ;
55
55
} )
56
56
57
- after ( 'release connection, reset fetchAsString property' , function ( done ) {
57
+ afterEach ( 'release connection, reset fetchAsString property' , function ( done ) {
58
58
oracledb . fetchAsString = [ ] ;
59
59
connection . release ( function ( err ) {
60
60
should . not . exist ( err ) ;
61
61
done ( ) ;
62
62
} ) ;
63
63
} )
64
64
65
- it ( '56.1 Fetch DATE column values as STRING - by-Column name' , function ( done ) {
65
+ it ( '56.1 property value check' , function ( ) {
66
+
67
+ ( oracledb . fetchAsString ) . should . eql ( [ ] ) ;
68
+
69
+ oracledb . fetchAsString = [ oracledb . DATE ] ;
70
+ ( oracledb . fetchAsString ) . should . eql ( [ 2003 ] ) ;
71
+
72
+ oracledb . fetchAsString = [ oracledb . NUMBER ] ;
73
+ ( oracledb . fetchAsString ) . should . eql ( [ 2002 ] ) ;
74
+
75
+ oracledb . fetchAsString = [ oracledb . DATE , oracledb . NUMBER ] ;
76
+ ( oracledb . fetchAsString ) . should . eql ( [ 2003 , 2002 ] ) ;
77
+ } )
78
+
79
+ it ( '56.2 Fetch DATE column values as STRING - by-Column name' , function ( done ) {
66
80
connection . execute (
67
81
"SELECT TO_DATE('2005-01-06', 'YYYY-DD-MM') AS TS_DATE FROM DUAL" ,
68
82
[ ] ,
@@ -79,7 +93,7 @@ describe('56. fetchAs.js', function() {
79
93
) ;
80
94
} )
81
95
82
- it ( '56.2 Fetch DATE, NUMBER column values STRING - by Column-name' , function ( done ) {
96
+ it ( '56.3 Fetch DATE, NUMBER column values STRING - by Column-name' , function ( done ) {
83
97
connection . execute (
84
98
"SELECT 1234567 AS TS_NUM, TO_TIMESTAMP('1999-12-01 11:10:01.00123', 'YYYY-MM-DD HH:MI:SS.FF') AS TS_DATE FROM DUAL" ,
85
99
[ ] ,
@@ -102,7 +116,7 @@ describe('56. fetchAs.js', function() {
102
116
) ;
103
117
} )
104
118
105
- it ( '56.3 Fetch DATE, NUMBER as STRING by-time configuration and by-name' , function ( done ) {
119
+ it ( '56.4 Fetch DATE, NUMBER as STRING by-time configuration and by-name' , function ( done ) {
106
120
oracledb . fetchAsString = [ oracledb . DATE , oracledb . NUMBER ] ;
107
121
108
122
connection . execute (
@@ -127,7 +141,7 @@ describe('56. fetchAs.js', function() {
127
141
) ;
128
142
} )
129
143
130
- it ( '56.4 Fetch DATE, NUMBER column as STRING by-type and override at execute time' , function ( done ) {
144
+ it ( '56.5 Fetch DATE, NUMBER column as STRING by-type and override at execute time' , function ( done ) {
131
145
oracledb . fetchAsString = [ oracledb . DATE , oracledb . NUMBER ] ;
132
146
133
147
connection . execute (
@@ -152,7 +166,7 @@ describe('56. fetchAs.js', function() {
152
166
) ;
153
167
} )
154
168
155
- it ( '56.5 Fetch ROWID column values STRING - non-ResultSet' , function ( done ) {
169
+ it ( '56.6 Fetch ROWID column values STRING - non-ResultSet' , function ( done ) {
156
170
connection . execute (
157
171
"SELECT ROWID from DUAL" ,
158
172
[ ] ,
@@ -172,7 +186,7 @@ describe('56. fetchAs.js', function() {
172
186
) ;
173
187
} )
174
188
175
- it ( '56.6 Fetch ROWID column values STRING - ResultSet' , function ( done ) {
189
+ it ( '56.7 Fetch ROWID column values STRING - ResultSet' , function ( done ) {
176
190
connection . execute (
177
191
"SELECT ROWID from DUAL" ,
178
192
[ ] ,
@@ -224,7 +238,7 @@ describe('56. fetchAs.js', function() {
224
238
'.172491386803558312345678912345678912346'
225
239
] ;
226
240
227
- it ( '56.7 large numbers with fetchInfo' , function ( done ) {
241
+ it ( '56.8 large numbers with fetchInfo' , function ( done ) {
228
242
async . forEach ( numStrs , function ( element , callback ) {
229
243
connection . execute (
230
244
"SELECT TO_NUMBER( " + element + " ) AS TS_NUM FROM DUAL" ,
@@ -249,7 +263,7 @@ describe('56. fetchAs.js', function() {
249
263
} ) ;
250
264
} )
251
265
252
- it ( '56.8 large numbers with setting fetchAsString property' , function ( done ) {
266
+ it ( '56.9 large numbers with setting fetchAsString property' , function ( done ) {
253
267
oracledb . fetchAsString = [ oracledb . NUMBER ] ;
254
268
255
269
async . forEach ( numStrs , function ( element , callback ) {
0 commit comments