22
33![ Build Status] ( https://img.shields.io/github/actions/workflow/status/denodrivers/postgres/ci.yml?branch=main&label=Build&logo=github&style=flat-square )
44[ ![ Discord server] ( https://img.shields.io/discord/768918486575480863?color=blue&label=Ask%20for%20help%20here&logo=discord&style=flat-square )] ( https://discord.gg/HEdTCvZUSf )
5+ [ ![ JSR] ( https://jsr.io/badges/@db/postgres?style=flat-square )] ( https://jsr.io/@db/postgres )
6+ [ ![ JSR Score] ( https://jsr.io/badges/@db/postgres/score?style=flat-square )] ( https://jsr.io/@db/postgres )
57[ ![ Manual] ( https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square )] ( https://deno-postgres.com )
6- [ ![ Documentation] ( https://img.shields.io/github/v/release/denodrivers/postgres?color=yellow&label=Documentation&logo=deno&style=flat-square )] ( https://doc.deno.land/https/deno.land/x/ postgres/mod.ts )
8+ [ ![ Documentation] ( https://img.shields.io/github/v/release/denodrivers/postgres?color=yellow&label=Documentation&logo=deno&style=flat-square )] ( https://jsr.io/@db/ postgres/doc )
79[ ![ License] ( https://img.shields.io/github/license/denodrivers/postgres?color=yellowgreen&label=License&style=flat-square )] ( LICENSE )
810
911A lightweight PostgreSQL driver for Deno focused on developer experience.
1012
11- ` deno-postgres ` is being developed inspired by the excellent work of
13+ ` deno-postgres ` is inspired by the excellent work of
1214[ node-postgres] ( https://github.com/brianc/node-postgres ) and
1315[ pq] ( https://github.com/lib/pq ) .
1416
1517## Documentation
1618
17- The documentation is available on the ` deno-postgres ` website
18- [ https:// deno-postgres.com/ ] ( https://deno-postgres.com/ )
19+ The documentation is available on the
20+ [ ` deno-postgres ` website ] ( https://deno-postgres.com/ ) .
1921
2022Join the [ Discord] ( https://discord.gg/HEdTCvZUSf ) as well! It's a good place to
2123discuss bugs and features before opening issues.
@@ -24,14 +26,15 @@ discuss bugs and features before opening issues.
2426
2527``` ts
2628// deno run --allow-net --allow-read mod.ts
27- import { Client } from " https://deno.land/x/ postgres/mod.ts " ;
29+ import { Client } from " jsr:@db/ postgres" ;
2830
2931const client = new Client ({
3032 user: " user" ,
3133 database: " test" ,
3234 hostname: " localhost" ,
3335 port: 5432 ,
3436});
37+
3538await client .connect ();
3639
3740{
@@ -59,6 +62,40 @@ await client.connect();
5962await client .end ();
6063```
6164
65+ ## Deno compatibility
66+
67+ Due to breaking changes introduced in the unstable APIs ` deno-postgres ` uses,
68+ there has been some fragmentation regarding what versions of Deno can be used
69+ alongside the driver.
70+
71+ This situation will stabilize as ` deno-postgres ` approach version 1.0.
72+
73+ | Deno version | Min driver version | Max version | Note |
74+ | ------------- | ------------------ | ------------------- | ------------------------------------------------------------------------------ |
75+ | 1.8.x | 0.5.0 | 0.10.0 | |
76+ | 1.9.0 | 0.11.0 | 0.11.1 | |
77+ | 1.9.1 and up | 0.11.2 | 0.11.3 | |
78+ | 1.11.0 and up | 0.12.0 | 0.12.0 | |
79+ | 1.14.0 and up | 0.13.0 | 0.13.0 | |
80+ | 1.16.0 | 0.14.0 | 0.14.3 | |
81+ | 1.17.0 | 0.15.0 | 0.17.1 | |
82+ | 1.40.0 | 0.17.2 | currently supported | 0.17.2 [ on JSR] ( https://jsr.io/@bartlomieju/postgres ) |
83+ | 2.0.0 and up | 0.19.4 | currently supported | All versions available as [ ` @db/postgres ` on JSR] ( https://jsr.io/@db/postgres ) |
84+
85+ ## Breaking changes
86+
87+ Although ` deno-postgres ` is reasonably stable and robust, it is a WIP, and we're
88+ still exploring the design. Expect some breaking changes as we reach version 1.0
89+ and enhance the feature set. Please check the Releases for more info on breaking
90+ changes. Please reach out if there are any undocumented breaking changes.
91+
92+ ## Found issues?
93+
94+ Please
95+ [ file an issue] ( https://github.com/denodrivers/postgres/issues/new/choose ) with
96+ any problems with the driver. If you would like to help, please look at the
97+ issues as well. You can pick up one of them and try to implement it.
98+
6299## Contributing
63100
64101### Prerequisites
@@ -73,8 +110,8 @@ await client.end();
73110 it to run the linter and formatter locally
74111
75112 - https://deno.land/
76- - ` deno upgrade --version 1.40.0 `
77- - ` dvm install 1.40.0 && dvm use 1.40.0 `
113+ - ` deno upgrade stable `
114+ - ` dvm install stable && dvm use stable `
78115
79116- You don't need to install Postgres locally on your machine to test the
80117 library; it will run as a service in the Docker container when you build it
@@ -96,8 +133,8 @@ It is recommended that you don't rely on any previously initialized data for
96133your tests instead create all the data you need at the moment of running the
97134tests
98135
99- For example, the following test will create a temporal table that will disappear
100- once the test has been completed
136+ For example, the following test will create a temporary table that will
137+ disappear once the test has been completed
101138
102139``` ts
103140Deno .test (" INSERT works correctly" , async () => {
@@ -134,41 +171,6 @@ a local testing environment, as shown in the following steps:
1341713 . Run the tests manually by using the command\
135172 ` deno test -A `
136173
137- ## Deno compatibility
138-
139- Due to breaking changes introduced in the unstable APIs ` deno-postgres ` uses,
140- there has been some fragmentation regarding what versions of Deno can be used
141- alongside the driver.
142-
143- This situation will stabilize as ` std ` and ` deno-postgres ` approach version 1.0.
144-
145- | Deno version | Min driver version | Max driver version | Note |
146- | ------------- | ------------------ | ------------------ | -------------------- |
147- | 1.8.x | 0.5.0 | 0.10.0 | |
148- | 1.9.0 | 0.11.0 | 0.11.1 | |
149- | 1.9.1 and up | 0.11.2 | 0.11.3 | |
150- | 1.11.0 and up | 0.12.0 | 0.12.0 | |
151- | 1.14.0 and up | 0.13.0 | 0.13.0 | |
152- | 1.16.0 | 0.14.0 | 0.14.3 | |
153- | 1.17.0 | 0.15.0 | 0.17.1 | |
154- | 1.40.0 | 0.17.2 | | Now available on JSR |
155-
156- ## Breaking changes
157-
158- Although ` deno-postgres ` is reasonably stable and robust, it is a WIP, and we're
159- still exploring the design. Expect some breaking changes as we reach version 1.0
160- and enhance the feature set. Please check the Releases for more info on breaking
161- changes. Please reach out if there are any undocumented breaking changes.
162-
163- ## Found issues?
164-
165- Please
166- [ file an issue] ( https://github.com/denodrivers/postgres/issues/new/choose ) with
167- any problems with the driver in this repository's issue section. If you would
168- like to help, please look at the
169- [ issues] ( https://github.com/denodrivers/postgres/issues ) as well. You can pick
170- up one of them and try to implement it.
171-
172174## Contributing guidelines
173175
174176When contributing to the repository, make sure to:
@@ -194,5 +196,5 @@ preserved their individual licenses and copyrights.
194196
195197Everything is licensed under the MIT License.
196198
197- All additional work is copyright 2018 - 2024 — Bartłomiej Iwańczuk, Steven
199+ All additional work is copyright 2018 - 2025 — Bartłomiej Iwańczuk, Steven
198200Guerrero, Hector Ayala — All rights reserved.
0 commit comments