@ronin/compiler 0.16.2 → 0.16.3-leo-ron-1099-experimental-370

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.d.ts CHANGED
@@ -371,7 +371,6 @@ type ObjectRow = Record<string, unknown>;
371
371
  type ResultRecord = Record<string, unknown> & {
372
372
  id: string;
373
373
  ronin: {
374
- locked: boolean;
375
374
  createdAt: string;
376
375
  createdBy: string | null;
377
376
  updatedAt: string;
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);
@@ -1464,11 +1465,6 @@ var getSystemFields = (idPrefix) => [
1464
1465
  [QUERY_SYMBOLS.EXPRESSION]: `'${idPrefix}_' || lower(substr(hex(randomblob(12)), 1, 16))`
1465
1466
  }
1466
1467
  },
1467
- {
1468
- name: "RONIN - Locked",
1469
- type: "boolean",
1470
- slug: "ronin.locked"
1471
- },
1472
1468
  {
1473
1469
  name: "RONIN - Created At",
1474
1470
  type: "date",
@@ -2060,7 +2056,7 @@ var Transaction = class {
2060
2056
  if (field.type === "json" || field.type === "blob") {
2061
2057
  newValue = JSON.parse(newValue);
2062
2058
  } else if (field.type === "boolean") {
2063
- newValue = Boolean(newValue);
2059
+ newValue = newValue === null ? newValue : Boolean(newValue);
2064
2060
  }
2065
2061
  if (isMeta && PLURAL_MODEL_ENTITIES_VALUES.includes(newSlug)) {
2066
2062
  newValue = newValue ? Object.entries(newValue).map(([slug, attributes]) => {
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-leo-ron-1099-experimental-370",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {