Comparing version 7.4.2 to 7.4.3
@@ -29,6 +29,6 @@ // Type definitions for pg 7.4 | ||
import { TlsServerOptions } from "tls"; | ||
import { TlsOptions } from "tls"; | ||
export interface ClientConfig extends ConnectionConfig { | ||
ssl?: boolean | TlsServerOptions; | ||
ssl?: boolean | TlsOptions; | ||
} | ||
@@ -51,5 +51,8 @@ | ||
values?: any[]; | ||
rowMode?: string; | ||
} | ||
export interface QueryArrayConfig extends QueryConfig { | ||
rowMode: 'array'; | ||
} | ||
export interface QueryResult { | ||
@@ -62,2 +65,20 @@ command: string; | ||
export interface FieldDef { | ||
name: string; | ||
tableID: number; | ||
columnID: number; | ||
dataTypeID: number; | ||
dataTypeSize: number; | ||
dataTypeModifier: number; | ||
format: string; | ||
} | ||
export interface QueryArrayResult { | ||
command: string; | ||
rowCount: number; | ||
oid: number; | ||
rows: any[][]; | ||
fields: FieldDef[]; | ||
} | ||
export interface Notification { | ||
@@ -83,4 +104,4 @@ processId: number; | ||
connect(): Promise<Client>; | ||
connect(callback: (err: Error, client: Client, done: () => void) => void): void; | ||
connect(): Promise<PoolClient>; | ||
connect(callback: (err: Error, client: PoolClient, done: () => void) => void): void; | ||
@@ -91,12 +112,14 @@ end(): Promise<void>; | ||
query(queryStream: QueryConfig & stream.Readable): stream.Readable; | ||
query(queryConfig: QueryArrayConfig): Promise<QueryArrayResult>; | ||
query(queryConfig: QueryConfig): Promise<QueryResult>; | ||
query(queryText: string, values?: any[]): Promise<QueryResult>; | ||
query(queryConfig: QueryArrayConfig, callback: (err: Error, result: QueryArrayResult) => void): Query; | ||
query(queryTextOrConfig: string | QueryConfig, callback: (err: Error, result: QueryResult) => void): Query; | ||
query(queryText: string, values: any[], callback: (err: Error, result: QueryResult) => void): Query; | ||
on(event: "error", listener: (err: Error, client: Client) => void): this; | ||
on(event: "connect" | "acquire", listener: (client: Client) => void): this; | ||
on(event: "error", listener: (err: Error, client: PoolClient) => void): this; | ||
on(event: "connect" | "acquire", listener: (client: PoolClient) => void): this; | ||
} | ||
export class Client extends events.EventEmitter { | ||
export class ClientBase extends events.EventEmitter { | ||
constructor(config: string | ClientConfig); | ||
@@ -107,10 +130,7 @@ | ||
end(): Promise<void>; | ||
end(callback: (err: Error) => void): void; | ||
release(err?: Error): void; | ||
query(queryStream: QueryConfig & stream.Readable): stream.Readable; | ||
query(queryConfig: QueryArrayConfig): Promise<QueryArrayResult>; | ||
query(queryConfig: QueryConfig): Promise<QueryResult>; | ||
query(queryText: string, values?: any[]): Promise<QueryResult>; | ||
query(queryConfig: QueryArrayConfig, callback: (err: Error, result: QueryArrayResult) => void): Query; | ||
query(queryTextOrConfig: string | QueryConfig, callback: (err: Error, result: QueryResult) => void): Query; | ||
@@ -135,2 +155,13 @@ query(queryText: string, values: any[], callback: (err: Error, result: QueryResult) => void): Query; | ||
export class Client extends ClientBase { | ||
constructor(config: string | ClientConfig); | ||
end(): Promise<void>; | ||
end(callback: (err: Error) => void): void; | ||
} | ||
export interface PoolClient extends ClientBase { | ||
release(err?: Error): void; | ||
} | ||
export class Query extends events.EventEmitter { | ||
@@ -137,0 +168,0 @@ on(event: "row", listener: (row: any, result?: ResultBuilder) => void): this; |
{ | ||
"name": "@types/pg", | ||
"version": "7.4.2", | ||
"version": "7.4.3", | ||
"description": "TypeScript definitions for pg", | ||
@@ -24,4 +24,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "716371c95a08812e97ec049d3b636848e4a9bf61692221ec71ee6c5bc7caf6c3", | ||
"typesPublisherContentHash": "8646852022c1a9b682045bedc3e65765793aa5efd14afd732a1b11d757dc2c43", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Sat, 10 Feb 2018 21:44:46 GMT | ||
* Last updated: Tue, 13 Feb 2018 20:54:40 GMT | ||
* Dependencies: events, stream, pg-types, tls, node | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7727
139