bigal 13.0.0-beta1 → 13.0.0-beta2
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.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -673,7 +673,7 @@ function getUpdateQueryAndParams({
|
|
|
673
673
|
if (maxLength && ["string", "string[]"].includes(type)) {
|
|
674
674
|
const normalizedValues = Array.isArray(value) ? value : [value];
|
|
675
675
|
for (const normalizedValue of normalizedValues) {
|
|
676
|
-
if (normalizedValue
|
|
676
|
+
if (normalizedValue?.length > maxLength) {
|
|
677
677
|
throw new QueryError(`Update statement for "${model.name}" contains a value that exceeds maxLength on field: ${column.propertyName}`, model);
|
|
678
678
|
}
|
|
679
679
|
}
|
|
@@ -1275,7 +1275,7 @@ function buildLikeOperatorStatement({ model, propertyName, isNegated, value, par
|
|
|
1275
1275
|
if (___default.isString(value)) {
|
|
1276
1276
|
if (value) {
|
|
1277
1277
|
params.push(value);
|
|
1278
|
-
const columnType = column.type
|
|
1278
|
+
const columnType = column.type?.toLowerCase();
|
|
1279
1279
|
if (columnType === "array" || columnType === "string[]") {
|
|
1280
1280
|
return `${isNegated ? "NOT " : ""}EXISTS(SELECT 1 FROM (SELECT unnest("${column.name}") AS "unnested_${column.name}") __unnested WHERE "unnested_${column.name}" ILIKE $${params.length})`;
|
|
1281
1281
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -667,7 +667,7 @@ function getUpdateQueryAndParams({
|
|
|
667
667
|
if (maxLength && ["string", "string[]"].includes(type)) {
|
|
668
668
|
const normalizedValues = Array.isArray(value) ? value : [value];
|
|
669
669
|
for (const normalizedValue of normalizedValues) {
|
|
670
|
-
if (normalizedValue
|
|
670
|
+
if (normalizedValue?.length > maxLength) {
|
|
671
671
|
throw new QueryError(`Update statement for "${model.name}" contains a value that exceeds maxLength on field: ${column.propertyName}`, model);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
@@ -1269,7 +1269,7 @@ function buildLikeOperatorStatement({ model, propertyName, isNegated, value, par
|
|
|
1269
1269
|
if (_.isString(value)) {
|
|
1270
1270
|
if (value) {
|
|
1271
1271
|
params.push(value);
|
|
1272
|
-
const columnType = column.type
|
|
1272
|
+
const columnType = column.type?.toLowerCase();
|
|
1273
1273
|
if (columnType === "array" || columnType === "string[]") {
|
|
1274
1274
|
return `${isNegated ? "NOT " : ""}EXISTS(SELECT 1 FROM (SELECT unnest("${column.name}") AS "unnested_${column.name}") __unnested WHERE "unnested_${column.name}" ILIKE $${params.length})`;
|
|
1275
1275
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bigal",
|
|
3
|
-
"version": "13.0.0-
|
|
3
|
+
"version": "13.0.0-beta2",
|
|
4
4
|
"description": "A fast and lightweight orm for postgres and node.js, written in typescript.",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"node": ">=18"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
+
"@types/pg": "^8.11.6",
|
|
36
37
|
"lodash": "^4.17.21",
|
|
37
38
|
"pg": "^8.12.0",
|
|
38
39
|
"postgres-pool": "^9.0.0-beta2"
|
|
@@ -43,7 +44,6 @@
|
|
|
43
44
|
"@types/lodash": "^4.17.6",
|
|
44
45
|
"@types/mocha": "10.0.7",
|
|
45
46
|
"@types/node": ">=20",
|
|
46
|
-
"@types/pg": "^8.11.6",
|
|
47
47
|
"chai": "^5.1.1",
|
|
48
48
|
"eslint": "^9.6.0",
|
|
49
49
|
"eslint-config-decent": "^1.2.2",
|