DefinitelyTyped/types/pg-query-stream/index.d.ts
Ravi van Rooijen 47e9cf6d89 [@types/pg] Generify query methods (#37892)
* [@types/pg] Generify query methods

`R` will be the return type of the query, `I` a tuple for parameters

* [@types/pg] Add test for generified query method

* Raise pg-copy-streams minimum typescript version for pg compatibility

* Raise pg-ears minimum typescript version for pg compatibility

* Raise pg-large-object minimum typescript version for pg compatibility

* Raise pg-pool minimum typescript version for pg compatibility

* Raise pg-query minimum typescript version for pg compatibility
2019-09-04 10:44:34 -07:00

28 lines
772 B
TypeScript

// Type definitions for pg-query-stream 1.0
// Project: https://github.com/brianc/node-pg-query-stream
// Definitions by: António Marques <https://github.com/asmarques>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="node" />
import stream = require("stream");
import pg = require("pg");
declare namespace QueryStream {
interface Options {
highWaterMark?: number;
batchSize?: number;
}
}
declare class QueryStream extends stream.Readable implements pg.Submittable {
batchSize: number;
text: string;
values?: any[];
constructor(text: string, values?: any[], options?: QueryStream.Options);
submit(connection: pg.Connection): void;
}
export = QueryStream;