imean-cassandra-orm 2.7.1 → 2.7.2
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/mod.cjs +4 -2
- package/dist/mod.js +4 -2
- package/package.json +1 -1
package/dist/mod.cjs
CHANGED
|
@@ -1030,8 +1030,10 @@ function convertValueFromCassandra(value, config, zodSchema, filedName) {
|
|
|
1030
1030
|
case "blob":
|
|
1031
1031
|
return value instanceof Uint8Array ? value : new Uint8Array(value);
|
|
1032
1032
|
case "text":
|
|
1033
|
-
|
|
1034
|
-
|
|
1033
|
+
let zodField = zodSchema?.shape[filedName];
|
|
1034
|
+
zodField = zodField?._def?.innerType ?? zodField;
|
|
1035
|
+
const zodTypeName = zodField?._def?.typeName;
|
|
1036
|
+
if (config.type !== "text" || zodTypeName !== "ZodString") {
|
|
1035
1037
|
try {
|
|
1036
1038
|
return JSON.parse(value);
|
|
1037
1039
|
} catch (error) {
|
package/dist/mod.js
CHANGED
|
@@ -1028,8 +1028,10 @@ function convertValueFromCassandra(value, config, zodSchema, filedName) {
|
|
|
1028
1028
|
case "blob":
|
|
1029
1029
|
return value instanceof Uint8Array ? value : new Uint8Array(value);
|
|
1030
1030
|
case "text":
|
|
1031
|
-
|
|
1032
|
-
|
|
1031
|
+
let zodField = zodSchema?.shape[filedName];
|
|
1032
|
+
zodField = zodField?._def?.innerType ?? zodField;
|
|
1033
|
+
const zodTypeName = zodField?._def?.typeName;
|
|
1034
|
+
if (config.type !== "text" || zodTypeName !== "ZodString") {
|
|
1033
1035
|
try {
|
|
1034
1036
|
return JSON.parse(value);
|
|
1035
1037
|
} catch (error) {
|