it's an upcoming feature which breaks compatibility with previous API
it's an upcoming feature which breaks compatibility with previous API

env.DB.prepare() and other APIs, or you create a session via let session = env.DB.withSession(commitToken) and then call session.prepare(), session.batch(), etc, etc.



-- CreateTable and -- CreateIndex
sqlite3_error_offset which indicates it's the first character of that given input, but since Wrangler splits the statements you don't really know which one it isCREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"email" TEXT NOT NULL,
"name" TEXT
);
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");~/repos/d1 (main) ✗
➜ pbpaste > user_repro_20240404.sql
~/repos/d1 (main) ✗
➜ wrangler d1 execute db-enam --file=user_repro_20240404.sql
🌀 Mapping SQL input into an array of statements
🌀 Parsing 2 statements
🌀 Executing on db-enam (c89db32e-83f4-4e62-8cd7-7c8f97659029):
🚣 Executed 2 commands in 0.4695ms