@zeroxsolutions/db 9.4.0 → 10.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.
- package/CHANGELOG.md +58 -23
- package/README.md +163 -203
- package/dist/base/d1/outbox-table.d.ts.map +1 -1
- package/dist/base/d1/outbox-table.js +9 -1
- package/dist/base/d1/repository.d.ts +75 -66
- package/dist/base/d1/repository.d.ts.map +1 -1
- package/dist/base/d1/repository.js +134 -122
- package/dist/base/postgres/outbox-table.d.ts.map +1 -1
- package/dist/base/postgres/outbox-table.js +9 -1
- package/dist/base/postgres/repository.d.ts +108 -86
- package/dist/base/postgres/repository.d.ts.map +1 -1
- package/dist/base/postgres/repository.js +175 -143
- package/dist/base/read-engine.d.ts +49 -0
- package/dist/base/read-engine.d.ts.map +1 -0
- package/dist/base/read-engine.js +93 -0
- package/dist/utils/filter.d.ts +40 -61
- package/dist/utils/filter.d.ts.map +1 -1
- package/dist/utils/filter.js +51 -85
- package/dist/utils/index.d.ts +3 -5
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -5
- package/dist/utils/read.d.ts +86 -0
- package/dist/utils/read.d.ts.map +1 -0
- package/dist/utils/read.js +124 -0
- package/dist/utils/reads.d.ts +24 -0
- package/dist/utils/reads.d.ts.map +1 -0
- package/dist/utils/reads.js +23 -0
- package/dist/utils/relationships.d.ts +9 -6
- package/dist/utils/relationships.d.ts.map +1 -1
- package/dist/utils/relationships.js +26 -8
- package/package.json +3 -3
- package/dist/utils/assert-queryable-fields.d.ts +0 -27
- package/dist/utils/assert-queryable-fields.d.ts.map +0 -1
- package/dist/utils/assert-queryable-fields.js +0 -47
- package/dist/utils/constants.d.ts +0 -7
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/constants.js +0 -6
- package/dist/utils/include.d.ts +0 -80
- package/dist/utils/include.d.ts.map +0 -1
- package/dist/utils/include.js +0 -132
- package/dist/utils/table-query.d.ts +0 -41
- package/dist/utils/table-query.d.ts.map +0 -1
- package/dist/utils/table-query.js +0 -1
- package/dist/utils/total-order.d.ts +0 -15
- package/dist/utils/total-order.d.ts.map +0 -1
- package/dist/utils/total-order.js +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
# 10.0.0 (2026-10-18)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- ⚠️ **db:** split the base repository as spring data does over a neutral read ([2b6fdba](https://github.com/zeroxsolutions/zeroxsolutions/commit/2b6fdba))
|
|
6
|
+
|
|
7
|
+
### ⚠️ Breaking Changes
|
|
8
|
+
|
|
9
|
+
- **db:** split the base repository as spring data does over a neutral read ([2b6fdba](https://github.com/zeroxsolutions/zeroxsolutions/commit/2b6fdba))
|
|
10
|
+
`findOne`, `findAll(where)`, `findAllAndCount(where)`,
|
|
11
|
+
`count(where)`, `exists`, `update`, `delete`, `softDelete` and `nullifyBy`
|
|
12
|
+
are no longer public; reads take `read`, `filter`, `orderBy`, `limit` and
|
|
13
|
+
`offset` in place of `fields`, `include`, `with`, `sort` and `filter`, have no
|
|
14
|
+
`tx` and no default page window; `TableQuery`, `assertQueryableFields`,
|
|
15
|
+
`buildFilterConditions`, `buildOrderBy`, the filter resolvers,
|
|
16
|
+
`relationshipsOf` (now `relationsOf`) and the page-size constants are gone;
|
|
17
|
+
`BaseRepository` takes `READS` as its fourth argument and
|
|
18
|
+
`BaseViewRepository` its key columns as its third.
|
|
19
|
+
|
|
20
|
+
### ❤️ Thank You
|
|
21
|
+
|
|
22
|
+
- Claude Opus 5.5
|
|
23
|
+
- Lương Văn Tú
|
|
24
|
+
|
|
25
|
+
## 9.5.0 (2026-10-16)
|
|
26
|
+
|
|
27
|
+
### 🚀 Features
|
|
28
|
+
|
|
29
|
+
- **db:** index the outbox's unpublished rows alone, by type and by time ([6f9dc0b](https://github.com/zeroxsolutions/zeroxsolutions/commit/6f9dc0b))
|
|
30
|
+
|
|
31
|
+
### ❤️ Thank You
|
|
32
|
+
|
|
33
|
+
- Claude Opus 5.5
|
|
34
|
+
- Lương Văn Tú
|
|
35
|
+
|
|
1
36
|
## 9.4.0 (2026-10-14)
|
|
2
37
|
|
|
3
38
|
### 🚀 Features
|
|
@@ -96,11 +131,11 @@ This was a version bump only for @zeroxsolutions/db to align it with other proje
|
|
|
96
131
|
|
|
97
132
|
### 🩹 Fixes
|
|
98
133
|
|
|
99
|
-
- ⚠️
|
|
134
|
+
- ⚠️ **db:** take zod and drizzle-orm from the host, not a second copy ([128a772](https://github.com/zeroxsolutions/zeroxsolutions/commit/128a772))
|
|
100
135
|
|
|
101
|
-
### ⚠️
|
|
136
|
+
### ⚠️ Breaking Changes
|
|
102
137
|
|
|
103
|
-
- **db:** take zod and drizzle-orm from the host, not a second copy
|
|
138
|
+
- **db:** take zod and drizzle-orm from the host, not a second copy ([128a772](https://github.com/zeroxsolutions/zeroxsolutions/commit/128a772))
|
|
104
139
|
`zod` and `drizzle-orm` are peer dependencies now. A consumer
|
|
105
140
|
already installing both is unaffected; one that relied on db to drag them in
|
|
106
141
|
must declare them itself.
|
|
@@ -118,11 +153,11 @@ This was a version bump only for @zeroxsolutions/db to align it with other proje
|
|
|
118
153
|
|
|
119
154
|
### 🚀 Features
|
|
120
155
|
|
|
121
|
-
- ⚠️
|
|
156
|
+
- ⚠️ **db:** load a read's fieldsets and include paths off the schema ([90cbd8c](https://github.com/zeroxsolutions/zeroxsolutions/commit/90cbd8c))
|
|
122
157
|
|
|
123
|
-
### ⚠️
|
|
158
|
+
### ⚠️ Breaking Changes
|
|
124
159
|
|
|
125
|
-
- **db:** load a read's fieldsets and include paths off the schema
|
|
160
|
+
- **db:** load a read's fieldsets and include paths off the schema ([90cbd8c](https://github.com/zeroxsolutions/zeroxsolutions/commit/90cbd8c))
|
|
126
161
|
`include` and `fields` are typed by `TableQuery`, so an
|
|
127
162
|
unguarded `string[]` no longer compiles where the schema generics are given;
|
|
128
163
|
`buildRelationalWith` is replaced by `buildRelationalRead`; the view
|
|
@@ -142,14 +177,14 @@ This was a version bump only for @zeroxsolutions/db to align it with other proje
|
|
|
142
177
|
|
|
143
178
|
### 🩹 Fixes
|
|
144
179
|
|
|
145
|
-
- ⚠️
|
|
180
|
+
- ⚠️ **db:** the audit columns store an instant, not a wall clock ([8760d45](https://github.com/zeroxsolutions/zeroxsolutions/commit/8760d45))
|
|
146
181
|
|
|
147
|
-
### ⚠️
|
|
182
|
+
### ⚠️ Breaking Changes
|
|
148
183
|
|
|
149
|
-
- **db:** the audit columns store an instant, not a wall clock
|
|
184
|
+
- **db:** the audit columns store an instant, not a wall clock ([8760d45](https://github.com/zeroxsolutions/zeroxsolutions/commit/8760d45))
|
|
150
185
|
every Postgres consumer must run `drizzle:generate` and apply the
|
|
151
186
|
migration it emits. Read that SQL before committing it: a bare `ALTER COLUMN ... SET DATA
|
|
152
|
-
|
|
187
|
+
TYPE timestamptz` reinterprets existing values in the session's time zone, so a store
|
|
153
188
|
holding rows needs `USING <column> AT TIME ZONE 'UTC'` written explicitly rather than the
|
|
154
189
|
server default. A consumer that bumps without migrating keeps its old columns and gets the
|
|
155
190
|
new type only on tables it creates afterwards, which is the state this is worth a major to
|
|
@@ -173,11 +208,11 @@ This was a version bump only for @zeroxsolutions/db to align it with other proje
|
|
|
173
208
|
|
|
174
209
|
### 💅 Refactors
|
|
175
210
|
|
|
176
|
-
- ⚠️
|
|
211
|
+
- ⚠️ **query,response,server:** one wire spelling, flat exports ([5c57b3a](https://github.com/zeroxsolutions/zeroxsolutions/commit/5c57b3a))
|
|
177
212
|
|
|
178
|
-
### ⚠️
|
|
213
|
+
### ⚠️ Breaking Changes
|
|
179
214
|
|
|
180
|
-
- **query,response,server:** one wire spelling, flat exports
|
|
215
|
+
- **query,response,server:** one wire spelling, flat exports ([5c57b3a](https://github.com/zeroxsolutions/zeroxsolutions/commit/5c57b3a))
|
|
181
216
|
`@zeroxsolutions/response/http`, `@zeroxsolutions/query/http`
|
|
182
217
|
and `@zeroxsolutions/server/hono/http` are gone, and the surviving `/jsonapi`
|
|
183
218
|
and `/hono` subpaths move to the package root. Every import drops its subpath.
|
|
@@ -212,11 +247,11 @@ This was a version bump only for @zeroxsolutions/db to align it with other proje
|
|
|
212
247
|
|
|
213
248
|
### 🚀 Features
|
|
214
249
|
|
|
215
|
-
- ⚠️
|
|
250
|
+
- ⚠️ **db:** let each table declare its own id column ([eca4aca](https://github.com/zeroxsolutions/zeroxsolutions/commit/eca4aca))
|
|
216
251
|
|
|
217
|
-
### ⚠️
|
|
252
|
+
### ⚠️ Breaking Changes
|
|
218
253
|
|
|
219
|
-
- **db:** let each table declare its own id column
|
|
254
|
+
- **db:** let each table declare its own id column ([eca4aca](https://github.com/zeroxsolutions/zeroxsolutions/commit/eca4aca))
|
|
220
255
|
`baseTable` is removed - take `idColumn` and spread
|
|
221
256
|
`timestamps`. `defaultIndexedBaseColumns` is now `timestampIndexes` and
|
|
222
257
|
`BaseTableShape` is `TimestampColumns`; both were named for the removed concept.
|
|
@@ -362,11 +397,11 @@ This was a version bump only for @zeroxsolutions/db to align it with other proje
|
|
|
362
397
|
|
|
363
398
|
### 🚀 Features
|
|
364
399
|
|
|
365
|
-
- ⚠️
|
|
400
|
+
- ⚠️ **db:** speak the wire's query vocabulary, and only it ([12801f0](https://github.com/zeroxsolutions/zeroxsolutions/commit/12801f0))
|
|
366
401
|
|
|
367
|
-
### ⚠️
|
|
402
|
+
### ⚠️ Breaking Changes
|
|
368
403
|
|
|
369
|
-
- **db:** speak the wire's query vocabulary, and only it
|
|
404
|
+
- **db:** speak the wire's query vocabulary, and only it ([12801f0](https://github.com/zeroxsolutions/zeroxsolutions/commit/12801f0))
|
|
370
405
|
`FindAllOptions.orderBy` is now `sort` and `FilterQuery.filters`
|
|
371
406
|
is now `filter`, in both the Postgres and D1 dialects. `baseQuerySchema`,
|
|
372
407
|
`BaseQuery`, `OrderByValue` and `orderByValueSchema` are removed; a sort clause
|
|
@@ -428,11 +463,11 @@ This was a version bump only for @zeroxsolutions/db to align it with other proje
|
|
|
428
463
|
### 🚀 Features
|
|
429
464
|
|
|
430
465
|
- **db:** hold FilterNode to the wire package's FilterTree at typecheck ([fb2a9a6](https://github.com/zeroxsolutions/zeroxsolutions/commit/fb2a9a6))
|
|
431
|
-
- ⚠️
|
|
466
|
+
- ⚠️ **db:** carry filters as a tree and refuse an inapplicable one ([1706c52](https://github.com/zeroxsolutions/zeroxsolutions/commit/1706c52))
|
|
432
467
|
|
|
433
|
-
### ⚠️
|
|
468
|
+
### ⚠️ Breaking Changes
|
|
434
469
|
|
|
435
|
-
- **db:** carry filters as a tree and refuse an inapplicable one
|
|
470
|
+
- **db:** carry filters as a tree and refuse an inapplicable one ([1706c52](https://github.com/zeroxsolutions/zeroxsolutions/commit/1706c52))
|
|
436
471
|
`buildFilterConditions` takes one options object;
|
|
437
472
|
`filters` is a `FilterNode[]` tree; `baseQuerySchema` validates decoded
|
|
438
473
|
objects and has no `search`; `serializeQuery` is removed - rendering the
|
|
@@ -615,4 +650,4 @@ This was a version bump only for @zeroxsolutions/db to align it with other proje
|
|
|
615
650
|
|
|
616
651
|
### ❤️ Thank You
|
|
617
652
|
|
|
618
|
-
- Lương Văn Tú
|
|
653
|
+
- Lương Văn Tú
|