-
Notifications
You must be signed in to change notification settings - Fork 9
PgClient
Extends pg.Client
with additional properties
-
Client
↳ PgClient
- addListener
- connect
- copyFrom
- copyTo
- emit
- end
- escapeIdentifier
- escapeLiteral
- eventNames
- getMaxListeners
- listenerCount
- listeners
- off
- on
- once
- pauseDrain
- prependListener
- prependOnceListener
- query
- rawListeners
- removeAllListeners
- removeListener
- resumeDrain
- setMaxListeners
+ new PgClient(config?
: string | ClientConfig): PgClient
Inherited from PgClient.constructor
Overrides void
Parameters:
Name | Type |
---|---|
config? |
string | ClientConfig |
Returns: PgClient
• appName: string
▸ addListener(event
: string | symbol, listener
: function): this
Inherited from PgClient.addListener
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ connect(): Promise‹void›
Inherited from PgClient.connect
Returns: Promise‹void›
▸ connect(callback
: function): void
Inherited from PgClient.connect
Parameters:
▪ callback: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: void
▸ copyFrom(queryText
: string): stream.Writable
Inherited from PgClient.copyFrom
Parameters:
Name | Type |
---|---|
queryText |
string |
Returns: stream.Writable
▸ copyTo(queryText
: string): stream.Readable
Inherited from PgClient.copyTo
Parameters:
Name | Type |
---|---|
queryText |
string |
Returns: stream.Readable
▸ emit(event
: string | symbol, ...args
: any[]): boolean
Parameters:
Name | Type |
---|---|
event |
string | symbol |
...args |
any[] |
Returns: boolean
▸ end(): Promise‹void›
Returns: Promise‹void›
▸ end(callback
: function): void
Parameters:
▪ callback: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: void
▸ escapeIdentifier(str
: string): string
Inherited from PgClient.escapeIdentifier
Parameters:
Name | Type |
---|---|
str |
string |
Returns: string
▸ escapeLiteral(str
: string): string
Inherited from PgClient.escapeLiteral
Parameters:
Name | Type |
---|---|
str |
string |
Returns: string
▸ eventNames(): Array‹string | symbol›
Inherited from PgClient.eventNames
Returns: Array‹string | symbol›
▸ getMaxListeners(): number
Inherited from PgClient.getMaxListeners
Returns: number
▸ listenerCount(type
: string | symbol): number
Inherited from PgClient.listenerCount
Parameters:
Name | Type |
---|---|
type |
string | symbol |
Returns: number
▸ listeners(event
: string | symbol): Function[]
Inherited from PgClient.listeners
Parameters:
Name | Type |
---|---|
event |
string | symbol |
Returns: Function[]
▸ off(event
: string | symbol, listener
: function): this
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ on(event
: "drain", listener
: function): this
Overrides void
Parameters:
▪ event: "drain"
▪ listener: function
▸ (): void
Returns: this
▸ on(event
: "error" | "notice", listener
: function): this
Overrides void
Parameters:
▪ event: "error" | "notice"
▪ listener: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: this
▸ on(event
: "notification", listener
: function): this
Overrides void
Parameters:
▪ event: "notification"
▪ listener: function
▸ (message
: Notification): void
Parameters:
Name | Type |
---|---|
message |
Notification |
Returns: this
▸ on(event
: "end", listener
: function): this
Overrides void
Parameters:
▪ event: "end"
▪ listener: function
▸ (): void
Returns: this
▸ once(event
: string | symbol, listener
: function): this
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ pauseDrain(): void
Inherited from PgClient.pauseDrain
Returns: void
▸ prependListener(event
: string | symbol, listener
: function): this
Inherited from PgClient.prependListener
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ prependOnceListener(event
: string | symbol, listener
: function): this
Inherited from PgClient.prependOnceListener
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ query<T>(queryStream
: T): T
Type parameters:
▪ T: Submittable
Parameters:
Name | Type |
---|---|
queryStream |
T |
Returns: T
▸ query<R, I>(queryConfig
: QueryArrayConfig‹I›, values?
: I): Promise‹QueryArrayResult‹R››
Type parameters:
▪ R: any[]
▪ I: any[]
Parameters:
Name | Type |
---|---|
queryConfig |
QueryArrayConfig‹I› |
values? |
I |
Returns: Promise‹QueryArrayResult‹R››
▸ query<R, I>(queryConfig
: QueryConfig‹I›): Promise‹QueryResult‹R››
Type parameters:
▪ R: QueryResultRow
▪ I: any[]
Parameters:
Name | Type |
---|---|
queryConfig |
QueryConfig‹I› |
Returns: Promise‹QueryResult‹R››
▸ query<R, I>(queryTextOrConfig
: string | QueryConfig‹I›, values?
: I): Promise‹QueryResult‹R››
Type parameters:
▪ R: QueryResultRow
▪ I: any[]
Parameters:
Name | Type |
---|---|
queryTextOrConfig |
string | QueryConfig‹I› |
values? |
I |
Returns: Promise‹QueryResult‹R››
▸ query<R, I>(queryConfig
: QueryArrayConfig‹I›, callback
: function): void
Type parameters:
▪ R: any[]
▪ I: any[]
Parameters:
▪ queryConfig: QueryArrayConfig‹I›
▪ callback: function
▸ (err
: Error, result
: QueryArrayResult‹R›): void
Parameters:
Name | Type |
---|---|
err |
Error |
result |
QueryArrayResult‹R› |
Returns: void
▸ query<R, I>(queryTextOrConfig
: string | QueryConfig‹I›, callback
: function): void
Type parameters:
▪ R: QueryResultRow
▪ I: any[]
Parameters:
▪ queryTextOrConfig: string | QueryConfig‹I›
▪ callback: function
▸ (err
: Error, result
: QueryResult‹R›): void
Parameters:
Name | Type |
---|---|
err |
Error |
result |
QueryResult‹R› |
Returns: void
▸ query<R, I>(queryText
: string, values
: any[], callback
: function): void
Type parameters:
▪ R: QueryResultRow
▪ I: any[]
Parameters:
▪ queryText: string
▪ values: any[]
▪ callback: function
▸ (err
: Error, result
: QueryResult‹R›): void
Parameters:
Name | Type |
---|---|
err |
Error |
result |
QueryResult‹R› |
Returns: void
▸ rawListeners(event
: string | symbol): Function[]
Inherited from PgClient.rawListeners
Parameters:
Name | Type |
---|---|
event |
string | symbol |
Returns: Function[]
▸ removeAllListeners(event?
: string | symbol): this
Inherited from PgClient.removeAllListeners
Parameters:
Name | Type |
---|---|
event? |
string | symbol |
Returns: this
▸ removeListener(event
: string | symbol, listener
: function): this
Inherited from PgClient.removeListener
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ resumeDrain(): void
Inherited from PgClient.resumeDrain
Returns: void
▸ setMaxListeners(n
: number): this
Inherited from PgClient.setMaxListeners
Parameters:
Name | Type |
---|---|
n |
number |
Returns: this