質問編集履歴
2
誤字修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
`var array = [[1,2],[3,4],[5,6]];`を`var ar1 = array[0];var i = ar1[0];`の様にアクセスすればそれらしい事は出来るみたいですが、
|
44
44
|
|
45
|
-
下記ソースコード`Promise
|
45
|
+
下記ソースコード`Promise.all([promisesA]).then(~~`内の`results.length`と`sqlresults.length`の値が逆なのではないか?
|
46
46
|
|
47
47
|
直感では、`results.length=31`と、SQLの結果`sqlresults.length=1`ですが、
|
48
48
|
|
@@ -178,7 +178,7 @@
|
|
178
178
|
|
179
179
|
}
|
180
180
|
|
181
|
-
Promise
|
181
|
+
Promise.all([promisesA])
|
182
182
|
|
183
183
|
.then(function(results){
|
184
184
|
|
@@ -202,7 +202,7 @@
|
|
202
202
|
|
203
203
|
});
|
204
204
|
|
205
|
-
Promise
|
205
|
+
Promise.all([promisesB])
|
206
206
|
|
207
207
|
.then(function(results){
|
208
208
|
|
@@ -220,7 +220,7 @@
|
|
220
220
|
|
221
221
|
});
|
222
222
|
|
223
|
-
Promise
|
223
|
+
Promise.all([promisesC])
|
224
224
|
|
225
225
|
.then(function(results){
|
226
226
|
|
1
ソースコードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -220,7 +220,7 @@
|
|
220
220
|
|
221
221
|
});
|
222
222
|
|
223
|
-
Promises.all([promises
|
223
|
+
Promises.all([promisesC])
|
224
224
|
|
225
225
|
.then(function(results){
|
226
226
|
|
@@ -228,7 +228,7 @@
|
|
228
228
|
|
229
229
|
var sqlresults = results[i];
|
230
230
|
|
231
|
-
results
|
231
|
+
resultsC.push(sqlresults[0].CValue);
|
232
232
|
|
233
233
|
}
|
234
234
|
|
@@ -238,24 +238,6 @@
|
|
238
238
|
|
239
239
|
});
|
240
240
|
|
241
|
-
Promises.all([promisesC])
|
242
|
-
|
243
|
-
.then(function(results){
|
244
|
-
|
245
|
-
for(var i=0; i < results.length; i++){
|
246
|
-
|
247
|
-
var sqlresults = results[i];
|
248
|
-
|
249
|
-
resultsC.push(sqlresults[0].CValue);
|
250
|
-
|
251
|
-
}
|
252
|
-
|
253
|
-
})
|
254
|
-
|
255
|
-
.catch(function(error,query){
|
256
|
-
|
257
|
-
});
|
258
|
-
|
259
241
|
//SQL問い合わせの結果をもとに配列を作成
|
260
242
|
|
261
243
|
for(var i=0; i < 31; i++){
|