Initial commit - Event Planner application
This commit is contained in:
29
node_modules/kysely/dist/esm/util/streamable.d.ts
generated
vendored
Normal file
29
node_modules/kysely/dist/esm/util/streamable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
export interface Streamable<O> {
|
||||
/**
|
||||
* Executes the query and streams the rows.
|
||||
*
|
||||
* The optional argument `chunkSize` defines how many rows to fetch from the database
|
||||
* at a time. It only affects some dialects like PostgreSQL that support it.
|
||||
*
|
||||
* ### Examples
|
||||
*
|
||||
* ```ts
|
||||
* const stream = db
|
||||
* .selectFrom('person')
|
||||
* .select(['first_name', 'last_name'])
|
||||
* .where('gender', '=', 'other')
|
||||
* .stream()
|
||||
*
|
||||
* for await (const person of stream) {
|
||||
* console.log(person.first_name)
|
||||
*
|
||||
* if (person.last_name === 'Something') {
|
||||
* // Breaking or returning before the stream has ended will release
|
||||
* // the database connection and invalidate the stream.
|
||||
* break
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
stream(chunkSize?: number): AsyncIterableIterator<O>;
|
||||
}
|
||||
Reference in New Issue
Block a user