pqb 0.67.6 → 0.67.7
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 +501 -219
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -11
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +497 -223
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2059,8 +2059,8 @@ var IntervalColumn = class extends Column {
|
|
|
2059
2059
|
}
|
|
2060
2060
|
};
|
|
2061
2061
|
var ArrayColumn = class ArrayColumn extends Column {
|
|
2062
|
-
constructor(schema, item,
|
|
2063
|
-
super(schema,
|
|
2062
|
+
constructor(schema, item, __inputType, defaultEncode, __outputType, __queryType) {
|
|
2063
|
+
super(schema, __inputType, __outputType, __queryType);
|
|
2064
2064
|
this.dataType = "array";
|
|
2065
2065
|
this.operators = Operators.array;
|
|
2066
2066
|
item.data.isNullable = true;
|
|
@@ -2140,8 +2140,8 @@ const parsePostgresArray = (source, entries, transform) => {
|
|
|
2140
2140
|
};
|
|
2141
2141
|
const encodeJson = (x) => x === null ? x : JSON.stringify(x);
|
|
2142
2142
|
var JSONColumn = class extends Column {
|
|
2143
|
-
constructor(schema,
|
|
2144
|
-
super(schema,
|
|
2143
|
+
constructor(schema, __inputType, encodedByDriver = true) {
|
|
2144
|
+
super(schema, __inputType);
|
|
2145
2145
|
this.dataType = "jsonb";
|
|
2146
2146
|
this.operators = Operators.json;
|
|
2147
2147
|
if (!encodedByDriver) this.data.encode = encodeJson;
|
|
@@ -2153,10 +2153,10 @@ var JSONColumn = class extends Column {
|
|
|
2153
2153
|
};
|
|
2154
2154
|
var JSONTextColumn = class JSONTextColumn extends Column {
|
|
2155
2155
|
static get instance() {
|
|
2156
|
-
return this._instance ??= new JSONTextColumn(internalSchemaConfig);
|
|
2156
|
+
return this._instance ??= new JSONTextColumn(internalSchemaConfig, void 0);
|
|
2157
2157
|
}
|
|
2158
|
-
constructor(schema) {
|
|
2159
|
-
super(schema,
|
|
2158
|
+
constructor(schema, __inputType) {
|
|
2159
|
+
super(schema, __inputType);
|
|
2160
2160
|
this.dataType = "json";
|
|
2161
2161
|
this.operators = Operators.text;
|
|
2162
2162
|
}
|
|
@@ -2367,6 +2367,9 @@ const defaultSchemaConfig = (options) => {
|
|
|
2367
2367
|
json() {
|
|
2368
2368
|
return new JSONColumn(schemaConfig, void 0, options?.jsonEncodedByDriver);
|
|
2369
2369
|
},
|
|
2370
|
+
jsonText() {
|
|
2371
|
+
return new JSONTextColumn(schemaConfig, void 0);
|
|
2372
|
+
},
|
|
2370
2373
|
setErrors: noop,
|
|
2371
2374
|
smallint: () => new SmallIntColumn(schemaConfig),
|
|
2372
2375
|
integer: () => new IntegerColumn(schemaConfig),
|
|
@@ -2995,9 +2998,7 @@ const makeColumnTypes = (schema) => {
|
|
|
2995
2998
|
return new XMLColumn(schema);
|
|
2996
2999
|
},
|
|
2997
3000
|
json: schema.json,
|
|
2998
|
-
jsonText
|
|
2999
|
-
return new JSONTextColumn(schema);
|
|
3000
|
-
},
|
|
3001
|
+
jsonText: schema.jsonText,
|
|
3001
3002
|
type(dataType) {
|
|
3002
3003
|
return new CustomTypeColumn(schema, dataType);
|
|
3003
3004
|
},
|
|
@@ -11145,7 +11146,7 @@ const getShapeFromSelect = (q, isSubQuery) => {
|
|
|
11145
11146
|
if (returnType === "value" || returnType === "valueOrThrow") {
|
|
11146
11147
|
const type = it.q.getColumn;
|
|
11147
11148
|
result[key] = type ? mapSubSelectColumn(type, isSubQuery) : UnknownColumn.instance;
|
|
11148
|
-
} else result[key] = new JSONTextColumn(internalSchemaConfig);
|
|
11149
|
+
} else result[key] = new JSONTextColumn(internalSchemaConfig, void 0);
|
|
11149
11150
|
}
|
|
11150
11151
|
}
|
|
11151
11152
|
}
|