@vibeorm/adapter-bun 5.0.3 → 6.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 +11 -11
- package/dist/bun-version.d.ts +0 -9
- package/dist/config.d.ts +7 -12
- package/dist/connection-url.d.ts +11 -6
- package/dist/index.d.ts +15 -13
- package/dist/index.js +9 -11
- package/dist/index.js.map +8 -8
- package/dist/params.d.ts +11 -17
- package/dist/template-cache.d.ts +4 -4
- package/package.json +5 -5
package/dist/params.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parameter serialization for bun:sql: the values node-postgres would send.
|
|
3
3
|
*
|
|
4
|
-
* Live-verified
|
|
4
|
+
* Live-verified (`tests/node-postgres-parity.live.test.ts`):
|
|
5
5
|
* - bun:sql types a JS number itself (int32 → `int4`, anything else →
|
|
6
6
|
* `float8`) and lets the SERVER cast from that type, so numbers, bigints and
|
|
7
7
|
* booleans go out as text and the server reads them as the slot's own type;
|
|
8
|
-
* - a
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* - a scalar list reaches the server as the PostgreSQL array literal
|
|
9
|
+
* node-postgres sends ({@link toPgArrayLiteral}, what the adapter's
|
|
10
|
+
* `formatArrayParam` returns), so one rule covers every element type: bun:sql
|
|
11
|
+
* types a plain JS array only for built-in element types, not for an enum
|
|
12
|
+
* array;
|
|
13
13
|
* - with NAMED statements (`preparedStatements: true`) bun:sql learns each
|
|
14
14
|
* slot's type first and JSON-encodes whatever is bound to a `json`/`jsonb`
|
|
15
15
|
* slot, a string included; with unnamed statements (the default) a string is
|
|
@@ -42,17 +42,11 @@
|
|
|
42
42
|
export declare function toPgArrayLiteral(values: readonly unknown[]): string;
|
|
43
43
|
/**
|
|
44
44
|
* `Date` → UTC ISO-8601 text (`2026-03-08T19:38:08.538Z`), the same spelling
|
|
45
|
-
* the array literal above uses
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* (Coordinated Universal Time)` — which the server rejects in every host TZ
|
|
51
|
-
* (live on Bun 1.4.3: `invalid input syntax for type date` under UTC, `time
|
|
52
|
-
* zone "gmt-0400" not recognized` under America/New_York). The ISO text
|
|
53
|
-
* parses for all three, and pins the UTC wall-clock contract the codec table
|
|
54
|
-
* and the other postgres adapters share. Dates the ISO form cannot spell
|
|
55
|
-
* (invalid, BC, beyond year 9999) keep the driver's serializer.
|
|
45
|
+
* the array literal above uses, whatever type the server resolves for the
|
|
46
|
+
* slot: a zone-less `timestamp` or `date` stores the UTC wall-clock, the
|
|
47
|
+
* contract the codec table and the other postgres adapters share. Dates the
|
|
48
|
+
* ISO form cannot spell (invalid, BC, beyond year 9999) keep the driver's
|
|
49
|
+
* serializer.
|
|
56
50
|
*/
|
|
57
51
|
export declare function serializeDate(params: {
|
|
58
52
|
value: Date;
|
package/dist/template-cache.d.ts
CHANGED
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
* The cache is LRU-bounded so a long-running process never grows it without
|
|
22
22
|
* limit.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* bun:sql's `sql.unsafe(text, values)` names its statement too (B-04), so the
|
|
25
|
+
* adapter uses the template only for a text whose placeholders are not
|
|
26
|
+
* `$1 … $n` in order with exactly n values, or that binds no value; the scan
|
|
27
|
+
* still decides which.
|
|
28
28
|
*/
|
|
29
29
|
/** A SQL text split for bun:sql, with the placeholder index behind each gap. */
|
|
30
30
|
export type PreparedTemplate = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeorm/adapter-bun",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "bun:sql (Postgres) adapter for VibeORM v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"orm",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"LICENSE"
|
|
41
41
|
],
|
|
42
42
|
"engines": {
|
|
43
|
-
"bun": ">=1.4.
|
|
43
|
+
"bun": ">=1.4.4"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@vibeorm/runtime": "5.
|
|
47
|
-
"@vibeorm/schema": "5.
|
|
48
|
-
"@vibeorm/sql": "5.
|
|
46
|
+
"@vibeorm/runtime": "5.4.1",
|
|
47
|
+
"@vibeorm/schema": "5.3.0",
|
|
48
|
+
"@vibeorm/sql": "5.3.0"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|