meadow 2.0.29 → 2.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -183,10 +183,12 @@ var MeadowProvider = function ()
|
|
|
183
183
|
tmpPreparedStatement.prepare(tmpQueryBody,
|
|
184
184
|
(pPrepareError) =>
|
|
185
185
|
{
|
|
186
|
-
// TODO: This will likely blow up the world. It will definitely happen when the schema doesn't generate good constraints from the inputs.
|
|
187
186
|
if (pPrepareError)
|
|
188
187
|
{
|
|
189
188
|
_Fable.log.error(`CREATE Error preparing prepared statement: ${pPrepareError}`, pPrepareError);
|
|
189
|
+
tmpResult.error = pPrepareError;
|
|
190
|
+
tmpResult.executed = true;
|
|
191
|
+
return fCallback();
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
tmpPreparedStatement.execute(pQuery.query.parameters,
|
|
@@ -236,10 +238,12 @@ var MeadowProvider = function ()
|
|
|
236
238
|
tmpPreparedStatement.prepare(pQuery.query.body,
|
|
237
239
|
(pPrepareError) =>
|
|
238
240
|
{
|
|
239
|
-
// TODO: This will likely blow up the world. It will definitely happen when the schema doesn't generate good constraints from the inputs.
|
|
240
241
|
if (pPrepareError)
|
|
241
242
|
{
|
|
242
243
|
_Fable.log.error(`READ Error preparing prepared statement: ${pPrepareError}`, pPrepareError);
|
|
244
|
+
tmpResult.error = pPrepareError;
|
|
245
|
+
tmpResult.executed = true;
|
|
246
|
+
return fCallback();
|
|
243
247
|
}
|
|
244
248
|
|
|
245
249
|
tmpPreparedStatement.execute(pQuery.query.parameters,
|
|
@@ -287,10 +291,12 @@ var MeadowProvider = function ()
|
|
|
287
291
|
tmpPreparedStatement.prepare(pQuery.query.body,
|
|
288
292
|
(pPrepareError) =>
|
|
289
293
|
{
|
|
290
|
-
// TODO: This will likely blow up the world. It will definitely happen when the schema doesn't generate good constraints from the inputs.
|
|
291
294
|
if (pPrepareError)
|
|
292
295
|
{
|
|
293
296
|
_Fable.log.error(`UPDATE Error preparing prepared statement: ${pPrepareError}`, pPrepareError);
|
|
297
|
+
tmpResult.error = pPrepareError;
|
|
298
|
+
tmpResult.executed = true;
|
|
299
|
+
return fCallback();
|
|
294
300
|
}
|
|
295
301
|
|
|
296
302
|
tmpPreparedStatement.execute(pQuery.query.parameters,
|
|
@@ -331,10 +337,12 @@ var MeadowProvider = function ()
|
|
|
331
337
|
tmpPreparedStatement.prepare(pQuery.query.body,
|
|
332
338
|
(pPrepareError) =>
|
|
333
339
|
{
|
|
334
|
-
// TODO: This will likely blow up the world. It will definitely happen when the schema doesn't generate good constraints from the inputs.
|
|
335
340
|
if (pPrepareError)
|
|
336
341
|
{
|
|
337
342
|
_Fable.log.error(`DELETE Error preparing prepared statement: ${pPrepareError}`, pPrepareError);
|
|
343
|
+
tmpResult.error = pPrepareError;
|
|
344
|
+
tmpResult.executed = true;
|
|
345
|
+
return fCallback();
|
|
338
346
|
}
|
|
339
347
|
|
|
340
348
|
tmpPreparedStatement.execute(pQuery.query.parameters,
|
|
@@ -383,10 +391,12 @@ var MeadowProvider = function ()
|
|
|
383
391
|
tmpPreparedStatement.prepare(pQuery.query.body,
|
|
384
392
|
(pPrepareError) =>
|
|
385
393
|
{
|
|
386
|
-
// TODO: This will likely blow up the world. It will definitely happen when the schema doesn't generate good constraints from the inputs.
|
|
387
394
|
if (pPrepareError)
|
|
388
395
|
{
|
|
389
396
|
_Fable.log.error(`UNDELETE Error preparing prepared statement: ${pPrepareError}`, pPrepareError);
|
|
397
|
+
tmpResult.error = pPrepareError;
|
|
398
|
+
tmpResult.executed = true;
|
|
399
|
+
return fCallback();
|
|
390
400
|
}
|
|
391
401
|
|
|
392
402
|
tmpPreparedStatement.execute(pQuery.query.parameters,
|
|
@@ -435,10 +445,12 @@ var MeadowProvider = function ()
|
|
|
435
445
|
tmpPreparedStatement.prepare(pQuery.query.body,
|
|
436
446
|
(pPrepareError) =>
|
|
437
447
|
{
|
|
438
|
-
// TODO: This will likely blow up the world. It will definitely happen when the schema doesn't generate good constraints from the inputs.
|
|
439
448
|
if (pPrepareError)
|
|
440
449
|
{
|
|
441
450
|
_Fable.log.error(`COUNT Error preparing prepared statement: ${pPrepareError}`, pPrepareError);
|
|
451
|
+
tmpResult.error = pPrepareError;
|
|
452
|
+
tmpResult.executed = true;
|
|
453
|
+
return fCallback();
|
|
442
454
|
}
|
|
443
455
|
|
|
444
456
|
tmpPreparedStatement.execute(pQuery.query.parameters,
|
|
@@ -130,8 +130,22 @@ var MeadowProvider = function ()
|
|
|
130
130
|
_Fable.log.trace(pQuery.query.body, pQuery.query.parameters);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
getSQLPool()
|
|
133
|
+
var tmpPool = getSQLPool();
|
|
134
|
+
if (!tmpPool)
|
|
134
135
|
{
|
|
136
|
+
tmpResult.error = new Error('No MySQL connection pool available.');
|
|
137
|
+
tmpResult.executed = true;
|
|
138
|
+
return fCallback();
|
|
139
|
+
}
|
|
140
|
+
tmpPool.getConnection(function (pError, pDBConnection)
|
|
141
|
+
{
|
|
142
|
+
if (pError || !pDBConnection)
|
|
143
|
+
{
|
|
144
|
+
_Fable.log.error('Error getting connection from MySQL pool during create query: ' + (pError ? pError.message : 'no connection returned'), { Body: pQuery.query.body });
|
|
145
|
+
tmpResult.error = pError || new Error('No connection returned from pool.');
|
|
146
|
+
tmpResult.executed = true;
|
|
147
|
+
return fCallback();
|
|
148
|
+
}
|
|
135
149
|
pDBConnection.query(
|
|
136
150
|
pQuery.query.body,
|
|
137
151
|
pQuery.query.parameters,
|
|
@@ -171,8 +185,22 @@ var MeadowProvider = function ()
|
|
|
171
185
|
_Fable.log.trace(pQuery.query.body, pQuery.query.parameters);
|
|
172
186
|
}
|
|
173
187
|
|
|
174
|
-
getSQLPool()
|
|
188
|
+
var tmpPool = getSQLPool();
|
|
189
|
+
if (!tmpPool)
|
|
190
|
+
{
|
|
191
|
+
tmpResult.error = new Error('No MySQL connection pool available.');
|
|
192
|
+
tmpResult.executed = true;
|
|
193
|
+
return fCallback();
|
|
194
|
+
}
|
|
195
|
+
tmpPool.getConnection(function (pError, pDBConnection)
|
|
175
196
|
{
|
|
197
|
+
if (pError || !pDBConnection)
|
|
198
|
+
{
|
|
199
|
+
_Fable.log.error('Error getting connection from MySQL pool during read query: ' + (pError ? pError.message : 'no connection returned'), { Body: pQuery.query.body });
|
|
200
|
+
tmpResult.error = pError || new Error('No connection returned from pool.');
|
|
201
|
+
tmpResult.executed = true;
|
|
202
|
+
return fCallback();
|
|
203
|
+
}
|
|
176
204
|
pDBConnection.query(
|
|
177
205
|
pQuery.query.body,
|
|
178
206
|
pQuery.query.parameters,
|
|
@@ -201,8 +229,22 @@ var MeadowProvider = function ()
|
|
|
201
229
|
_Fable.log.trace(pQuery.query.body, pQuery.query.parameters);
|
|
202
230
|
}
|
|
203
231
|
|
|
204
|
-
getSQLPool()
|
|
232
|
+
var tmpPool = getSQLPool();
|
|
233
|
+
if (!tmpPool)
|
|
234
|
+
{
|
|
235
|
+
tmpResult.error = new Error('No MySQL connection pool available.');
|
|
236
|
+
tmpResult.executed = true;
|
|
237
|
+
return fCallback();
|
|
238
|
+
}
|
|
239
|
+
tmpPool.getConnection(function (pError, pDBConnection)
|
|
205
240
|
{
|
|
241
|
+
if (pError || !pDBConnection)
|
|
242
|
+
{
|
|
243
|
+
_Fable.log.error('Error getting connection from MySQL pool during update query: ' + (pError ? pError.message : 'no connection returned'), { Body: pQuery.query.body });
|
|
244
|
+
tmpResult.error = pError || new Error('No connection returned from pool.');
|
|
245
|
+
tmpResult.executed = true;
|
|
246
|
+
return fCallback();
|
|
247
|
+
}
|
|
206
248
|
pDBConnection.query(
|
|
207
249
|
pQuery.query.body,
|
|
208
250
|
pQuery.query.parameters,
|
|
@@ -231,8 +273,22 @@ var MeadowProvider = function ()
|
|
|
231
273
|
_Fable.log.trace(pQuery.query.body, pQuery.query.parameters);
|
|
232
274
|
}
|
|
233
275
|
|
|
234
|
-
getSQLPool()
|
|
276
|
+
var tmpPool = getSQLPool();
|
|
277
|
+
if (!tmpPool)
|
|
235
278
|
{
|
|
279
|
+
tmpResult.error = new Error('No MySQL connection pool available.');
|
|
280
|
+
tmpResult.executed = true;
|
|
281
|
+
return fCallback();
|
|
282
|
+
}
|
|
283
|
+
tmpPool.getConnection(function (pError, pDBConnection)
|
|
284
|
+
{
|
|
285
|
+
if (pError || !pDBConnection)
|
|
286
|
+
{
|
|
287
|
+
_Fable.log.error('Error getting connection from MySQL pool during delete query: ' + (pError ? pError.message : 'no connection returned'), { Body: pQuery.query.body });
|
|
288
|
+
tmpResult.error = pError || new Error('No connection returned from pool.');
|
|
289
|
+
tmpResult.executed = true;
|
|
290
|
+
return fCallback();
|
|
291
|
+
}
|
|
236
292
|
pDBConnection.query
|
|
237
293
|
(
|
|
238
294
|
pQuery.query.body,
|
|
@@ -270,8 +326,22 @@ var MeadowProvider = function ()
|
|
|
270
326
|
_Fable.log.trace(pQuery.query.body, pQuery.query.parameters);
|
|
271
327
|
}
|
|
272
328
|
|
|
273
|
-
getSQLPool()
|
|
329
|
+
var tmpPool = getSQLPool();
|
|
330
|
+
if (!tmpPool)
|
|
331
|
+
{
|
|
332
|
+
tmpResult.error = new Error('No MySQL connection pool available.');
|
|
333
|
+
tmpResult.executed = true;
|
|
334
|
+
return fCallback();
|
|
335
|
+
}
|
|
336
|
+
tmpPool.getConnection(function (pError, pDBConnection)
|
|
274
337
|
{
|
|
338
|
+
if (pError || !pDBConnection)
|
|
339
|
+
{
|
|
340
|
+
_Fable.log.error('Error getting connection from MySQL pool during undelete query: ' + (pError ? pError.message : 'no connection returned'), { Body: pQuery.query.body });
|
|
341
|
+
tmpResult.error = pError || new Error('No connection returned from pool.');
|
|
342
|
+
tmpResult.executed = true;
|
|
343
|
+
return fCallback();
|
|
344
|
+
}
|
|
275
345
|
pDBConnection.query
|
|
276
346
|
(
|
|
277
347
|
pQuery.query.body,
|
|
@@ -309,8 +379,22 @@ var MeadowProvider = function ()
|
|
|
309
379
|
_Fable.log.trace(pQuery.query.body, pQuery.query.parameters);
|
|
310
380
|
}
|
|
311
381
|
|
|
312
|
-
getSQLPool()
|
|
382
|
+
var tmpPool = getSQLPool();
|
|
383
|
+
if (!tmpPool)
|
|
384
|
+
{
|
|
385
|
+
tmpResult.error = new Error('No MySQL connection pool available.');
|
|
386
|
+
tmpResult.executed = true;
|
|
387
|
+
return fCallback();
|
|
388
|
+
}
|
|
389
|
+
tmpPool.getConnection(function (pError, pDBConnection)
|
|
313
390
|
{
|
|
391
|
+
if (pError || !pDBConnection)
|
|
392
|
+
{
|
|
393
|
+
_Fable.log.error('Error getting connection from MySQL pool during count query: ' + (pError ? pError.message : 'no connection returned'), { Body: pQuery.query.body });
|
|
394
|
+
tmpResult.error = pError || new Error('No connection returned from pool.');
|
|
395
|
+
tmpResult.executed = true;
|
|
396
|
+
return fCallback();
|
|
397
|
+
}
|
|
314
398
|
pDBConnection.query(
|
|
315
399
|
pQuery.query.body,
|
|
316
400
|
pQuery.query.parameters,
|