@voltro/database 0.11.1 → 0.11.3
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 +95 -0
- package/dist/{fileBased-Cc-F1oFv.js → fileBased-BrYB2u6E.js} +88 -79
- package/dist/index.d.ts +9 -3
- package/dist/index.js +508 -508
- package/dist/sql.js +100 -100
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -179,8 +179,14 @@ export declare const auditTableIndexes: (table: Table<string, Record<string, Col
|
|
|
179
179
|
/** Columns the framework fills on write (auto-id floor + tenant/audit mixins),
|
|
180
180
|
* so an insert need not supply them. Name-based on purpose: a hand-declared
|
|
181
181
|
* `createdAt` with no default reads as optional here (the lenient direction —
|
|
182
|
-
* never rejects valid code), while the mixin-managed ones are always filled.
|
|
183
|
-
|
|
182
|
+
* never rejects valid code), while the mixin-managed ones are always filled.
|
|
183
|
+
* Runtime tuple + the type derived from it, so a consumer that must skip these
|
|
184
|
+
* at runtime (e.g. `@voltro/testing`'s `fixtureRow`, which fills only
|
|
185
|
+
* caller-owned required columns) reads the SAME list the insert-row type uses —
|
|
186
|
+
* no second copy to drift. */
|
|
187
|
+
export declare const AUTO_FILLED_COLUMNS: readonly ["id", "tenantId", "createdAt", "updatedAt", "createdBy", "updatedBy", "deletedAt", "deletedBy"];
|
|
188
|
+
|
|
189
|
+
declare type AutoFilledColumn = (typeof AUTO_FILLED_COLUMNS)[number];
|
|
184
190
|
|
|
185
191
|
export declare const avg: (column: string, alias?: string) => AggregateColumn;
|
|
186
192
|
|
|
@@ -666,7 +672,7 @@ export declare class ColumnBuilder<TsType, Type extends ColumnType, HasDefault e
|
|
|
666
672
|
*/
|
|
667
673
|
generatedAs(expr: string, options?: {
|
|
668
674
|
stored?: boolean;
|
|
669
|
-
}):
|
|
675
|
+
}): ColumnBuilder<TsType, Type, true>;
|
|
670
676
|
/**
|
|
671
677
|
* Migration backfill. Tells the planner how to populate existing rows
|
|
672
678
|
* when this column is added as NOT NULL to a populated table — without
|