I had the same issue, Local development with D1 is not working for me. So as a workaround I am using
I had the same issue, Local development with D1 is not working for me. So as a workaround I am using preview DB on remote
wrangler d1 migrations apply krypton --env production
wrangler dev —env staging work?




/query/batch endpoint exists for the worker because it calls the .batch method through the Workers API. All of the endpoints in the worker are just ways to access the Workers API bindings

[env.production]
name = "krypton"
logpush = true
workers_dev = true
d1_databases = [
{ binding = "DB", database_name = "krypton", database_id = "<123>" },
]app.get('/', async (c) => {
const res1 = await c.env.DB.prepare('SELECT * from testTable;').all();
return c.json({ status: 'success', message: res1 });
});INSERT INTO table (channel, title, start_time, end_time, description) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?);INSERT INTO table (channel, title, start_time, end_time, description) VALUES (?, ?, ?, ?, ?);
INSERT INTO table (channel, title, start_time, end_time, description) VALUES (?, ?, ?, ?, ?);
INSERT INTO table (channel, title, start_time, end_time, description) VALUES (?, ?, ?, ?, ?);/query/batch.batchMaximum arguments per SQL function 32 --data '{
"params": [
"a",
"b",
"c",
"d",
"e",
"a2",
"b2",
"c2",
"d2",
"e2"
],
"sql": "INSERT INTO myTable (f1, f2, f3, f4, f5) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?);"
}'