@ronin/compiler 0.16.2 → 0.16.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 +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -821,7 +821,8 @@ var filterSelectedFields = (model, instruction) => {
|
|
821
821
|
var prepareStatementValue = (statementParams, value) => {
|
822
822
|
if (value === null) return "NULL";
|
823
823
|
if (!statementParams) {
|
824
|
-
|
824
|
+
if (typeof value === "string") return `'${value}'`;
|
825
|
+
const valueString = typeof value === "object" ? `json('${JSON.stringify(value, replaceJSON)}')` : value.toString();
|
825
826
|
return valueString;
|
826
827
|
}
|
827
828
|
let formattedValue = value;
|
@@ -859,7 +860,7 @@ var composeFieldValues = (models, model, statementParams, instructionName, value
|
|
859
860
|
);
|
860
861
|
const collectStatementValue = options.type !== "fields";
|
861
862
|
const symbol = getQuerySymbol(value);
|
862
|
-
let conditionMatcher = "=";
|
863
|
+
let conditionMatcher = instructionName === "to" ? "=" : getMatcher(value, false);
|
863
864
|
let conditionValue = value;
|
864
865
|
if (options.condition) {
|
865
866
|
[conditionMatcher, conditionValue] = WITH_CONDITIONS[options.condition](value);
|