@ronin/compiler 0.13.2 → 0.13.3
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.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -808,10 +808,14 @@ var splitQuery = (query) => {
|
|
808
808
|
};
|
809
809
|
|
810
810
|
// src/utils/statement.ts
|
811
|
+
var replaceJSON = (key, value) => {
|
812
|
+
if (key === QUERY_SYMBOLS.EXPRESSION) return value.replaceAll(`'`, `''`);
|
813
|
+
return value;
|
814
|
+
};
|
811
815
|
var prepareStatementValue = (statementParams, value) => {
|
812
816
|
if (value === null) return "NULL";
|
813
817
|
if (!statementParams) {
|
814
|
-
const valueString = typeof value === "object" ? `json('${JSON.stringify(value)}')` : `'${value.toString()}'`;
|
818
|
+
const valueString = typeof value === "object" ? `json('${JSON.stringify(value, replaceJSON)}')` : `'${value.toString()}'`;
|
815
819
|
return valueString;
|
816
820
|
}
|
817
821
|
let formattedValue = value;
|