@ultimat3/db 31.52.0 → 31.53.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/package.json +2 -2
- package/src/generate-counter.ts +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/db",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.53.1",
|
|
4
4
|
"description": "Postgres access, transactions, migrations and drift detection",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ultimate",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"test": "bun test"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@ultimat3/core": "31.
|
|
48
|
+
"@ultimat3/core": "31.53.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@electric-sql/pglite": ">=0.5.0"
|
package/src/generate-counter.ts
CHANGED
|
@@ -89,6 +89,9 @@ const truth = (counter: CounterDescriptionLike): string =>
|
|
|
89
89
|
* that already holds rows starts true. Migration-only: it locks nothing first, so it is not safe
|
|
90
90
|
* beside live writers — `x db recount --write` repairs by key range instead (`recountLockSql`,
|
|
91
91
|
* then `recountBatchSql`), one transaction per window.
|
|
92
|
+
*
|
|
93
|
+
* @deprecated As an `@ultimat3/db` export: no longer exported at the next major (the package keeps
|
|
94
|
+
* it); repair through `x db recount <entity>.<column> --write`.
|
|
92
95
|
*/
|
|
93
96
|
export function recountSql(parent: string, counter: CounterDescriptionLike): string {
|
|
94
97
|
return (
|
|
@@ -97,7 +100,12 @@ export function recountSql(parent: string, counter: CounterDescriptionLike): str
|
|
|
97
100
|
);
|
|
98
101
|
}
|
|
99
102
|
|
|
100
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* The drifted rows, for `x db recount`'s report: key, stored and true count.
|
|
105
|
+
*
|
|
106
|
+
* @deprecated As an `@ultimat3/db` export: no longer exported at the next major (the package keeps
|
|
107
|
+
* it); read drift through `x db recount <entity>.<column>`.
|
|
108
|
+
*/
|
|
101
109
|
export function recountDriftSql(parent: string, counter: CounterDescriptionLike): string {
|
|
102
110
|
return (
|
|
103
111
|
`select p.${identifier(counter.key).text}::text as "key", ` +
|