wrangler d1 execute EmailTracker --command='SELECT * FROM SenderInfo WHERE email = "drnewt536@gmail.com";' fails, yet wrangler d1 execute EmailTracker --command="SELECT * FROM SenderInfo WHERE email = 'drnewt536@gmail.com';" passes"--" to '--'"..." means column, or general database objects - you want '...' for strings
6/13/23, 12:49 PM
error.cause attribute?error.cause.message 
run() a batch? Like, execute the batch statements, but don’t return anything to the calling Worker?.exec() await db.batch(statements)run() itself? Like, if you have a statement where you don’t need the results at all, or loading the results into memory would be a waste, then you run() instead of first() or all(). And I would expect the size argument to be even more compelling if you are batching many statements togetherwrangler d1 execute EmailTracker --command='SELECT * FROM SenderInfo WHERE email = "drnewt536@gmail.com";'wrangler d1 execute EmailTracker --command="SELECT * FROM SenderInfo WHERE email = 'drnewt536@gmail.com';""--"'--'"..."'...'import { D1Database, D1DatabaseAPI } from "@miniflare/d1";
import { drizzle } from "drizzle-orm/d1";
const d1 = new D1Database(new D1DatabaseAPI(sqliteDb));
const db = drizzle(d1); // now I can can write unit tests for drizzleerror.causeerror.cause.messagerun()run()run().exec()await db.batch(statements)first()all()