Chunked is not implemented in d1
, libsql
, op-sqlite
All other drivers have support for a stream feature
Chunked is not implemented in d1
, libsql
, op-sqlite
All other drivers have support for a stream feature
.chunked()
lets you stream query result rows in chunks:
const result = sql`select * from users`.chunked(2);
for await (const chunk of result) {
console.log(chunk);
}
[
{
id: 1,
name: "Alex",
},
{
id: 2,
name: "Oleksii",
}
]
…