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.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExpressionTypeMethod, Expression, RawSQLBase, emptyObject, isTemplateLiteralArgs, ColumnTypeBase, setColumnData, pushColumnData, quoteObjectKey, toArray, singleQuote, addCode, singleQuoteArray, objectHasValues, toSnakeCase, columnDefaultArgumentToCode, columnErrorMessagesToCode, getValueKey, addValue, isExpression, joinTruthy, numberDataToCode, stringDataToCode, getDefaultLanguage, dateDataToCode, pushOrNewArrayToObject, returnArg as returnArg$1, noop, arrayDataToCode, logColors,
|
|
1
|
+
import { ExpressionTypeMethod, Expression, RawSQLBase, emptyObject, isTemplateLiteralArgs, ColumnTypeBase, setColumnData, pushColumnData, quoteObjectKey, toArray, singleQuote, addCode, singleQuoteArray, objectHasValues, toSnakeCase, columnDefaultArgumentToCode, columnErrorMessagesToCode, getValueKey, emptyArray, addValue, isExpression, joinTruthy, numberDataToCode, stringDataToCode, getDefaultLanguage, dateDataToCode, pushOrNewArrayToObject, returnArg as returnArg$1, noop, arrayDataToCode, logColors, applyTransforms, callWithThis, setParserToQuery, isRawSQL, pushOrNewArray, setDefaultNowFn, setDefaultLanguage, makeTimestampsHelpers, setCurrentColumnName, setAdapterConnectRetry, isObjectEmpty, ValExpression, applyMixins, snakeCaseKey } from 'orchid-core';
|
|
2
2
|
import pg from 'pg';
|
|
3
3
|
import { inspect } from 'node:util';
|
|
4
4
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
@@ -1018,7 +1018,8 @@ const json = __spreadProps$9(__spreadValues$j({}, base), {
|
|
|
1018
1018
|
jsonPathQueryFirst: Object.assign(
|
|
1019
1019
|
function(path, options) {
|
|
1020
1020
|
var _a, _b, _c, _d, _e;
|
|
1021
|
-
(
|
|
1021
|
+
const chain = (_b = (_a = this.q).chain) != null ? _b : _a.chain = [];
|
|
1022
|
+
chain.push(jsonPathQueryOp, [path, options]);
|
|
1022
1023
|
if ((_c = this.q.parsers) == null ? void 0 : _c[getValueKey]) {
|
|
1023
1024
|
this.q.parsers[getValueKey] = void 0;
|
|
1024
1025
|
}
|
|
@@ -1026,6 +1027,11 @@ const json = __spreadProps$9(__spreadValues$j({}, base), {
|
|
|
1026
1027
|
const type = options.type(this.columnTypes);
|
|
1027
1028
|
if (type.parseFn)
|
|
1028
1029
|
((_e = (_d = this.q).parsers) != null ? _e : _d.parsers = {})[getValueKey] = type.parseFn;
|
|
1030
|
+
chain.push = (...args) => {
|
|
1031
|
+
chain.push = Array.prototype.push;
|
|
1032
|
+
chain.push((s) => `${s}::${type.dataType}`, emptyArray);
|
|
1033
|
+
return chain.push(...args);
|
|
1034
|
+
};
|
|
1029
1035
|
return setQueryOperators(this, type.operators);
|
|
1030
1036
|
}
|
|
1031
1037
|
return this;
|