Is there a limit on the number of inserts in a batch?
Is there a limit on the number of inserts in a batch?
.batch() an error is thrown and everything is rolled back. This is not what I'd like to do, rather I'd like to ack/retry each item based on the success attribute.run()s inside try catches?insert into i can look at the results.changes attribute to tell if a row was inserted or not then .ack() or .retry() based on thatmeta.changes the same in production and in development? it's present in dev but the docs do not mention it, only meta.durationdb.dump() do if not dumping the db content into an sqlite file?workerd@a2fbc3dfe25 which maps to https://github.com/cloudflare/workerd/commits/main?before=a2fbc3dfe254ce6e94ceb183f7b1d6476b6c2b29+35&branch=main&qualified_name=refs%2Fheads%2Fmain -> "ALTER TABLE alterme RENAME COLUMN metadata TO somethingelse" passes.DROP COLUMN op.wrangler.toml? The repo is public so I do I make the id public or is it supposed to stay secret? I assume the latter so currently I'm manually adding it to wrangler.toml every time before I deploy/tables in the console, but does that work in the JS API? SELECT * FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'd1_%' AND name != '_cf_KV'_cf_KV table isn't really usable, it doesn't let you see it /tables, though /tables literally just runs that query against the execute endpointSELECT name FROM sqlite_schema WHERE type='table' ORDER BY name; is what it runsSELECT PRAGMA table_list, PRAGMA table_info(table_name)index_list(table), index_info(index)batch operations, is the Maximum SQL statement length of 100,000 (100kb) applied to the entire batch or is that applied to the individual statements within the batch?DB.batch(statements) where statements.length is 400 = 400 statements..batch()results.forEach(({ success }, index) => {
if (success) {
batch.messages[index].ack();
return;
}
batch.messages[index].retry();
});.run()insert intoresults.changes.ack().retry()meta.changesmeta.durationdb.dump()workerd@a2fbc3dfe25"ALTER TABLE alterme RENAME COLUMN metadata TO somethingelse"DROP COLUMN/tables/tables/tablesSELECT * FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'd1_%' AND name != '_cf_KV'_cf_KVSELECT name FROM sqlite_schema WHERE type='table' ORDER BY name;SELECT PRAGMA table_list, PRAGMA table_info(table_name)index_list(table), index_info(index)batchbatchbatchDB.batch(statements)statements.length