Skip to content

Commit e4e8ee8

Browse files
committed
Add a changelog
1 parent 8c20ed7 commit e4e8ee8

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Changelog
2+
3+
## [3.0.0] - 24 Mar 2022
4+
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.
5+
6+
Here are some of the new things available, but check the updated docs.
7+
- Dynamic query builder based on raw sql
8+
- Realtime subscribe to db changes through logical replication
9+
- Multi-host support for High Availability setups
10+
- Postgres input parameter types from `ParameterDescription`
11+
- Deno support
12+
- Cursors as async iterators
13+
- `.describe()` to only get query input types and column definitions
14+
- Support for Large Objects
15+
- `max_lifetime` for connections
16+
- Cancellation of requests
17+
- Converted to ESM (with CJS support)
18+
- Typescript support (Credit @minigugus)
19+
20+
### Breaking changes from v2 -> v3
21+
- Cursors are always called with `Result` arrays (previously cursor 1 would return a row object, where > 1 would return an array of rows)
22+
- `.writable()` and `.readable()` is now async (returns a Promise that resolves to the stream)
23+
- Queries now returns a lazy promise instead of being executed immediately. This means the query won't be sent until awaited (.then, .catch, .finally is called) or until `.execute()` is manually called.
24+
- `.stream()` is renamed to `.forEach`
25+
- Returned results are now it's own `Result` class extending `Array` instead of an Array with extra properties (actually shouldn't be breaking unless you're doing something funny)
26+
- Parameters are now cast using the types returned from Postgres ParameterDescription with a fallback to the previously inferred types
27+
- Only tested with node v12 and up
28+
- Implicit array value to multiple parameter expansion removed (use sql([...]) instead)
29+
30+
### Breaking changes from v1 -> v2 (v2 never moved on from beta)
31+
- All identifiers from `sql()` in queries are now always quoted
32+
- Undefined parameters are no longer allowed
33+
- Rename timeout option to `idle_timeout`
34+
- Default to 10 connections instead of number of CPUs
35+
- Numbers that cannot be safely cast to JS Number are returned as string. This happens for eg, `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`
36+
37+
## [1.0.2] - 21 Jan 2020
38+
39+
- Fix standard postgres user env var (#20) cce5ad7
40+
- Ensure url or options is not falsy bc549b0
41+
- Add support for dynamic password b2ab9fb
42+
- Fix hiding pass from options 3f76b98
43+
44+
45+
## [1.0.1] - 3 Jan 2020
46+
47+
- Fix #3 url without db and trailing slash 45d4233
48+
- Fix stream promise - resolve with correct result 730df2c
49+
- Fix return value of unsafe query with multiple statements 748f198
50+
- Fix destroy before connected f682ca1
51+
- Fix params usage for file() call without options e4f12a4
52+
- Various Performance improvements
53+
54+
## [1.0.0] - 22 Dec 2019
55+
56+
- Initial release

0 commit comments

Comments
 (0)