you're trying to run wp on a normal server, and use D1 as its database? Or what's your end goal, exa
you're trying to run wp on a normal server, and use D1 as its database? Or what's your end goal, exactly?
take some mysql proxy code (of which there must be plenty)There's likely plenty of proxy code, but almost certainly none currently that work on Workers.
batch is the solution to this, but can I send 10k sql inserts in one batch? Is there a limit to batch?-- Create a simple table
DROP TABLE IF EXISTS test_table;
CREATE TABLE IF NOT EXISTS test_table (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
-- Drop any existing trigger
DROP TRIGGER IF EXISTS test_trigger;
-- Create a simple trigger
CREATE TRIGGER test_trigger
AFTER UPDATE ON test_table
FOR EACH ROW
BEGIN
UPDATE test_table
SET updated_at = CURRENT_TIMESTAMP
WHERE id = OLD.id;
END;