rads-db 3.2.2 → 3.2.3
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/drivers/sql.cjs +5 -4
- package/drivers/sql.mjs +5 -4
- package/package.json +1 -1
package/drivers/sql.cjs
CHANGED
|
@@ -314,10 +314,10 @@ var _default = options => {
|
|
|
314
314
|
for (const p in parameters) {
|
|
315
315
|
req.input(p, parameters[p]);
|
|
316
316
|
}
|
|
317
|
-
|
|
317
|
+
ctx?.log?.(query);
|
|
318
318
|
const result2 = await req.query(query);
|
|
319
319
|
const nodes = result2.recordset || [];
|
|
320
|
-
|
|
320
|
+
ctx?.log?.(result2);
|
|
321
321
|
return nodes[0];
|
|
322
322
|
},
|
|
323
323
|
async putMany(items, ctx) {
|
|
@@ -366,6 +366,7 @@ var _default = options => {
|
|
|
366
366
|
console.error(`\u274C Failed insert into ${realTable} [${valuesChunk.length} rows]`);
|
|
367
367
|
console.error(`First 300 chars of query:
|
|
368
368
|
${insertQuery.slice(0, 300)}...`);
|
|
369
|
+
console.error(e);
|
|
369
370
|
throw e;
|
|
370
371
|
}
|
|
371
372
|
}
|
|
@@ -657,10 +658,10 @@ END;
|
|
|
657
658
|
for (const p in parameters) {
|
|
658
659
|
req.input(p, parameters[p]);
|
|
659
660
|
}
|
|
660
|
-
|
|
661
|
+
ctx?.log?.(query);
|
|
661
662
|
const result2 = await req.query(query);
|
|
662
663
|
const nodes = result2.recordset || [];
|
|
663
|
-
|
|
664
|
+
ctx?.log?.(result2);
|
|
664
665
|
return {
|
|
665
666
|
nodes,
|
|
666
667
|
cursor: nodes.length === maxItemCount ? String((Number(args.cursor || "0") || 0) + nodes.length) : void 0
|
package/drivers/sql.mjs
CHANGED
|
@@ -183,10 +183,10 @@ export default (options) => {
|
|
|
183
183
|
for (const p in parameters) {
|
|
184
184
|
req.input(p, parameters[p]);
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
ctx?.log?.(query);
|
|
187
187
|
const result2 = await req.query(query);
|
|
188
188
|
const nodes = result2.recordset || [];
|
|
189
|
-
|
|
189
|
+
ctx?.log?.(result2);
|
|
190
190
|
return nodes[0];
|
|
191
191
|
},
|
|
192
192
|
async putMany(items, ctx) {
|
|
@@ -237,6 +237,7 @@ export default (options) => {
|
|
|
237
237
|
console.error(`\u274C Failed insert into ${realTable} [${valuesChunk.length} rows]`);
|
|
238
238
|
console.error(`First 300 chars of query:
|
|
239
239
|
${insertQuery.slice(0, 300)}...`);
|
|
240
|
+
console.error(e);
|
|
240
241
|
throw e;
|
|
241
242
|
}
|
|
242
243
|
}
|
|
@@ -531,10 +532,10 @@ END;
|
|
|
531
532
|
for (const p in parameters) {
|
|
532
533
|
req.input(p, parameters[p]);
|
|
533
534
|
}
|
|
534
|
-
|
|
535
|
+
ctx?.log?.(query);
|
|
535
536
|
const result2 = await req.query(query);
|
|
536
537
|
const nodes = result2.recordset || [];
|
|
537
|
-
|
|
538
|
+
ctx?.log?.(result2);
|
|
538
539
|
return {
|
|
539
540
|
nodes,
|
|
540
541
|
cursor: nodes.length === maxItemCount ? String((Number(args.cursor || "0") || 0) + nodes.length) : void 0
|