@ronin/compiler 0.17.19-corny-pagination-bug-experimental-413 → 0.17.19-corny-pagination-bug-experimental-415

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
@@ -258,6 +258,8 @@ type InternalModelField = ModelField & {
258
258
  mountingPath: string;
259
259
  /** A custom value that was provided in the query, which is not stored in the DB. */
260
260
  mountedValue?: unknown;
261
+ /** Indicator if the field should be excluded from the final records. */
262
+ excluded?: boolean;
261
263
  };
262
264
  type ModelIndexField<T extends ModelEntityList<ModelField> = ModelEntityList<ModelField>> = {
263
265
  /** The collating sequence used for text placed inside the field. */
@@ -484,9 +486,7 @@ declare class Transaction {
484
486
  *
485
487
  * @returns A formatted RONIN result for a particular query.
486
488
  */
487
- formatIndividualResult<RecordType>(queryType: QueryType, queryInstructions: CombinedInstructions, model: Model, rows: Array<Array<RawRow>>, selectedFields: Array<InternalModelField & {
488
- drop?: boolean;
489
- }>, single: boolean): RegularResult<RecordType>;
489
+ formatIndividualResult<RecordType>(queryType: QueryType, queryInstructions: CombinedInstructions, model: Model, rows: Array<Array<RawRow>>, selectedFields: Array<InternalModelField>, single: boolean): RegularResult<RecordType>;
490
490
  formatResults<RecordType>(results: Array<Array<ObjectRow>>, raw?: false): Array<Result<RecordType>>;
491
491
  formatResults<RecordType>(results: Array<Array<RawRow>>, raw?: true): Array<Result<RecordType>>;
492
492
  }
package/dist/index.js CHANGED
@@ -381,7 +381,10 @@ var handleOrderedBy = (model, instruction) => {
381
381
  // src/instructions/selecting.ts
382
382
  var handleSelecting = (models, model, statementParams, single, instructions, queryType, options = { inlineDefaults: false }) => {
383
383
  let isJoining = false;
384
- const selectedFields = filterSelectedFields(model, instructions.selecting).filter((field) => !(field.type === "link" && field.kind === "many")).map((field) => {
384
+ const selectedFields = filterSelectedFields(
385
+ model,
386
+ instructions.selecting
387
+ ).filter((field) => !(field.type === "link" && field.kind === "many")).map((field) => {
385
388
  const newField = { ...field, mountingPath: field.slug };
386
389
  if (options.mountingPath && options.mountingPath !== "ronin_root") {
387
390
  newField.mountingPath = `${options.mountingPath.replace(/\{\d+\}/g, "")}.${field.slug}`;
@@ -457,7 +460,7 @@ var handleSelecting = (models, model, statementParams, single, instructions, que
457
460
  selectedFields.push({
458
461
  ...getSystemFields(model.idPrefix)["ronin.createdAt"],
459
462
  slug: "ronin.createdAt",
460
- drop: true,
463
+ excluded: true,
461
464
  mountingPath: "ronin.createdAt"
462
465
  });
463
466
  }
@@ -1103,7 +1106,8 @@ var compileQueryInput = (defaultQuery, models, statementParams, options) => {
1103
1106
  single,
1104
1107
  {
1105
1108
  selecting: instructions?.selecting,
1106
- including: instructions?.including
1109
+ including: instructions?.including,
1110
+ limitedTo: instructions?.limitedTo
1107
1111
  },
1108
1112
  queryType,
1109
1113
  // biome-ignore lint/complexity/useSimplifiedLogicExpression: This is needed.
@@ -2316,7 +2320,7 @@ var Transaction = class {
2316
2320
  );
2317
2321
  }
2318
2322
  }
2319
- const fieldsToDrop = selectedFields.filter((field) => field.drop === true);
2323
+ const fieldsToDrop = selectedFields.filter((field) => field.excluded === true);
2320
2324
  const deleteNestedProperty = (obj, path) => {
2321
2325
  const parts = path.split(".");
2322
2326
  const lastPart = parts.pop();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronin/compiler",
3
- "version": "0.17.19-corny-pagination-bug-experimental-413",
3
+ "version": "0.17.19-corny-pagination-bug-experimental-415",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {