Class Client

Hierarchy

Index

Constructor methods

Methods

Constructor methods

constructor(connection: string): Client

Parameters

  • connection: string

Returns

Client

constructor(config: ClientConfig): Client

Parameters

Returns

Client

Methods

public addListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public connect(callback?: (err: Error) => void)

Parameters

  • callback?: (err: Error) => void optional

public copyFrom(queryText: string): Writable

Parameters

  • queryText: string

Returns

Writable

public copyTo(queryText: string): Readable

Parameters

  • queryText: string

Returns

Readable

public emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

public end()

public listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

public on(event: ""drain"", listener: () => void): Client

Parameters

  • event: ""drain""
  • listener: () => void

Returns

Client

public on(event: ""error"", listener: (err: Error) => void): Client

Parameters

  • event: ""error""
  • listener: (err: Error) => void

Returns

Client

public on(event: ""notification"", listener: (message: any) => void): Client

Parameters

  • event: ""notification""
  • listener: (message: any) => void

Returns

Client

public on(event: ""notice"", listener: (message: any) => void): Client

Parameters

  • event: ""notice""
  • listener: (message: any) => void

Returns

Client

public on(event: string, listener: Function): Client

Parameters

  • event: string
  • listener: Function

Returns

Client

public once(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public pauseDrain()

public query(queryText: string, callback?: (err: Error, result: "pg".QueryResult) => void): Query

Parameters

  • queryText: string
  • callback?: (err: Error, result: "pg".QueryResult) => void optional

Returns

Query

public query(config: QueryConfig, callback?: (err: Error, result: "pg".QueryResult) => void): Query

Parameters

  • config: QueryConfig
  • callback?: (err: Error, result: "pg".QueryResult) => void optional

Returns

Query

public query(queryText: string, values: Array<any>, callback?: (err: Error, result: "pg".QueryResult) => void): Query

Parameters

  • queryText: string
  • values: Array<any>
  • callback?: (err: Error, result: "pg".QueryResult) => void optional

Returns

Query

public removeAllListeners(event?: string): EventEmitter

Parameters

  • event?: string optional

Returns

EventEmitter

public removeListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public resumeDrain()

public setMaxListeners(n: number)

Parameters

  • n: number