Skip to content

Commit 153efed

Browse files
update documentation
1 parent a189901 commit 153efed

6 files changed

Lines changed: 70 additions & 71 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM denoland/deno:alpine-2.1.4
1+
FROM denoland/deno:alpine-2.2.11
22
WORKDIR /app
33

44
# Install wait utility

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-2022 Bartłomiej Iwańczuk and Steven Guerrero
3+
Copyright (c) 2018-2025 Bartłomiej Iwańczuk, Steven Guerrero, and Hector Ayala
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
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

911
A 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

2022
Join the [Discord](https://discord.gg/HEdTCvZUSf) as well! It's a good place to
2123
discuss bugs and features before opening issues.
@@ -32,6 +34,7 @@ const client = new Client({
3234
hostname: "localhost",
3335
port: 5432,
3436
});
37+
3538
await client.connect();
3639

3740
{
@@ -59,6 +62,40 @@ await client.connect();
5962
await 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
96133
your tests instead create all the data you need at the moment of running the
97134
tests
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
103140
Deno.test("INSERT works correctly", async () => {
@@ -134,41 +171,6 @@ a local testing environment, as shown in the following steps:
134171
3. 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

174176
When contributing to the repository, make sure to:
@@ -194,5 +196,5 @@ preserved their individual licenses and copyrights.
194196

195197
Everything 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
198200
Guerrero, Hector Ayala — All rights reserved.

docs/README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# deno-postgres
22

3-
![Build Status](https://img.shields.io/github/workflow/status/denodrivers/postgres/ci?label=Build&logo=github&style=flat-square)
3+
![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-
![Manual](https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square)
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)
7-
![License](https://img.shields.io/github/license/denodrivers/postgres?color=yellowgreen&label=License&style=flat-square)
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)
7+
[![Manual](https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square)](https://deno-postgres.com)
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)
9+
[![License](https://img.shields.io/github/license/denodrivers/postgres?color=yellowgreen&label=License&style=flat-square)](LICENSE)
810

911
`deno-postgres` is a lightweight PostgreSQL driver for Deno focused on user
1012
experience. It provides abstractions for most common operations such as typed
@@ -114,7 +116,7 @@ of search parameters such as the following:
114116
- password: If password is not specified in the url, this will be taken instead
115117
- port: If port is not specified in the url, this will be taken instead
116118
- options: This parameter can be used by other database engines usable through
117-
the Postgres protocol (such as Cockroachdb for example) to send additional
119+
the Postgres protocol (such as CockroachDB for example) to send additional
118120
values for connection (ej: options=--cluster=your_cluster_name)
119121
- sslmode: Allows you to specify the tls configuration for your client; the
120122
allowed values are the following:
@@ -231,9 +233,6 @@ instead of TCP by providing the route to the socket file your Postgres database
231233
creates automatically. You can manually set the protocol used with the
232234
`host_type` property in the client options
233235

234-
**Note**: This functionality is only available on UNIX systems under the
235-
`--unstable` flag
236-
237236
In order to connect to the socket you can pass the path as a host in the client
238237
initialization. Alternatively, you can specify the port the database is
239238
listening on and the parent folder of the socket as a host (The equivalent of
@@ -343,8 +342,8 @@ certificate to encrypt your connection that, if not taken care of, can render
343342
your certificate invalid.
344343

345344
When using a self-signed certificate, make sure to specify the PEM encoded CA
346-
certificate using the `--cert` option when starting Deno (Deno 1.12.2 or later)
347-
or in the `tls.caCertificates` option when creating a client (Deno 1.15.0 later)
345+
certificate using the `--cert` option when starting Deno or in the
346+
`tls.caCertificates` option when creating a client
348347

349348
```ts
350349
const client = new Client({
@@ -1452,7 +1451,7 @@ await transaction.commit();
14521451
The driver can provide different types of logs if as needed. By default, logs
14531452
are disabled to keep your environment as uncluttered as possible. Logging can be
14541453
enabled by using the `debug` option in the Client `controls` parameter. Pass
1455-
`true` to enable all logs, or turn on logs granulary by enabling the following
1454+
`true` to enable all logs, or turn on logs granularity by enabling the following
14561455
options:
14571456

14581457
- `queries` : Logs all SQL queries executed by the client
@@ -1497,7 +1496,7 @@ AS $function$
14971496
BEGIN
14981497
RAISE INFO 'This function generates a random UUID :)';
14991498
RAISE NOTICE 'A UUID takes up 128 bits in memory.';
1500-
RAISE WARNING 'UUIDs must follow a specific format and lenght in order to be valid!';
1499+
RAISE WARNING 'UUIDs must follow a specific format and length in order to be valid!';
15011500
RETURN gen_random_uuid();
15021501
END;
15031502
$function$;;

docs/index.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8">
4+
<meta charset="UTF-8" />
55
<title>Deno Postgres</title>
66
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
77
<meta
88
name="description"
99
content="🦕 Lightweight PostgreSQL driver for Deno focused on developer experience"
10-
>
10+
/>
1111
<meta
1212
name="viewport"
1313
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
14-
>
15-
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
14+
/>
15+
<link
16+
rel="stylesheet"
17+
href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css"
18+
/>
1619
</head>
1720
<body>
1821
<div id="app"></div>
1922
<script>
2023
window.$docsify = {
2124
name: "deno-postgres",
22-
repo: "buildondata/deno-postgres",
25+
repo: "denodrivers/postgres",
2326
};
2427
</script>
25-
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
26-
<script src="//unpkg.com/prismjs/components/prism-typescript.min.js"></script>
28+
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
29+
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-typescript.min.js"></script>
2730
</body>
2831
</html>

mod.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@ export {
55
TransactionError,
66
} from "./client/error.ts";
77
export { Pool } from "./pool.ts";
8-
export { Oid, OidTypes } from "./query/oid.ts";
9-
10-
// TODO
11-
// Remove the following reexports after https://doc.deno.land
12-
// supports two level depth exports
13-
export type { OidType, OidValue } from "./query/oid.ts";
8+
export { Oid, type OidType, OidTypes, type OidValue } from "./query/oid.ts";
149
export type {
1510
ClientOptions,
1611
ConnectionOptions,

0 commit comments

Comments
 (0)