@stacksjs/database 0.72.26 → 0.72.27
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/dist/utils.d.ts +14 -4
- package/package.json +10 -10
package/dist/utils.d.ts
CHANGED
|
@@ -316,10 +316,20 @@ declare interface Db extends Pick<Required<RawQueryBuilder>, GenericPassthroughK
|
|
|
316
316
|
unsafe: (query: string, params?: unknown[]) => UnsafeReturn
|
|
317
317
|
read: Omit<Db, 'read'>
|
|
318
318
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
319
|
+
/**
|
|
320
|
+
* What raw SQL answers: rows whose shape only the SQL knows.
|
|
321
|
+
*
|
|
322
|
+
* The query builder types `unsafe()` as `Promise<any>`, and at runtime it hands
|
|
323
|
+
* back a Bun SQL statement that also has `.execute()`. Both halves are declared
|
|
324
|
+
* here - and the rows are `Record<string, unknown>` rather than `any`, because
|
|
325
|
+
* that is the truth about a hand-written `SELECT`: it has aliases this code
|
|
326
|
+
* cannot see, and every column wants reading out.
|
|
327
|
+
*
|
|
328
|
+
* `any` was worse than useless here: it made `rows.map(row => …)` an implicit
|
|
329
|
+
* any at every call site, which is the error `noImplicitAny` exists to raise.
|
|
330
|
+
*/
|
|
331
|
+
declare type UnsafeRow = Record<string, unknown>;
|
|
332
|
+
declare type UnsafeReturn = Promise<UnsafeRow[]> & { execute: () => Promise<UnsafeRow[]> }
|
|
323
333
|
/**
|
|
324
334
|
* The keys a row type actually declares, or `never` for a loose record.
|
|
325
335
|
*
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/database",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.72.
|
|
5
|
+
"version": "0.72.27",
|
|
6
6
|
"description": "The Stacks database integration.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"dynamodb-tooling": "^0.3.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@stacksjs/cli": "0.72.
|
|
69
|
-
"@stacksjs/config": "0.72.
|
|
70
|
-
"@stacksjs/logging": "0.72.
|
|
71
|
-
"@stacksjs/router": "0.72.
|
|
68
|
+
"@stacksjs/cli": "0.72.27",
|
|
69
|
+
"@stacksjs/config": "0.72.27",
|
|
70
|
+
"@stacksjs/logging": "0.72.27",
|
|
71
|
+
"@stacksjs/router": "0.72.27",
|
|
72
72
|
"better-dx": "^0.2.23",
|
|
73
|
-
"@stacksjs/path": "0.72.
|
|
74
|
-
"@stacksjs/query-builder": "0.72.
|
|
75
|
-
"@stacksjs/storage": "0.72.
|
|
76
|
-
"@stacksjs/strings": "0.72.
|
|
77
|
-
"@stacksjs/utils": "0.72.
|
|
73
|
+
"@stacksjs/path": "0.72.27",
|
|
74
|
+
"@stacksjs/query-builder": "0.72.27",
|
|
75
|
+
"@stacksjs/storage": "0.72.27",
|
|
76
|
+
"@stacksjs/strings": "0.72.27",
|
|
77
|
+
"@stacksjs/utils": "0.72.27"
|
|
78
78
|
}
|
|
79
79
|
}
|