in batch of 100 to comply with new v2 api restriction

This commit is contained in:
Fendy Heryanto
2026-01-28 10:02:57 +00:00
parent 1c6650e85c
commit 4b80433b95

View File

@@ -268,7 +268,15 @@ async function createDemoTable({
break;
}
await api.dbTableRow.bulkCreate('noco', context.base.id, table.id, rowAttributes);
const BATCH_SIZE = 100;
for (let i = 0; i < rowAttributes.length; i += BATCH_SIZE) {
await api.dbTableRow.bulkCreate(
'noco',
context.base.id,
table.id,
rowAttributes.slice(i * BATCH_SIZE, i * BATCH_SIZE + BATCH_SIZE)
);
}
return table;
}