@effect/sql-pg 4.0.0-rc.118 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -6
- package/dist/PgPool.d.ts +1 -1
- package/dist/PgPool.js +1 -1
- package/package.json +3 -3
- package/src/PgPool.ts +2 -2
package/README.md
CHANGED
|
@@ -5,9 +5,25 @@ An Effect SQL client for PostgreSQL with a native wire-protocol driver.
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm install effect
|
|
8
|
+
npm install effect @effect/sql-pg
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Links
|
|
12
|
+
|
|
13
|
+
- [Website](https://effect.website): documentation, guides, and news.
|
|
14
|
+
- [Reference](https://effect.website/docs/v4/api/sql-pg): API documentation for this package.
|
|
15
|
+
- [Discord](https://discord.gg/effect-ts): ask questions, share what you're building, and talk to the core team.
|
|
16
|
+
- [Community](https://effect.website/community-hub): meetups and events, or bring Effect to your own.
|
|
17
|
+
- [Issues](https://github.com/Effect-TS/effect/issues): bug reports and feature requests.
|
|
18
|
+
|
|
19
|
+
## Let's talk
|
|
20
|
+
|
|
21
|
+
Whether your team is considering Effect, rolling it out, or already running it in production, we'd love to hear from you: what you're building, what works, and what you need from Effect next.
|
|
22
|
+
|
|
23
|
+
- **Talk to the maintainers.** Introduce your team on [Discord](https://discord.gg/effect-ts) or email [contact@effectful.co](mailto:contact@effectful.co). We're happy to connect privately on Slack or Discord for feedback and help with adoption.
|
|
24
|
+
- **Production support.** We're exploring how to better support teams running Effect in production. If your organization has specific support needs, let's discuss them.
|
|
25
|
+
- **Adoption help.** Our [adoption partners](https://effect.website/adoption-partners) offer implementation, consulting, team extension, training, and commercial support.
|
|
26
|
+
|
|
11
27
|
## Session defaults
|
|
12
28
|
|
|
13
29
|
Use `startupParameters` to establish PostgreSQL session defaults when each physical
|
|
@@ -131,8 +147,3 @@ const PostgresLive = PgClient.layer({
|
|
|
131
147
|
|
|
132
148
|
OIDs of user-defined types are assigned per database, so look them up in
|
|
133
149
|
`pg_type` at startup rather than hard-coding them.
|
|
134
|
-
|
|
135
|
-
## Documentation
|
|
136
|
-
|
|
137
|
-
- [Effect website](https://effect.website)
|
|
138
|
-
- [API reference](https://effect.website/docs/v4/api/sql-pg)
|
package/dist/PgPool.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type TypeId = "~@effect/sql-pg/PgPool";
|
|
|
23
23
|
*
|
|
24
24
|
* **Details**
|
|
25
25
|
*
|
|
26
|
-
* The defaults are 0 to 10 connections and a
|
|
26
|
+
* The defaults are 0 to 10 connections and a 60-second idle timeout.
|
|
27
27
|
* `connectionTTL` replaces connections that exceed the configured lifetime.
|
|
28
28
|
* Every connection is used at least once, so a TTL of zero disables reuse.
|
|
29
29
|
*
|
package/dist/PgPool.js
CHANGED
|
@@ -68,7 +68,7 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
|
|
|
68
68
|
min: options.minConnections ?? 0,
|
|
69
69
|
max: maxConnections,
|
|
70
70
|
concurrency: multiplex ? Math.max(1, options.multiplexConcurrency ?? defaultMultiplexConcurrency) : 1,
|
|
71
|
-
timeToLive: options.idleTimeout ?? Duration.seconds(
|
|
71
|
+
timeToLive: options.idleTimeout ?? Duration.seconds(60),
|
|
72
72
|
timeToLiveStrategy: "usage"
|
|
73
73
|
});
|
|
74
74
|
const expired = connection => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/sql-pg",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A PostgreSQL toolkit for Effect",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"@types/node": "^26.6.3",
|
|
52
52
|
"postgres": "^3.4.9",
|
|
53
53
|
"tinybench": "^6.2.0",
|
|
54
|
-
"effect": "^4.0.
|
|
54
|
+
"effect": "^4.0.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"effect": "^4.0.
|
|
57
|
+
"effect": "^4.0.1"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"benchmark:client": "node benchmark/PgClient.ts",
|
package/src/PgPool.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type TypeId = "~@effect/sql-pg/PgPool"
|
|
|
36
36
|
*
|
|
37
37
|
* **Details**
|
|
38
38
|
*
|
|
39
|
-
* The defaults are 0 to 10 connections and a
|
|
39
|
+
* The defaults are 0 to 10 connections and a 60-second idle timeout.
|
|
40
40
|
* `connectionTTL` replaces connections that exceed the configured lifetime.
|
|
41
41
|
* Every connection is used at least once, so a TTL of zero disables reuse.
|
|
42
42
|
*
|
|
@@ -160,7 +160,7 @@ export const make = Effect.fnUntraced(function*(options: Config): Effect.fn.Retu
|
|
|
160
160
|
concurrency: multiplex
|
|
161
161
|
? Math.max(1, options.multiplexConcurrency ?? defaultMultiplexConcurrency)
|
|
162
162
|
: 1,
|
|
163
|
-
timeToLive: options.idleTimeout ?? Duration.seconds(
|
|
163
|
+
timeToLive: options.idleTimeout ?? Duration.seconds(60),
|
|
164
164
|
timeToLiveStrategy: "usage"
|
|
165
165
|
})
|
|
166
166
|
|