@ronin/compiler 0.13.10-leo-ron-1099-experimental-303 → 0.13.10-leo-ron-1099-experimental-305
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 +10 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1421,7 +1421,7 @@ var getSystemModels = (models, model) => {
|
|
1421
1421
|
}
|
1422
1422
|
}
|
1423
1423
|
}
|
1424
|
-
return addedModels;
|
1424
|
+
return addedModels.map((model2) => addDefaultModelAttributes(model2, true));
|
1425
1425
|
};
|
1426
1426
|
var typesInSQLite = {
|
1427
1427
|
link: "TEXT",
|
@@ -1845,24 +1845,25 @@ var Transaction = class {
|
|
1845
1845
|
* @returns The composed SQL statements.
|
1846
1846
|
*/
|
1847
1847
|
compileQueries = (queries, models, options) => {
|
1848
|
-
const modelsWithAttributes = models.map((model) => {
|
1848
|
+
const modelsWithAttributes = [ROOT_MODEL, ...models].map((model) => {
|
1849
1849
|
return addDefaultModelAttributes(model, true);
|
1850
1850
|
});
|
1851
|
-
const
|
1852
|
-
|
1853
|
-
|
1851
|
+
const modelsWithFields = [
|
1852
|
+
...modelsWithAttributes.flatMap((model) => {
|
1853
|
+
return getSystemModels(modelsWithAttributes, model);
|
1854
|
+
}),
|
1854
1855
|
...modelsWithAttributes
|
1855
1856
|
].map((model) => {
|
1856
1857
|
return addDefaultModelFields(model, true);
|
1857
1858
|
});
|
1858
|
-
const
|
1859
|
-
return addDefaultModelPresets(
|
1859
|
+
const modelsWithPresets = modelsWithFields.map((model) => {
|
1860
|
+
return addDefaultModelPresets(modelsWithFields, model);
|
1860
1861
|
});
|
1861
1862
|
const statements = [];
|
1862
1863
|
for (const query of queries) {
|
1863
1864
|
const result = compileQueryInput(
|
1864
1865
|
query,
|
1865
|
-
|
1866
|
+
modelsWithPresets,
|
1866
1867
|
options?.inlineParams ? null : [],
|
1867
1868
|
{ expandColumns: options?.expandColumns }
|
1868
1869
|
);
|
@@ -1876,7 +1877,7 @@ var Transaction = class {
|
|
1876
1877
|
}))
|
1877
1878
|
);
|
1878
1879
|
}
|
1879
|
-
this.models =
|
1880
|
+
this.models = modelsWithPresets;
|
1880
1881
|
return statements;
|
1881
1882
|
};
|
1882
1883
|
formatRows(fields, rows, single, isMeta) {
|
package/package.json
CHANGED