mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [@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
28 lines
772 B
TypeScript
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;
|