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 CHANGED
@@ -2266,6 +2266,7 @@ declare type ColumnData = {
2266
2266
  compression?: string;
2267
2267
  foreignKey?: ForeignKey<string, string[]>;
2268
2268
  modifyQuery?: (q: Query) => void;
2269
+ as?: ColumnType;
2269
2270
  };
2270
2271
  declare type ForeignKeyMatch = 'FULL' | 'PARTIAL' | 'SIMPLE';
2271
2272
  declare type ForeignKeyAction = 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT';
@@ -2347,7 +2348,7 @@ declare abstract class ColumnType<Type = unknown, Ops extends Operators = Operat
2347
2348
  parse<T extends ColumnType, Output>(this: T, fn: (input: T['type']) => Output): Omit<T, 'type'> & {
2348
2349
  type: Output;
2349
2350
  };
2350
- as<T extends ColumnType, C extends ColumnType<T['type'], Operators, T['inputType']>>(this: T, _: C): C;
2351
+ as<T extends ColumnType, C extends ColumnType<T['type'], Operators, T['inputType']>>(this: T, column: C): C;
2351
2352
  toSQL(): string;
2352
2353
  default<T extends ColumnType>(this: T, value: T['type'] | RawExpression): T & {
2353
2354
  hasDefault: true;
package/dist/index.esm.js CHANGED
@@ -66,8 +66,8 @@ class ColumnType {
66
66
  this.parseItem = fn;
67
67
  return this;
68
68
  }
69
- as(_) {
70
- return this;
69
+ as(column) {
70
+ return addColumnData(this, "as", column);
71
71
  }
72
72
  toSQL() {
73
73
  return this.dataType;