pqb 0.38.0 → 0.38.2
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 -2
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3170,8 +3170,8 @@ interface DefaultSchemaConfig extends ColumnSchemaConfig<ColumnType> {
|
|
|
3170
3170
|
}) => Types): {
|
|
3171
3171
|
[K in keyof T]: K extends keyof Types ? Types[K] : T[K];
|
|
3172
3172
|
};
|
|
3173
|
-
dateAsNumber(): ParseColumn<
|
|
3174
|
-
dateAsDate(): ParseColumn<
|
|
3173
|
+
dateAsNumber<T extends ColumnType>(this: T): ParseColumn<T, unknown, number>;
|
|
3174
|
+
dateAsDate<T extends ColumnType>(this: T): ParseColumn<T, unknown, Date>;
|
|
3175
3175
|
enum<U extends string, T extends readonly [U, ...U[]]>(dataType: string, type: T): EnumColumn<DefaultSchemaConfig, unknown, U, T>;
|
|
3176
3176
|
array<Item extends ArrayColumnValue>(item: Item): ArrayColumn<DefaultSchemaConfig, Item, unknown, unknown, unknown>;
|
|
3177
3177
|
json<T>(): JSONColumn<unknown extends T ? MaybeArray<string | number | boolean | RecordUnknown> : T, DefaultSchemaConfig>;
|
package/dist/index.js
CHANGED
|
@@ -1020,7 +1020,8 @@ const json = __spreadProps$9(__spreadValues$j({}, base), {
|
|
|
1020
1020
|
jsonPathQueryFirst: Object.assign(
|
|
1021
1021
|
function(path, options) {
|
|
1022
1022
|
var _a, _b, _c, _d, _e;
|
|
1023
|
-
(
|
|
1023
|
+
const chain = (_b = (_a = this.q).chain) != null ? _b : _a.chain = [];
|
|
1024
|
+
chain.push(jsonPathQueryOp, [path, options]);
|
|
1024
1025
|
if ((_c = this.q.parsers) == null ? void 0 : _c[orchidCore.getValueKey]) {
|
|
1025
1026
|
this.q.parsers[orchidCore.getValueKey] = void 0;
|
|
1026
1027
|
}
|
|
@@ -1028,6 +1029,11 @@ const json = __spreadProps$9(__spreadValues$j({}, base), {
|
|
|
1028
1029
|
const type = options.type(this.columnTypes);
|
|
1029
1030
|
if (type.parseFn)
|
|
1030
1031
|
((_e = (_d = this.q).parsers) != null ? _e : _d.parsers = {})[orchidCore.getValueKey] = type.parseFn;
|
|
1032
|
+
chain.push = (...args) => {
|
|
1033
|
+
chain.push = Array.prototype.push;
|
|
1034
|
+
chain.push((s) => `${s}::${type.dataType}`, orchidCore.emptyArray);
|
|
1035
|
+
return chain.push(...args);
|
|
1036
|
+
};
|
|
1031
1037
|
return setQueryOperators(this, type.operators);
|
|
1032
1038
|
}
|
|
1033
1039
|
return this;
|