@ronin/compiler 0.16.0 → 0.16.1

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
@@ -392,7 +392,9 @@ type AmountResult = {
392
392
  amount: number;
393
393
  };
394
394
  type RegularResult<T = ResultRecord> = SingleRecordResult<T> | MultipleRecordResult<T> | AmountResult;
395
- type ExpandedResult<T = ResultRecord> = Record<Model['slug'], RegularResult<T>>;
395
+ type ExpandedResult<T = ResultRecord> = {
396
+ models: Record<Model['slug'], RegularResult<T>>;
397
+ };
396
398
  type Result<T = ResultRecord> = RegularResult<T> | ExpandedResult<T>;
397
399
 
398
400
  interface TransactionOptions {
@@ -415,4 +417,4 @@ declare class Transaction {
415
417
 
416
418
  declare const CLEAN_ROOT_MODEL: PublicModel;
417
419
 
418
- export { type AddInstructions, type AddQuery, type AddInstructions as AddQueryInstructions, type AlterQuery, type CombinedInstructions, type CountInstructions, type CountQuery, type CountInstructions as CountQueryInstructions, type CreateQuery, type DropQuery, type GetInstructions, type GetQuery, type GetInstructions as GetQueryInstructions, type PublicModel as Model, type ModelField, type ModelIndex, type ModelPreset, type ModelTrigger, QUERY_SYMBOLS, type Query, type QueryInstructionType as QueryInstruction, type QuerySchemaType, type QueryType, CLEAN_ROOT_MODEL as ROOT_MODEL, type RemoveInstructions, type RemoveQuery, type RemoveInstructions as RemoveQueryInstructions, type Result, type ResultRecord, RoninError, type SetInstructions, type SetQuery, type SetInstructions as SetQueryInstructions, type Statement, type StoredObject, Transaction, type WithInstruction, getQuerySymbol };
420
+ export { type AddInstructions, type AddQuery, type AddInstructions as AddQueryInstructions, type AlterQuery, type CombinedInstructions, type CountInstructions, type CountQuery, type CountInstructions as CountQueryInstructions, type CreateQuery, type DropQuery, type ExpandedResult, type GetInstructions, type GetQuery, type GetInstructions as GetQueryInstructions, type PublicModel as Model, type ModelField, type ModelIndex, type ModelPreset, type ModelTrigger, QUERY_SYMBOLS, type Query, type QueryInstructionType as QueryInstruction, type QuerySchemaType, type QueryType, CLEAN_ROOT_MODEL as ROOT_MODEL, type RegularResult, type RemoveInstructions, type RemoveQuery, type RemoveInstructions as RemoveQueryInstructions, type Result, type ResultRecord, RoninError, type SetInstructions, type SetQuery, type SetInstructions as SetQueryInstructions, type Statement, type StoredObject, Transaction, type WithInstruction, getQuerySymbol };
package/dist/index.js CHANGED
@@ -2145,8 +2145,9 @@ var Transaction = class {
2145
2145
  if (!returning) return finalResults;
2146
2146
  const addResult = (result2) => {
2147
2147
  if (typeof expansionIndex !== "undefined") {
2148
- if (!finalResults[expansionIndex]) finalResults[expansionIndex] = {};
2149
- finalResults[expansionIndex][queryModel] = result2;
2148
+ let match = finalResults[expansionIndex];
2149
+ if (!match) match = finalResults[expansionIndex] = { models: {} };
2150
+ match.models[queryModel] = result2;
2150
2151
  } else {
2151
2152
  finalResults.push(result2);
2152
2153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronin/compiler",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "type": "module",
5
5
  "description": "Compiles RONIN queries to SQL statements.",
6
6
  "publishConfig": {