Alex Sherwin
6ce9368ebd
Existing "QueryResult" interface is missing property "fields"
...
only the array "QueryArrayResult" variant contained the "fields"
property
Added a new "QueryResultBase" interface with the shared set of
fields between the single/array results and refactored both
QueryResult and QueryArrayResult to extend from it, each now
only needing to specify their own type variation of the "row"
property for the type of results they contain (single vs array)
Modified the tests to reference the "fields" array on single
select results similarly to how it was done for the array
select results
2018-03-01 16:40:46 -05:00
Alex Sherwin
88f695c16c
Changing import of types to use named variants instead of an aliased
...
module
When "pg-native" is not available, importing the module as a wildcard
after tsc transpilation can cause the runtime to invoke the getter
for the 'native' export, which will print an annoying message from
the runtime (node, etc):
"Cannot find module 'pg-native'"
2018-03-01 00:27:30 -05:00
Daniel Rosenwasser
5c1e9e9a0f
Merge pull request #23661 from baszczewski/patch-3
...
add missing "remove" event
2018-02-15 10:55:45 -08:00
Marcin Baszczewski
0a610caae6
add missing "remove" event
...
API:
https://node-postgres.com/api/pool#-code-pool-on-39-remove-39-client-client-gt-void-gt-void-code-
2018-02-15 09:37:02 +01:00
Andy Hanson
45c9246c09
Remove esModuleInterop from tsconfigs (no longer mandatory)
2018-02-14 14:55:13 -08:00
Daniel Rosenwasser
27e260259e
Merge pull request #23615 from hoo29/master
...
[node] undo TlsOptions name change
2018-02-13 12:13:32 -08:00
Daniel Rosenwasser
73c5362f5d
Merge pull request #23282 from evs-chris/master
...
[pg] array mode query results and pooled vs non client release/end
2018-02-13 11:59:27 -08:00
Huw McNamara
6c98b1f3d8
undid TlsOptions name change
2018-02-13 18:25:43 +00:00
Daniel Rosenwasser
45e71c9c2b
Merge pull request #23393 from hoo29/master
...
[node] tidied up and de-duplicated tls related options
2018-02-10 10:34:57 -08:00
Huw McNamara
e00c71172a
fixed deps, add local pick def
2018-02-06 19:21:36 +00:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs ( #23354 )
2018-02-05 11:01:56 -08:00
Chris Reeves
429ba7aab3
[pg] differentiate between pooled and non-pooled clients (release vs end)
2018-01-30 04:16:05 -05:00
Chris Reeves
29e106a36b
[pg] add special types for array mode queries
2018-01-30 04:14:51 -05:00
Armando Aguirre
47c928bdc9
Merge pull request #21610 from benny-medflyt/patch-3
...
pg: Client constructor still accepts a string
2017-12-01 14:41:06 -08:00
Chris Chares
afabeda5cb
Increment version number
2017-11-21 15:52:19 -07:00
Chris Chares
63fe52f302
Add "rowMode?: string" to QueryConfig
2017-11-21 15:45:22 -07:00
benny-medflyt
5054ffa5fe
Client constructor still accepts a string
2017-11-18 12:26:33 +02:00
Andy
19f89399e4
Ensure every package has a tslint.json ( #21009 )
...
* Ensure every package has a tslint.json
* Fixes
2017-10-25 11:13:50 -07:00
Andy
947a8fb761
Enable strictFunctionTypes ( #20373 )
2017-10-06 14:03:03 -07:00
Andy
c44ab23fb9
Prefer relative imports for packages that import theirselves ( #20034 )
2017-09-26 10:29:06 -07:00
Tanner Doshier
eef993565c
[pg] Client.connect() returns void not a Client ( #19918 )
...
https://node-postgres.com/api/client#-code-client-connect-gt-promise-lt-void-gt-code-
2017-09-25 16:07:36 -07:00
André Wachter
6dbdffc8e7
[pg] Add Client.escapeIdentifier() and Client.escapeLiteral()
...
See:
https://github.com/brianc/node-postgres/blob/master/lib/client.js#L306
https://github.com/brianc/node-postgres/blob/master/lib/client.js#L324
2017-09-15 09:00:22 +02:00
André Wachter
9f88e46d7f
[pg] Event "notice" is an alias of "error", not "notification"
...
e087305f31/lib/connection.js (L577-L582)
2017-09-11 13:55:52 +02:00
Nathan Shively-Sanders
acec1047ac
Merge pull request #19477 from andrew8er/feature/reexport_module_as_native
...
[pg] Reexport the 'pg' module under an attribute 'native'
2017-09-06 10:51:28 -07:00
Leo Liang
402433d3b4
Fix error after merge master
2017-09-06 14:10:22 +08:00
Leo Liang
b81e4ed29f
Merge branch 'master' into pg
2017-09-06 11:58:10 +08:00
André Wachter
e84cf3ef7b
[pg]: Add a "Notification" type and pass it to the notification event listener
...
See: https://node-postgres.com/api/client#client-on-39-notification-39-notification-notification-gt-void-gt-void
2017-09-01 14:31:45 +02:00
Leo Liang
6e75e3644b
Copy v6 types to its folder
2017-08-31 17:57:20 +08:00
André Wachter
84b7de8cef
[pg] Reexport the 'pg' module under an attribute 'native'
...
Gives optional access to the native client if installed.
2017-08-31 11:05:07 +02:00
Leo Liang
adcf24f32d
Add connectionString property to the config object
2017-08-30 10:55:55 +08:00
Leo Liang
3bc2634b09
Fix lint rule no-void-expression
2017-08-28 10:56:04 +08:00
Leo Liang
84a47dcbeb
New test rule expects a github URL.
2017-08-28 10:51:30 +08:00
Leo Liang
a26b2c6e97
Remove properties which are no more available in pg 7.1
2017-08-28 10:51:30 +08:00
Leo Liang
854a2af8e5
Add properties totalCount, idleCount, waitingCount
2017-08-28 10:51:30 +08:00
Leo Liang
3653eef83f
Update to pg 7.1 API
2017-08-28 10:51:30 +08:00
Leo Liang
59035dd08e
Fix review comment
2017-08-28 10:51:30 +08:00
Leo Liang
582bba204d
Update typing for pg
2017-08-28 10:51:30 +08:00
George MacKerron
ae0493cdc6
Updated ClientConfig to accept TlsOptions instead of just boolean ( #18117 )
2017-07-21 09:48:38 -07:00
Lei Zhao
2f8f2a6321
Pool.end() accepts an optional callback param
2017-07-04 13:39:18 -07:00
Andy Hanson
c15e214e5a
bluebird: Make Thenable an alias to the builtin PromiseLike.
2017-06-16 09:02:18 -07:00
Aaron Petcoff
ee909ca497
duh forgot to add the word 'from'
2017-05-25 17:49:47 -04:00
Aaron Petcoff
7309ef4498
adds promise to PoolConfig in pg
2017-05-25 17:40:39 -04:00
John Maxwell
abef2dd282
[pg] Allow QueryConfig based queries rather than just string queries ( #16293 )
...
* feat: Allow QueryConfig based queries
* Harmonise pg.Client and pg.Pool query signatures
2017-05-04 13:08:11 -07:00
Charles Samborski
63a4b24ee1
[pg] Add the error parameter to Client.release
...
Client.release accepts an optional error parameter to destroy
the client instead of returning it to the pool in case of failure.
2017-04-18 11:43:44 +02:00
Andy Hanson
354cec620d
Move all packages to a types directory
2017-03-24 14:27:52 -07:00