pqb 0.4.8 → 0.4.9
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/index.d.ts +2 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/columnSchema/columnType.ts +3 -2
package/package.json
CHANGED
|
@@ -46,6 +46,7 @@ export type ColumnData = {
|
|
|
46
46
|
compression?: string;
|
|
47
47
|
foreignKey?: ForeignKey<string, string[]>;
|
|
48
48
|
modifyQuery?: (q: Query) => void;
|
|
49
|
+
as?: ColumnType;
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
type ForeignKeyMatch = 'FULL' | 'PARTIAL' | 'SIMPLE';
|
|
@@ -224,8 +225,8 @@ export abstract class ColumnType<
|
|
|
224
225
|
as<
|
|
225
226
|
T extends ColumnType,
|
|
226
227
|
C extends ColumnType<T['type'], Operators, T['inputType']>,
|
|
227
|
-
>(this: T,
|
|
228
|
-
return this as unknown as C;
|
|
228
|
+
>(this: T, column: C): C {
|
|
229
|
+
return addColumnData(this, 'as', column) as unknown as C;
|
|
229
230
|
}
|
|
230
231
|
|
|
231
232
|
toSQL() {
|