四好公路
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

3 years ago
/// <reference types="node" />
import { Transform, TransformCallback, TransformOptions } from 'stream';
import { Mode } from './messages';
export declare type Packet = {
code: number;
packet: Buffer;
};
declare type StreamOptions = TransformOptions & {
mode: Mode;
};
export declare class PgPacketStream extends Transform {
private remainingBuffer;
private reader;
private mode;
constructor(opts?: StreamOptions);
_transform(buffer: Buffer, encoding: string, callback: TransformCallback): void;
private handlePacket;
_flush(callback: TransformCallback): void;
private parseReadyForQueryMessage;
private parseCommandCompleteMessage;
private parseCopyData;
private parseCopyInMessage;
private parseCopyOutMessage;
private parseCopyMessage;
private parseNotificationMessage;
private parseRowDescriptionMessage;
private parseField;
private parseDataRowMessage;
private parseParameterStatusMessage;
private parseBackendKeyData;
parseAuthenticationResponse(offset: number, length: number, bytes: Buffer): any;
private parseErrorMessage;
}
export {};