@anfenn/dync 1.0.20 → 1.0.22
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/{chunk-I2KQD4DD.js → chunk-YSKDP34Q.js} +6 -5
- package/dist/chunk-YSKDP34Q.js.map +1 -0
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
- package/src/storage/sqlite/helpers.ts +8 -4
- package/dist/chunk-I2KQD4DD.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2388,7 +2388,7 @@ var buildCondition = (condition) => {
|
|
|
2388
2388
|
switch (condition.type) {
|
|
2389
2389
|
case "equals": {
|
|
2390
2390
|
if (condition.caseInsensitive) {
|
|
2391
|
-
return { clause:
|
|
2391
|
+
return { clause: `${col} = ? COLLATE NOCASE`, parameters: [condition.value] };
|
|
2392
2392
|
}
|
|
2393
2393
|
return { clause: `${col} = ?`, parameters: [condition.value] };
|
|
2394
2394
|
}
|
|
@@ -2410,7 +2410,7 @@ var buildCondition = (condition) => {
|
|
|
2410
2410
|
const placeholders = condition.values.map(() => "?").join(", ");
|
|
2411
2411
|
if (condition.caseInsensitive) {
|
|
2412
2412
|
return {
|
|
2413
|
-
clause:
|
|
2413
|
+
clause: `${col} COLLATE NOCASE IN (${placeholders})`,
|
|
2414
2414
|
parameters: condition.values
|
|
2415
2415
|
};
|
|
2416
2416
|
}
|
|
@@ -2425,9 +2425,10 @@ var buildCondition = (condition) => {
|
|
|
2425
2425
|
}
|
|
2426
2426
|
case "like": {
|
|
2427
2427
|
if (condition.caseInsensitive) {
|
|
2428
|
-
return { clause:
|
|
2428
|
+
return { clause: `${col} LIKE ?`, parameters: [condition.pattern] };
|
|
2429
2429
|
}
|
|
2430
|
-
|
|
2430
|
+
const globPattern = condition.pattern.replace(/%/g, "*").replace(/_/g, "?");
|
|
2431
|
+
return { clause: `${col} GLOB ?`, parameters: [globPattern] };
|
|
2431
2432
|
}
|
|
2432
2433
|
}
|
|
2433
2434
|
};
|