baja-lite 1.0.20 → 1.0.21
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/cjs/sql.d.ts +1 -1
- package/cjs/sql.js +1 -7
- package/es/sql.d.ts +1 -1
- package/es/sql.js +1 -7
- package/package.json +3 -3
- package/src/sql.ts +2 -6
package/cjs/sql.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { XML } from './convert-xml';
|
|
2
2
|
import { ArrayList } from './list';
|
|
3
|
-
import { EnumMap } from 'enum';
|
|
3
|
+
import { EnumMap } from './enum';
|
|
4
4
|
import { ExtensionCodec } from "@msgpack/msgpack";
|
|
5
5
|
export declare const extensionCodec: ExtensionCodec<undefined>;
|
|
6
6
|
declare const _daoDBName: unique symbol;
|
package/cjs/sql.js
CHANGED
|
@@ -1675,15 +1675,9 @@ const FieldFilter = (K, V, def, uuidColumn, option) => {
|
|
|
1675
1675
|
// 只有在非插入或者非UUID时,进行空置检查
|
|
1676
1676
|
if (option?.insert === true && uuidColumn === true) {
|
|
1677
1677
|
ret = 1;
|
|
1678
|
-
if (V === undefined) {
|
|
1678
|
+
if (V === undefined || (0, string_1.emptyString)(`${V ?? ''}`)) {
|
|
1679
1679
|
V = null;
|
|
1680
1680
|
}
|
|
1681
|
-
else if ((0, string_1.emptyString)(`${V ?? ''}`)) {
|
|
1682
|
-
V = '';
|
|
1683
|
-
}
|
|
1684
|
-
else {
|
|
1685
|
-
ret = 1;
|
|
1686
|
-
}
|
|
1687
1681
|
}
|
|
1688
1682
|
else {
|
|
1689
1683
|
if (V === null) {
|
package/es/sql.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { XML } from './convert-xml';
|
|
2
2
|
import { ArrayList } from './list';
|
|
3
|
-
import { EnumMap } from 'enum';
|
|
3
|
+
import { EnumMap } from './enum';
|
|
4
4
|
import { ExtensionCodec } from "@msgpack/msgpack";
|
|
5
5
|
export declare const extensionCodec: ExtensionCodec<undefined>;
|
|
6
6
|
declare const _daoDBName: unique symbol;
|
package/es/sql.js
CHANGED
|
@@ -1631,15 +1631,9 @@ const FieldFilter = (K, V, def, uuidColumn, option) => {
|
|
|
1631
1631
|
// 只有在非插入或者非UUID时,进行空置检查
|
|
1632
1632
|
if (option?.insert === true && uuidColumn === true) {
|
|
1633
1633
|
ret = 1;
|
|
1634
|
-
if (V === undefined) {
|
|
1634
|
+
if (V === undefined || emptyString(`${V ?? ''}`)) {
|
|
1635
1635
|
V = null;
|
|
1636
1636
|
}
|
|
1637
|
-
else if (emptyString(`${V ?? ''}`)) {
|
|
1638
|
-
V = '';
|
|
1639
|
-
}
|
|
1640
|
-
else {
|
|
1641
|
-
ret = 1;
|
|
1642
|
-
}
|
|
1643
1637
|
}
|
|
1644
1638
|
else {
|
|
1645
1639
|
if (V === null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baja-lite",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "some util for self",
|
|
5
5
|
"homepage": "https://github.com/void-soul/util-man",
|
|
6
6
|
"repository": {
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@types/mustache": "4.2.5",
|
|
51
51
|
"@types/node": "20.14.14",
|
|
52
52
|
"@types/sqlstring": "2.3.2",
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
54
|
-
"@typescript-eslint/parser": "8.
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "8.2.0",
|
|
54
|
+
"@typescript-eslint/parser": "8.2.0",
|
|
55
55
|
"better-sqlite3": "11.1.2",
|
|
56
56
|
"ioredis": "5.4.1",
|
|
57
57
|
"mongodb": "6.8.0",
|
package/src/sql.ts
CHANGED
|
@@ -13,7 +13,7 @@ import HTML from 'html-parse-stringify';
|
|
|
13
13
|
import { XML, convert } from './convert-xml';
|
|
14
14
|
import { ArrayList } from './list';
|
|
15
15
|
import LGet from 'lodash.get';
|
|
16
|
-
import { EnumMap } from 'enum';
|
|
16
|
+
import { EnumMap } from './enum';
|
|
17
17
|
import { encode, decode, ExtensionCodec, DecodeError } from "@msgpack/msgpack";
|
|
18
18
|
(BigInt.prototype as any).toJSON = function () { return this.toString() }
|
|
19
19
|
|
|
@@ -1998,12 +1998,8 @@ const FieldFilter = (
|
|
|
1998
1998
|
// 只有在非插入或者非UUID时,进行空置检查
|
|
1999
1999
|
if (option?.insert === true && uuidColumn === true) {
|
|
2000
2000
|
ret = 1;
|
|
2001
|
-
if (V === undefined) {
|
|
2001
|
+
if (V === undefined || emptyString(`${V ?? ''}`)) {
|
|
2002
2002
|
V = null;
|
|
2003
|
-
} else if (emptyString(`${V ?? ''}`)) {
|
|
2004
|
-
V = '';
|
|
2005
|
-
} else {
|
|
2006
|
-
ret = 1;
|
|
2007
2003
|
}
|
|
2008
2004
|
} else {
|
|
2009
2005
|
if (V === null) {
|