sql
sql.identifier
sql.values
sql.raw
sql.default
toSQL
stream
chunked
.stream() lets you stream query result rows one by one:
.stream()
const result = sql`select * from users`.stream(); for await (const row of result) { console.log(row); }
{ id: 1, name: "Alex", } { id: 2, name: "Oleksii", }
const generator = sql`select * from users`.stream(); let result = await generator.next(); while (!result.done) { console.log(result.value); result = await generator.next(); }