Changelog
v3.0.3 - 4 Apr 2022
Changelog
v3.0.2 - 31 Mar 2022
Changelog
v3.0.1 - 30 Mar 2022
Changelog
v3.0.0 - 24 Mar 2022
This is a complete rewrite to better support all the features that I was trying to get into v2. There are a few breaking changes from v2 beta, which some (myself included) was using in production, so I'm skipping a stable v2 release and going straight to v3.
Here are some of the new things available, but check the updated docs.
ParameterDescription
.describe()
to only get query input types and column definitionsmax_lifetime
for connectionsResult
arrays (previously cursor 1 would return a row object, where > 1 would return an array of rows).writable()
and .readable()
is now async (returns a Promise that resolves to the stream).execute()
is manually called..stream()
is renamed to .forEach
Result
class extending Array
instead of an Array with extra properties (actually shouldn't be breaking unless you're doing something funny)sql()
in queries are now always quotedidle_timeout
select count(*)
because count()
returns a 64 bit integer (int8), so if you know your count()
won't be too big for a js number just cast in your query to int4 like select count(*)::int