@ronin/compiler 0.14.14-leo-ron-1099-1-experimental-361 → 0.15.0-leo-ron-1099-1-experimental-362

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 +7 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -566,8 +566,14 @@ var handleTo = (models, model, statementParams, queryType, dependencyStatements,
566
566
  // src/instructions/using.ts
567
567
  var handleUsing = (model, instructions) => {
568
568
  const normalizedUsing = Array.isArray(instructions.using) ? Object.fromEntries(instructions.using.map((presetSlug) => [presetSlug, null])) : instructions.using;
569
+ if ("links" in normalizedUsing) {
570
+ for (const field of model.fields) {
571
+ if (field.type !== "link" || field.kind === "many") continue;
572
+ normalizedUsing[field.slug] = null;
573
+ }
574
+ }
569
575
  for (const presetSlug in normalizedUsing) {
570
- if (!Object.hasOwn(normalizedUsing, presetSlug)) continue;
576
+ if (!Object.hasOwn(normalizedUsing, presetSlug) || presetSlug === "links") continue;
571
577
  const arg = normalizedUsing[presetSlug];
572
578
  const preset = model.presets?.find((preset2) => preset2.slug === presetSlug);
573
579
  if (!preset) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronin/compiler",
3
- "version": "0.14.14-leo-ron-1099-1-experimental-361",
3
+ "version": "0.15.0-leo-ron-1099-1-experimental-362",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {