wrangler.conf with d1 information --remote -d1=DB ? wrangler.toml. You set all the bindings via the dashboard or APIwrangler.conf when using wranger pages devwrangler d1 commands seems to be only for remote, not local e.g. list ...but it seems possible to apply migrations to local d1


compile function
D1Database available anywhere?@cloudflare/workers-typesemail to my existing table user
--experimental-backend as mentioned in the docswrangler.confwrangler.conf[[d1_databases]]
binding = "DB"
database_name = "local_db"
database_id = "123456789"--remote -d1=DBwranger pages devcompileD1Database--experimental-backendexport function batch(d1: D1Database, statements: InsertQueryBuilder<DB, any, any>[]) {
return d1.batch(
statements.map((s) => {
const compiled = s.compile()
return d1.prepare(compiled.sql).bind(...compiled.parameters)
})
)
}