pqb 0.18.27 → 0.18.28

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.mjs CHANGED
@@ -3192,7 +3192,7 @@ class CitextColumn extends TextBaseColumn {
3192
3192
  }
3193
3193
 
3194
3194
  const dateTimeEncode = (input) => {
3195
- return typeof input === "object" ? input : new Date(input);
3195
+ return typeof input === "number" ? new Date(input) : input;
3196
3196
  };
3197
3197
  const skipDateMethodsFromToCode = { encodeFn: dateTimeEncode };
3198
3198
  const parseToNumber = (value) => value ? Date.parse(value) : value;
@@ -3278,10 +3278,12 @@ class TimestampTZColumn extends DateTimeTzBaseClass {
3278
3278
  return timestampToCode(this, t);
3279
3279
  }
3280
3280
  }
3281
- class TimeColumn extends DateTimeBaseClass {
3282
- constructor() {
3283
- super(...arguments);
3281
+ class TimeColumn extends ColumnType {
3282
+ constructor(dateTimePrecision) {
3283
+ super();
3284
3284
  this.dataType = "time";
3285
+ this.operators = Operators.time;
3286
+ this.data.dateTimePrecision = dateTimePrecision;
3285
3287
  }
3286
3288
  toCode(t) {
3287
3289
  const { dateTimePrecision } = this.data;
@@ -3294,6 +3296,7 @@ class TimeColumn extends DateTimeBaseClass {
3294
3296
  );
3295
3297
  }
3296
3298
  }
3299
+ assignMethodsToClass(TimeColumn, dateTypeMethods);
3297
3300
  class IntervalColumn extends ColumnType {
3298
3301
  constructor(fields, precision) {
3299
3302
  super();