@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
|
@@ -2356,7 +2356,7 @@ var buildCondition = (condition) => {
|
|
|
2356
2356
|
switch (condition.type) {
|
|
2357
2357
|
case "equals": {
|
|
2358
2358
|
if (condition.caseInsensitive) {
|
|
2359
|
-
return { clause:
|
|
2359
|
+
return { clause: `${col} = ? COLLATE NOCASE`, parameters: [condition.value] };
|
|
2360
2360
|
}
|
|
2361
2361
|
return { clause: `${col} = ?`, parameters: [condition.value] };
|
|
2362
2362
|
}
|
|
@@ -2378,7 +2378,7 @@ var buildCondition = (condition) => {
|
|
|
2378
2378
|
const placeholders = condition.values.map(() => "?").join(", ");
|
|
2379
2379
|
if (condition.caseInsensitive) {
|
|
2380
2380
|
return {
|
|
2381
|
-
clause:
|
|
2381
|
+
clause: `${col} COLLATE NOCASE IN (${placeholders})`,
|
|
2382
2382
|
parameters: condition.values
|
|
2383
2383
|
};
|
|
2384
2384
|
}
|
|
@@ -2393,9 +2393,10 @@ var buildCondition = (condition) => {
|
|
|
2393
2393
|
}
|
|
2394
2394
|
case "like": {
|
|
2395
2395
|
if (condition.caseInsensitive) {
|
|
2396
|
-
return { clause:
|
|
2396
|
+
return { clause: `${col} LIKE ?`, parameters: [condition.pattern] };
|
|
2397
2397
|
}
|
|
2398
|
-
|
|
2398
|
+
const globPattern = condition.pattern.replace(/%/g, "*").replace(/_/g, "?");
|
|
2399
|
+
return { clause: `${col} GLOB ?`, parameters: [globPattern] };
|
|
2399
2400
|
}
|
|
2400
2401
|
}
|
|
2401
2402
|
};
|
|
@@ -3818,4 +3819,4 @@ export {
|
|
|
3818
3819
|
SqliteQueryContext,
|
|
3819
3820
|
SQLiteAdapter2 as SQLiteAdapter
|
|
3820
3821
|
};
|
|
3821
|
-
//# sourceMappingURL=chunk-
|
|
3822
|
+
//# sourceMappingURL=chunk-YSKDP34Q.js.map
|