@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 +0 -1
- package/dist/index.js +4 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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);
|
@@ -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]) => {
|