1+ <div align =" center " >
2+
13# deno-postgres
24
3- ![ Build Status] ( https://img.shields.io/github/workflow/status/denodrivers/postgres/ci?label=Build&logo=github&style=flat-square )
4- [ ![ 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+ <img src =" ./docs/deno-postgres.png " width =" 164 " style =" padding-bottom :20px ;" />
6+ </div >
7+
8+ <div align =" center " >
9+
10+ ![ Build Status] ( https://img.shields.io/github/actions/workflow/status/denodrivers/postgres/ci.yml?branch=main&label=Build&logo=github&style=flat-square )
11+ [ ![ Discord server] ( https://img.shields.io/discord/768918486575480863?color=blue&label=Join%20us&logo=discord&style=flat-square )] ( https://discord.com/invite/HEdTCvZUSf )
12+ [ ![ JSR] ( https://jsr.io/badges/@db/postgres?style=flat-square )] ( https://jsr.io/@db/postgres )
13+ [ ![ JSR Score] ( https://jsr.io/badges/@db/postgres/score?style=flat-square )] ( https://jsr.io/@db/postgres )
514[ ![ 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 )
15+ [ ![ 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 )
716[ ![ License] ( https://img.shields.io/github/license/denodrivers/postgres?color=yellowgreen&label=License&style=flat-square )] ( LICENSE )
817
9- A lightweight PostgreSQL driver for Deno focused on developer experience.
10-
11- ` deno-postgres ` is being developed inspired by the excellent work of
18+ A lightweight PostgreSQL driver for Deno focused on developer experience.\
19+ ` deno-postgres ` is inspired by the excellent work of
1220[ node-postgres] ( https://github.com/brianc/node-postgres ) and
1321[ pq] ( https://github.com/lib/pq ) .
1422
23+ </div >
24+
1525## Documentation
1626
17- The documentation is available on the ` deno-postgres ` website
18- [ https:// deno-postgres.com/ ] ( https://deno-postgres.com/ )
27+ The documentation is available on the
28+ [ ` deno-postgres ` ] ( https://deno-postgres.com/ ) website.
1929
20- Join the [ Discord] ( https://discord.gg/ HEdTCvZUSf ) as well! It's a good place to
21- discuss bugs and features before opening issues.
30+ Join the [ Discord] ( https://discord.com/invite/ HEdTCvZUSf ) as well! It's a good
31+ place to discuss bugs and features before opening issues.
2232
2333## Examples
2434
2535``` ts
2636// deno run --allow-net --allow-read mod.ts
27- import { Client } from " https://deno.land/x/ postgres/mod.ts " ;
37+ import { Client } from " jsr:@db/ postgres" ;
2838
2939const client = new Client ({
3040 user: " user" ,
3141 database: " test" ,
3242 hostname: " localhost" ,
3343 port: 5432 ,
3444});
45+
3546await client .connect ();
3647
3748{
@@ -59,6 +70,42 @@ await client.connect();
5970await client .end ();
6071```
6172
73+ ## Deno compatibility
74+
75+ Due to breaking changes introduced in the unstable APIs ` deno-postgres ` uses,
76+ there has been some fragmentation regarding what versions of Deno can be used
77+ alongside the driver.
78+
79+ This situation will stabilize as ` deno-postgres ` approach version 1.0.
80+
81+ | Deno version | Min driver version | Max version | Note |
82+ | ------------- | ------------------ | ----------- | -------------------------------------------------------------------------- |
83+ | 1.8.x | 0.5.0 | 0.10.0 | |
84+ | 1.9.0 | 0.11.0 | 0.11.1 | |
85+ | 1.9.1 and up | 0.11.2 | 0.11.3 | |
86+ | 1.11.0 and up | 0.12.0 | 0.12.0 | |
87+ | 1.14.0 and up | 0.13.0 | 0.13.0 | |
88+ | 1.16.0 | 0.14.0 | 0.14.3 | |
89+ | 1.17.0 | 0.15.0 | 0.17.1 | |
90+ | 1.40.0 | 0.17.2 | 0.19.3 | 0.19.3 and down are available in [ deno.land] ( https://deno.land/x/postgres ) |
91+ | 2.0.0 and up | 0.19.4 | - | Available on JSR! [ ` @db/postgres ` ] ( https://jsr.io/@db/postgres ) |
92+
93+ ## Breaking changes
94+
95+ Although ` deno-postgres ` is reasonably stable and robust, it is a WIP, and we're
96+ still exploring the design. Expect some breaking changes as we reach version 1.0
97+ and enhance the feature set. Please check the
98+ [ Releases] ( https://github.com/denodrivers/postgres/releases ) for more info on
99+ breaking changes. Please reach out if there are any undocumented breaking
100+ changes.
101+
102+ ## Found issues?
103+
104+ Please
105+ [ file an issue] ( https://github.com/denodrivers/postgres/issues/new/choose ) with
106+ any problems with the driver. If you would like to help, please look at the
107+ issues as well. You can pick up one of them and try to implement it.
108+
62109## Contributing
63110
64111### Prerequisites
@@ -73,8 +120,8 @@ await client.end();
73120 it to run the linter and formatter locally
74121
75122 - https://deno.land/
76- - ` deno upgrade --version 1.40.0 `
77- - ` dvm install 1.40.0 && dvm use 1.40.0 `
123+ - ` deno upgrade stable `
124+ - ` dvm install stable && dvm use stable `
78125
79126- You don't need to install Postgres locally on your machine to test the
80127 library; it will run as a service in the Docker container when you build it
@@ -86,8 +133,8 @@ result assertions.
86133
87134To run the tests, run the following commands:
88135
89- 1 . ` docker- compose build tests `
90- 2 . ` docker- compose run tests `
136+ 1 . ` docker compose build tests `
137+ 2 . ` docker compose run tests `
91138
92139The build step will check linting and formatting as well and report it to the
93140command line
@@ -96,8 +143,8 @@ It is recommended that you don't rely on any previously initialized data for
96143your tests instead create all the data you need at the moment of running the
97144tests
98145
99- For example, the following test will create a temporal table that will disappear
100- once the test has been completed
146+ For example, the following test will create a temporary table that will
147+ disappear once the test has been completed
101148
102149``` ts
103150Deno .test (" INSERT works correctly" , async () => {
@@ -134,41 +181,6 @@ a local testing environment, as shown in the following steps:
1341813 . Run the tests manually by using the command\
135182 ` deno test -A `
136183
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-
172184## Contributing guidelines
173185
174186When contributing to the repository, make sure to:
@@ -194,5 +206,5 @@ preserved their individual licenses and copyrights.
194206
195207Everything is licensed under the MIT License.
196208
197- All additional work is copyright 2018 - 2024 — Bartłomiej Iwańczuk, Steven
209+ All additional work is copyright 2018 - 2025 — Bartłomiej Iwańczuk, Steven
198210Guerrero, Hector Ayala — All rights reserved.
0 commit comments