@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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  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
- const valueString = typeof value === "object" ? `json('${JSON.stringify(value, replaceJSON)}')` : `'${value.toString()}'`;
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronin/compiler",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {