@vibeorm/adapter-pg 5.0.1 → 5.1.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.
@@ -83,4 +83,29 @@ export declare function createStatementNameCache(params: {
83
83
  max: number;
84
84
  promoteAfter?: number;
85
85
  }): StatementNameCache;
86
+ /**
87
+ * The texts behind the caller-chosen statement names of the raw path
88
+ * (throughput request 1), shared per pool like {@link StatementNameCache}.
89
+ * One name means ONE text: node-postgres refuses a second text under a name
90
+ * only on a connection that already prepared it, so the same caller bug would
91
+ * fail on some connections and pass on others. The registry refuses it at the
92
+ * call, before anything is sent, on every connection alike.
93
+ *
94
+ * Unbounded on purpose: the names are a caller's fixed set (each one is also
95
+ * prepared on every connection that runs it); a name per value would grow the
96
+ * server's prepared statements just as much.
97
+ */
98
+ export type RawStatementNames = {
99
+ /**
100
+ * Admit `name` for `text`: the first text a name is used with is its text
101
+ * for the pool's lifetime. A different text is refused with
102
+ * `VIBE_VALIDATION`, `meta.reason: "statement-name-reused"`.
103
+ */
104
+ admit(params: {
105
+ name: string;
106
+ text: string;
107
+ }): void;
108
+ };
109
+ /** Create an empty {@link RawStatementNames} registry. */
110
+ export declare function createRawStatementNames(): RawStatementNames;
86
111
  //# sourceMappingURL=statement-cache.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeorm/adapter-pg",
3
- "version": "5.0.1",
3
+ "version": "5.1.1",
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": "5.1.0",
49
- "@vibeorm/schema": "5.0.0"
48
+ "@vibeorm/runtime": "5.3.0",
49
+ "@vibeorm/schema": "5.2.0"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "pg": ">=8"