I'm sorry, the console tab? My browser console?
I'm sorry, the console tab? My browser console?



pack_id=371151432834875400 but not where pack_id is a number with the same where clause371151432834875396
Edit Cloudflare Workers template, it doesn't include D1. This caught me out a little bit running D1 commands in CI, as it does include KV and R2, so seems a little inconsistent it doesn't include D1, but perhaps there is a reason for that
PRAGMA defer_foreign_keys=ON not disable on update and on delete actions? Kinda weird when SQLite often requires recreating tables (and thus triggering those actions)select * from pragma_table_info('TABLE_NAME_HERE');on delete and on update features because of this? Or should I dump my current db, create a new one, and upload the data?Error: D1_ERROR: The destination execution context for this RPC was canceled while the call was still running the docs just define it as Generic error.. I'm getting it while using the db.batch() command and my code has been working fine until today. Is there a limit to how many prepared statements db.batch can run? [cause]: Error: parser stack overflow
at D1Database._sendOrThrow (cloudflare-internal:d1-api:67:24)
at async D1PreparedStatement.raw (cloudflare-internal:d1-api:184:32) {
[cause]: undefined
}PRAGMA defer_foreign_keys=ONon updateon updateon deleteon deleteselect * from pragma_table_info('TABLE_NAME_HERE');Error: D1_ERROR: The destination execution context for this RPC was canceled while the call was still runningGeneric error.db.batch()db.batchconst transcriptPrepared = db.prepare(`
INSERT INTO transcripts
(
feed_id, archive_date, archive_date_time,
object_key, segment_start, segment_end,
segment
)
VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)
`);
const transcriptQueriesToRun = allSegments.map(segmentObj => transcriptPrepared.bind(
segmentObj.feed_id,
segmentObj.archive_date,
segmentObj.archive_date_time,
segmentObj.object_key,
segmentObj.segment_start,
segmentObj.segment_end,
segmentObj.segment
));
console.log("transcriptQueriesToRun.length: ", transcriptQueriesToRun.length);
console.log("transcriptQueriesToRun[0] ", JSON.stringify(transcriptQueriesToRun[0]));
if (transcriptQueriesToRun.length > 0) {
try {
await db.batch(transcriptQueriesToRun);
} catch (e: any) {
console.error({
message: e.message
});
if (e instanceof Error) {
return new Response(JSON.stringify({
"error": e.message,
"traceback": e.stack
}), {
status: 500,
headers: getCorsHeaders()
});
}
}
}