@vibeorm/adapter-pg 4.3.0 → 5.0.0

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.
@@ -57,10 +57,23 @@ export declare function placePlanCacheMode(params: {
57
57
  export declare function assertIdleTimeout(params: {
58
58
  value: unknown;
59
59
  }): number;
60
+ /**
61
+ * Validate a `min` option value (V7): an integer from 0 through the pool's
62
+ * `max`. pg-pool never idle-closes a connection while the pool holds `min` or
63
+ * fewer; it does not open them in advance (`adapter.connect()` does).
64
+ *
65
+ * @throws VibeError `VIBE_CONFIG` (`meta.reason: "invalid-pool-min"`).
66
+ */
67
+ export declare function assertPoolMin(params: {
68
+ value: unknown;
69
+ max: number;
70
+ }): number;
60
71
  /** Build the `pg.Pool` constructor config for an adapter-owned pool. */
61
72
  export declare function buildPoolConfig(params: {
62
73
  connectionString: string | undefined;
63
74
  max: number;
75
+ /** Connections pg-pool keeps open however long they idle (pg-pool's `min`). Absent = pg-pool's 0. */
76
+ min?: number;
64
77
  statementTimeout?: number;
65
78
  connectionTimeout?: number;
66
79
  /** Milliseconds an idle pooled connection stays open (pg-pool's `idleTimeoutMillis`; `0` = never closed). Absent = pg-pool's 10 000. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeorm/adapter-pg",
3
- "version": "4.3.0",
3
+ "version": "5.0.0",
4
4
  "description": "node-postgres adapter for VibeORM v2 — Bun or Node.js",
5
5
  "keywords": [
6
6
  "orm",
@@ -45,8 +45,8 @@
45
45
  "bun": ">=1.2.0"
46
46
  },
47
47
  "dependencies": {
48
- "@vibeorm/runtime": "4.3.0",
49
- "@vibeorm/schema": "4.3.0"
48
+ "@vibeorm/runtime": "5.0.0",
49
+ "@vibeorm/schema": "5.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "pg": ">=8"