Genuinely can't wait to see what's announced for birthday week! Hopefully some news around D1 as wel
Genuinely can't wait to see what's announced for birthday week!
Hopefully some news around D1 as well
Hopefully some news around D1 as well


wrangler.toml works. Is this a Workers or a Pages project?await db.exec("PRAGMA table_list") - and nothing else? Your binding appears fine. You aren't returning any results (because it's an INSERT without any RETURNING) - what do you expect to happen? It should just insert without an error.[vars] table will make it where your D1 bindings are not defined unless you changed your format to use a table for d1_databases also which is why you started to get an error when you moved it.- KV Namespaces:
....
- D1 Databases:
- MYDATABASE_DB: mydbinmydashboard (74244d9f-afa8-4ca2-ab7f-XXXXXX)
- Vars:
.....db.batch (or UPSERT / ON CONFLICT) - there is not a way to ship a transaction to D1 outside of that.
db.batch for now. console.log("we start the new DB");
try {
console.log("we start the new DB test 1");
await env.DBNAME_DB.prepare(`insert into messages (location_id,time_stamp,status,customer_dismiss) values (?,?,?,?)`).bind(restaurant_token_used, timestamp_index, 'new', 0).run()
console.log("we start the new DB test 2");
} catch (e) {
console.log("we start the new DB test 3");
console.log({
message: e.message,
cause: e.cause.message,
});
}
console.log("we end the new DB");await db.exec("PRAGMA table_list")[vars]d1_databasesvar coolio200 = await env.MYDATABASE_DB.exec("PRAGMA table_list")
console.log("here is coolio100")
console.log("here is coolio200: " + JSON.stringify(coolio200))- KV Namespaces:
....
- D1 Databases:
- MYDATABASE_DB: mydbinmydashboard (74244d9f-afa8-4ca2-ab7f-XXXXXX)
- Vars:
.....db.batchdb.batchUPSERTON CONFLICTd1_databases = [
{ binding = "name", ... }
]
[vars]
hello = "world"[vars]
hello = "world"
d1_databases = [
{ binding = "name", ... }
]export default {
async fetch(request, env, ctx) {
let res = await env.MYDATABASE.exec("PRAGMA table_list")
console.log(res)
return Response.json({res: res})
},
};