@contember/engine-content-api 2.2.0-alpha.14 → 2.2.0-alpha.16

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 (156) hide show
  1. package/CLAUDE.md +1 -0
  2. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneReducerExecutionHandler.cjs +1 -0
  3. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneReducerExecutionHandler.cjs.map +1 -1
  4. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneReducerExecutionHandler.js +1 -0
  5. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneReducerExecutionHandler.js.map +1 -1
  6. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs +1 -0
  7. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs.map +1 -1
  8. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js +1 -0
  9. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js.map +1 -1
  10. package/dist/development/src/extensions/paginatedHasMany/PaginatedHasManyExecutionHandler.cjs +1 -0
  11. package/dist/development/src/extensions/paginatedHasMany/PaginatedHasManyExecutionHandler.cjs.map +1 -1
  12. package/dist/development/src/extensions/paginatedHasMany/PaginatedHasManyExecutionHandler.js +1 -0
  13. package/dist/development/src/extensions/paginatedHasMany/PaginatedHasManyExecutionHandler.js.map +1 -1
  14. package/dist/development/src/extensions/paginatedHasMany/PaginatedHasManyFieldProviderVisitor.cjs +1 -0
  15. package/dist/development/src/extensions/paginatedHasMany/PaginatedHasManyFieldProviderVisitor.cjs.map +1 -1
  16. package/dist/development/src/extensions/paginatedHasMany/PaginatedHasManyFieldProviderVisitor.js +1 -0
  17. package/dist/development/src/extensions/paginatedHasMany/PaginatedHasManyFieldProviderVisitor.js.map +1 -1
  18. package/dist/development/src/mapper/ErrorUtils.cjs +7 -1
  19. package/dist/development/src/mapper/ErrorUtils.cjs.map +1 -1
  20. package/dist/development/src/mapper/ErrorUtils.js +7 -1
  21. package/dist/development/src/mapper/ErrorUtils.js.map +1 -1
  22. package/dist/development/src/mapper/Mapper.cjs +2 -1
  23. package/dist/development/src/mapper/Mapper.cjs.map +1 -1
  24. package/dist/development/src/mapper/Mapper.js +2 -1
  25. package/dist/development/src/mapper/Mapper.js.map +1 -1
  26. package/dist/development/src/mapper/select/Path.cjs +23 -3
  27. package/dist/development/src/mapper/select/Path.cjs.map +1 -1
  28. package/dist/development/src/mapper/select/Path.js +23 -3
  29. package/dist/development/src/mapper/select/Path.js.map +1 -1
  30. package/dist/development/src/mapper/select/SelectBuilder.cjs +5 -5
  31. package/dist/development/src/mapper/select/SelectBuilder.cjs.map +1 -1
  32. package/dist/development/src/mapper/select/SelectBuilder.js +5 -5
  33. package/dist/development/src/mapper/select/SelectBuilder.js.map +1 -1
  34. package/dist/development/src/mapper/select/handlers/FieldsVisitor.cjs +1 -1
  35. package/dist/development/src/mapper/select/handlers/FieldsVisitor.cjs.map +1 -1
  36. package/dist/development/src/mapper/select/handlers/FieldsVisitor.js +1 -1
  37. package/dist/development/src/mapper/select/handlers/FieldsVisitor.js.map +1 -1
  38. package/dist/development/src/resolvers/MutationResolver.cjs +1 -0
  39. package/dist/development/src/resolvers/MutationResolver.cjs.map +1 -1
  40. package/dist/development/src/resolvers/MutationResolver.js +1 -0
  41. package/dist/development/src/resolvers/MutationResolver.js.map +1 -1
  42. package/dist/development/src/resolvers/ReadHelpers.cjs +1 -0
  43. package/dist/development/src/resolvers/ReadHelpers.cjs.map +1 -1
  44. package/dist/development/src/resolvers/ReadHelpers.js +1 -0
  45. package/dist/development/src/resolvers/ReadHelpers.js.map +1 -1
  46. package/dist/development/src/resolvers/ReadResolver.cjs +21 -7
  47. package/dist/development/src/resolvers/ReadResolver.cjs.map +1 -1
  48. package/dist/development/src/resolvers/ReadResolver.js +21 -7
  49. package/dist/development/src/resolvers/ReadResolver.js.map +1 -1
  50. package/dist/development/src/schema/GraphQlSchemaBuilderFactory.cjs +1 -0
  51. package/dist/development/src/schema/GraphQlSchemaBuilderFactory.cjs.map +1 -1
  52. package/dist/development/src/schema/GraphQlSchemaBuilderFactory.js +1 -0
  53. package/dist/development/src/schema/GraphQlSchemaBuilderFactory.js.map +1 -1
  54. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneReducerExecutionHandler.cjs +1 -0
  55. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneReducerExecutionHandler.cjs.map +1 -1
  56. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneReducerExecutionHandler.js +1 -0
  57. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneReducerExecutionHandler.js.map +1 -1
  58. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs +1 -0
  59. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs.map +1 -1
  60. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js +1 -0
  61. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js.map +1 -1
  62. package/dist/production/src/extensions/paginatedHasMany/PaginatedHasManyExecutionHandler.cjs +1 -0
  63. package/dist/production/src/extensions/paginatedHasMany/PaginatedHasManyExecutionHandler.cjs.map +1 -1
  64. package/dist/production/src/extensions/paginatedHasMany/PaginatedHasManyExecutionHandler.js +1 -0
  65. package/dist/production/src/extensions/paginatedHasMany/PaginatedHasManyExecutionHandler.js.map +1 -1
  66. package/dist/production/src/extensions/paginatedHasMany/PaginatedHasManyFieldProviderVisitor.cjs +1 -0
  67. package/dist/production/src/extensions/paginatedHasMany/PaginatedHasManyFieldProviderVisitor.cjs.map +1 -1
  68. package/dist/production/src/extensions/paginatedHasMany/PaginatedHasManyFieldProviderVisitor.js +1 -0
  69. package/dist/production/src/extensions/paginatedHasMany/PaginatedHasManyFieldProviderVisitor.js.map +1 -1
  70. package/dist/production/src/mapper/ErrorUtils.cjs +7 -1
  71. package/dist/production/src/mapper/ErrorUtils.cjs.map +1 -1
  72. package/dist/production/src/mapper/ErrorUtils.js +7 -1
  73. package/dist/production/src/mapper/ErrorUtils.js.map +1 -1
  74. package/dist/production/src/mapper/Mapper.cjs +2 -1
  75. package/dist/production/src/mapper/Mapper.cjs.map +1 -1
  76. package/dist/production/src/mapper/Mapper.js +2 -1
  77. package/dist/production/src/mapper/Mapper.js.map +1 -1
  78. package/dist/production/src/mapper/select/Path.cjs +23 -3
  79. package/dist/production/src/mapper/select/Path.cjs.map +1 -1
  80. package/dist/production/src/mapper/select/Path.js +23 -3
  81. package/dist/production/src/mapper/select/Path.js.map +1 -1
  82. package/dist/production/src/mapper/select/SelectBuilder.cjs +5 -5
  83. package/dist/production/src/mapper/select/SelectBuilder.cjs.map +1 -1
  84. package/dist/production/src/mapper/select/SelectBuilder.js +5 -5
  85. package/dist/production/src/mapper/select/SelectBuilder.js.map +1 -1
  86. package/dist/production/src/mapper/select/handlers/FieldsVisitor.cjs +1 -1
  87. package/dist/production/src/mapper/select/handlers/FieldsVisitor.cjs.map +1 -1
  88. package/dist/production/src/mapper/select/handlers/FieldsVisitor.js +1 -1
  89. package/dist/production/src/mapper/select/handlers/FieldsVisitor.js.map +1 -1
  90. package/dist/production/src/resolvers/MutationResolver.cjs +1 -0
  91. package/dist/production/src/resolvers/MutationResolver.cjs.map +1 -1
  92. package/dist/production/src/resolvers/MutationResolver.js +1 -0
  93. package/dist/production/src/resolvers/MutationResolver.js.map +1 -1
  94. package/dist/production/src/resolvers/ReadHelpers.cjs +1 -0
  95. package/dist/production/src/resolvers/ReadHelpers.cjs.map +1 -1
  96. package/dist/production/src/resolvers/ReadHelpers.js +1 -0
  97. package/dist/production/src/resolvers/ReadHelpers.js.map +1 -1
  98. package/dist/production/src/resolvers/ReadResolver.cjs +21 -7
  99. package/dist/production/src/resolvers/ReadResolver.cjs.map +1 -1
  100. package/dist/production/src/resolvers/ReadResolver.js +21 -7
  101. package/dist/production/src/resolvers/ReadResolver.js.map +1 -1
  102. package/dist/production/src/schema/GraphQlSchemaBuilderFactory.cjs +1 -0
  103. package/dist/production/src/schema/GraphQlSchemaBuilderFactory.cjs.map +1 -1
  104. package/dist/production/src/schema/GraphQlSchemaBuilderFactory.js +1 -0
  105. package/dist/production/src/schema/GraphQlSchemaBuilderFactory.js.map +1 -1
  106. package/dist/tests/cases/unit/mutationSqlError.test.d.ts +2 -0
  107. package/dist/tests/cases/unit/mutationSqlError.test.d.ts.map +1 -0
  108. package/dist/tests/cases/unit/pathAlias.test.d.ts +2 -0
  109. package/dist/tests/cases/unit/pathAlias.test.d.ts.map +1 -0
  110. package/dist/tests/tsconfig.tsbuildinfo +1 -1
  111. package/dist/types/mapper/ErrorUtils.d.ts.map +1 -1
  112. package/dist/types/mapper/select/Path.d.ts +1 -0
  113. package/dist/types/mapper/select/Path.d.ts.map +1 -1
  114. package/dist/types/mapper/select/SelectBuilder.d.ts.map +1 -1
  115. package/dist/types/resolvers/ReadResolver.d.ts.map +1 -1
  116. package/dist/types/tsconfig.tsbuildinfo +1 -1
  117. package/package.json +9 -9
  118. package/src/mapper/ErrorUtils.ts +11 -1
  119. package/src/mapper/Mapper.ts +1 -1
  120. package/src/mapper/select/Path.ts +25 -5
  121. package/src/mapper/select/SelectBuilder.ts +5 -4
  122. package/src/mapper/select/handlers/FieldsVisitor.ts +1 -1
  123. package/src/resolvers/ReadResolver.ts +24 -7
  124. package/tests/cases/bugs/bug102.test.ts +4 -4
  125. package/tests/cases/integration/graphQlRequests/delete/deleteById.test.ts +4 -3
  126. package/tests/cases/integration/graphQlRequests/query/acl/differentRowAndFieldPredicate.test.ts +4 -4
  127. package/tests/cases/integration/graphQlRequests/query/acl/fieldRestrictedByLocale.test.ts +12 -10
  128. package/tests/cases/integration/graphQlRequests/query/acl/metaReadableThroughContext.test.ts +15 -15
  129. package/tests/cases/integration/graphQlRequests/query/acl/nestedPredicate.test.ts +7 -6
  130. package/tests/cases/integration/graphQlRequests/query/acl/nonAdjacentBackReference.test.ts +6 -6
  131. package/tests/cases/integration/graphQlRequests/query/acl/orderByCellPredicate.test.ts +6 -6
  132. package/tests/cases/integration/graphQlRequests/query/acl/predicateElimination.test.ts +25 -23
  133. package/tests/cases/integration/graphQlRequests/query/acl/relationAcl.test.ts +12 -9
  134. package/tests/cases/integration/graphQlRequests/query/acl/rowPredicateSubset.test.ts +6 -6
  135. package/tests/cases/integration/graphQlRequests/query/acl/throughScope.test.ts +14 -12
  136. package/tests/cases/integration/graphQlRequests/query/acl/throughScopeNullability.test.ts +4 -4
  137. package/tests/cases/integration/graphQlRequests/query/filter/backReferencedFilter.test.ts +3 -1
  138. package/tests/cases/integration/graphQlRequests/query/graphqlFeatures/alias.test.ts +2 -2
  139. package/tests/cases/integration/graphQlRequests/query/graphqlFeatures/fragments.test.ts +8 -8
  140. package/tests/cases/integration/graphQlRequests/query/misc/reducedHasMany.test.ts +10 -10
  141. package/tests/cases/integration/graphQlRequests/query/pagination/hasManyLimit.test.ts +8 -8
  142. package/tests/cases/integration/graphQlRequests/query/pagination/paginate.test.ts +5 -4
  143. package/tests/cases/integration/graphQlRequests/query/pagination/paginateAliased.test.ts +5 -4
  144. package/tests/cases/integration/graphQlRequests/query/relations/advanced.test.ts +17 -8
  145. package/tests/cases/integration/graphQlRequests/query/relations/manyHasManyInverse.test.ts +6 -6
  146. package/tests/cases/integration/graphQlRequests/query/relations/manyHasManyOwning.test.ts +6 -6
  147. package/tests/cases/integration/graphQlRequests/query/relations/manyHasOne.test.ts +12 -9
  148. package/tests/cases/integration/graphQlRequests/query/relations/oneHasMany.test.ts +12 -12
  149. package/tests/cases/integration/graphQlRequests/query/relations/oneHasOneInverse.test.ts +6 -4
  150. package/tests/cases/integration/graphQlRequests/query/relations/oneHasOneOwner.test.ts +6 -4
  151. package/tests/cases/integration/graphQlRequests/query/sorting/defaultOrdering.test.ts +4 -4
  152. package/tests/cases/integration/graphQlRequests/query/sorting/randomSort.test.ts +5 -5
  153. package/tests/cases/integration/graphQlRequests/query/sorting/sortedHasMany.test.ts +2 -2
  154. package/tests/cases/integration/graphQlRequests/query/view/view.test.ts +6 -6
  155. package/tests/cases/unit/mutationSqlError.test.ts +30 -0
  156. package/tests/cases/unit/pathAlias.test.ts +26 -0
@@ -87,7 +87,7 @@ test('predicate with OR', async () => {
87
87
  }`,
88
88
  executes: [
89
89
  {
90
- sql: SQL`SELECT "root_"."id" AS "root_id", "root_"."image_id" AS "root_image"
90
+ sql: SQL`SELECT "root_"."id" AS "root_id", "root_"."image_id" as "root_$key_image"
91
91
  FROM "public"."author" AS "root_"
92
92
  WHERE "root_"."is_public" = ?`,
93
93
  parameters: [true],
@@ -95,19 +95,20 @@ test('predicate with OR', async () => {
95
95
  rows: [
96
96
  {
97
97
  root_id: testUuid(1),
98
- root_image: testUuid(2),
98
+ 'root_$key_image': testUuid(2),
99
99
  },
100
100
  ],
101
101
  },
102
102
  },
103
103
  {
104
104
  sql:
105
- `select "root_"."id" as "root_id", "root_"."url" as "root_url", "root_"."id" as "root_id" from "public"."image" as "root_" where "root_"."id" in (?)`,
105
+ `select "root_"."id" as "root_$index_id", "root_"."url" as "root_url", "root_"."id" as "root_id" from "public"."image" as "root_" where "root_"."id" in (?)`,
106
106
  parameters: [testUuid(2)],
107
107
  response: {
108
108
  rows: [
109
109
  {
110
110
  root_id: testUuid(2),
111
+ 'root_$index_id': testUuid(2),
111
112
  root_url: 'abcd',
112
113
  },
113
114
  ],
@@ -189,12 +190,13 @@ test('does apply primary filter even if relation predicate eliminates it', async
189
190
  executes: [
190
191
  {
191
192
  sql:
192
- SQL`select "root_"."title" as "root_title", "root_"."id" as "root_id", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."article" as "root_" where "root_"."id" = ? and "root_"."id" in (?)`,
193
+ SQL`select "root_"."title" as "root_title", "root_"."id" as "root_$key_id", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."article" as "root_" where "root_"."id" = ? and "root_"."id" in (?)`,
193
194
  parameters: [testUuid(1), testUuid(1)],
194
195
  response: {
195
196
  rows: [
196
197
  {
197
198
  root_id: testUuid(1),
199
+ 'root_$key_id': testUuid(1),
198
200
  root_title: 'Article A',
199
201
  },
200
202
  ],
@@ -210,7 +212,7 @@ test('does apply primary filter even if relation predicate eliminates it', async
210
212
  },
211
213
  {
212
214
  sql:
213
- SQL`select "root_"."article_id" as "root_article", "root_"."views" as "root_views", "root_"."id" as "root_id" from "public"."article_stats" as "root_" where "root_"."article_id" in (?)`,
215
+ SQL`select "root_"."article_id" as "root_$index_article", "root_"."views" as "root_views", "root_"."id" as "root_id" from "public"."article_stats" as "root_" where "root_"."article_id" in (?)`,
214
216
  parameters: [testUuid(1)],
215
217
  response: {
216
218
  rows: [],
@@ -266,11 +268,11 @@ test('self-referencing: children should have their own predicate applied', async
266
268
  {
267
269
  // Parent categories - must have isActive = true
268
270
  sql:
269
- SQL`select "root_"."name" as "root_name", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."category" as "root_" where "root_"."is_active" = ?`,
271
+ SQL`select "root_"."name" as "root_name", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."category" as "root_" where "root_"."is_active" = ?`,
270
272
  parameters: [true],
271
273
  response: {
272
274
  rows: [
273
- { root_id: testUuid(1), root_name: 'Parent Category' },
275
+ { root_id: testUuid(1), 'root_$key_id': testUuid(1), root_name: 'Parent Category' },
274
276
  ],
275
277
  },
276
278
  },
@@ -350,11 +352,11 @@ test('multiple relations: articles via author should apply article predicate', a
350
352
  {
351
353
  // Persons - must have isActive = true
352
354
  sql:
353
- SQL`select "root_"."name" as "root_name", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."person" as "root_" where "root_"."is_active" = ?`,
355
+ SQL`select "root_"."name" as "root_name", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."person" as "root_" where "root_"."is_active" = ?`,
354
356
  parameters: [true],
355
357
  response: {
356
358
  rows: [
357
- { root_id: testUuid(1), root_name: 'John' },
359
+ { root_id: testUuid(1), 'root_$key_id': testUuid(1), root_name: 'John' },
358
360
  ],
359
361
  },
360
362
  },
@@ -431,11 +433,11 @@ test('back-reference predicate should be eliminated but join filter preserved',
431
433
  {
432
434
  // Articles - must have isPublished = true
433
435
  sql:
434
- SQL`select "root_"."title" as "root_title", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."article" as "root_" where "root_"."is_published" = ?`,
436
+ SQL`select "root_"."title" as "root_title", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."article" as "root_" where "root_"."is_published" = ?`,
435
437
  parameters: [true],
436
438
  response: {
437
439
  rows: [
438
- { root_id: testUuid(1), root_title: 'Published Article' },
440
+ { root_id: testUuid(1), 'root_$key_id': testUuid(1), root_title: 'Published Article' },
439
441
  ],
440
442
  },
441
443
  },
@@ -526,22 +528,22 @@ test('deep nesting: predicates should be properly eliminated at each level', asy
526
528
  {
527
529
  // Companies - must have isActive = true
528
530
  sql:
529
- SQL`select "root_"."name" as "root_name", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."company" as "root_" where "root_"."is_active" = ?`,
531
+ SQL`select "root_"."name" as "root_name", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."company" as "root_" where "root_"."is_active" = ?`,
530
532
  parameters: [true],
531
533
  response: {
532
534
  rows: [
533
- { root_id: testUuid(1), root_name: 'Acme Corp' },
535
+ { root_id: testUuid(1), 'root_$key_id': testUuid(1), root_name: 'Acme Corp' },
534
536
  ],
535
537
  },
536
538
  },
537
539
  {
538
540
  // Departments - back-reference predicate eliminated, join filter preserved
539
541
  sql:
540
- SQL`select "root_"."company_id" as "__grouping_key", "root_"."name" as "root_name", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."department" as "root_" where "root_"."company_id" in (?)`,
542
+ SQL`select "root_"."company_id" as "__grouping_key", "root_"."name" as "root_name", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."department" as "root_" where "root_"."company_id" in (?)`,
541
543
  parameters: [testUuid(1)],
542
544
  response: {
543
545
  rows: [
544
- { __grouping_key: testUuid(1), root_id: testUuid(2), root_name: 'Engineering' },
546
+ { __grouping_key: testUuid(1), root_id: testUuid(2), 'root_$key_id': testUuid(2), root_name: 'Engineering' },
545
547
  ],
546
548
  },
547
549
  },
@@ -676,11 +678,11 @@ test('multi-level back-reference: predicates should be eliminated at each level'
676
678
  {
677
679
  // Companies - must have isActive = true
678
680
  sql:
679
- SQL`select "root_"."name" as "root_name", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."company" as "root_" where "root_"."is_active" = ?`,
681
+ SQL`select "root_"."name" as "root_name", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."company" as "root_" where "root_"."is_active" = ?`,
680
682
  parameters: [true],
681
683
  response: {
682
684
  rows: [
683
- { root_id: testUuid(1), root_name: 'Acme Corp' },
685
+ { root_id: testUuid(1), 'root_$key_id': testUuid(1), root_name: 'Acme Corp' },
684
686
  ],
685
687
  },
686
688
  },
@@ -688,11 +690,11 @@ test('multi-level back-reference: predicates should be eliminated at each level'
688
690
  // Departments - back-reference predicate (company.isActive) should be eliminated
689
691
  // Only join filter preserved
690
692
  sql:
691
- SQL`select "root_"."company_id" as "__grouping_key", "root_"."name" as "root_name", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."department" as "root_" where "root_"."company_id" in (?)`,
693
+ SQL`select "root_"."company_id" as "__grouping_key", "root_"."name" as "root_name", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."department" as "root_" where "root_"."company_id" in (?)`,
692
694
  parameters: [testUuid(1)],
693
695
  response: {
694
696
  rows: [
695
- { __grouping_key: testUuid(1), root_id: testUuid(2), root_name: 'Engineering' },
697
+ { __grouping_key: testUuid(1), root_id: testUuid(2), 'root_$key_id': testUuid(2), root_name: 'Engineering' },
696
698
  ],
697
699
  },
698
700
  },
@@ -700,11 +702,11 @@ test('multi-level back-reference: predicates should be eliminated at each level'
700
702
  // Employees - multi-level back-reference predicate (department.company.isActive) should be eliminated
701
703
  // Only join filter preserved
702
704
  sql:
703
- SQL`select "root_"."department_id" as "__grouping_key", "root_"."name" as "root_name", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."employee" as "root_" where "root_"."department_id" in (?)`,
705
+ SQL`select "root_"."department_id" as "__grouping_key", "root_"."name" as "root_name", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."employee" as "root_" where "root_"."department_id" in (?)`,
704
706
  parameters: [testUuid(2)],
705
707
  response: {
706
708
  rows: [
707
- { __grouping_key: testUuid(2), root_id: testUuid(3), root_name: 'Alice' },
709
+ { __grouping_key: testUuid(2), root_id: testUuid(3), 'root_$key_id': testUuid(3), root_name: 'Alice' },
708
710
  ],
709
711
  },
710
712
  },
@@ -768,11 +770,11 @@ test('user filter on has-many should be preserved alongside join filter', async
768
770
  executes: [
769
771
  {
770
772
  sql:
771
- SQL`select "root_"."name" as "root_name", "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."company" as "root_" where "root_"."id" in (?)`,
773
+ SQL`select "root_"."name" as "root_name", "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."company" as "root_" where "root_"."id" in (?)`,
772
774
  parameters: [testUuid(1)],
773
775
  response: {
774
776
  rows: [
775
- { root_id: testUuid(1), root_name: 'Acme Corp' },
777
+ { root_id: testUuid(1), 'root_$key_id': testUuid(1), root_name: 'Acme Corp' },
776
778
  ],
777
779
  },
778
780
  },
@@ -50,33 +50,34 @@ test('can read same entity only over relation of some rows - many has one', asyn
50
50
  executes: [
51
51
  {
52
52
  sql:
53
- SQL`select "root_"."title" as "root_title", "root_"."disclose_author" = ? as "root___predicate_discloseAuthor_eq_true", "root_"."author_id" as "root_author", "root_"."id" as "root_id"
53
+ SQL`select "root_"."title" as "root_title", "root_"."disclose_author" = ? as "root_$predicate_discloseAuthor_eq_true", "root_"."author_id" as "root_$key_author", "root_"."id" as "root_id"
54
54
  from "public"."article" as "root_"`,
55
55
  response: {
56
56
  rows: [
57
57
  {
58
58
  root_id: testUuid(1),
59
59
  root_title: 'Article A',
60
- root___predicate_discloseAuthor_eq_true: true,
61
- root_author: testUuid(10),
60
+ 'root_$predicate_discloseAuthor_eq_true': true,
61
+ 'root_$key_author': testUuid(10),
62
62
  },
63
63
  {
64
64
  root_id: testUuid(2),
65
65
  root_title: 'Article B',
66
- root___predicate_discloseAuthor_eq_true: false,
67
- root_author: testUuid(10),
66
+ 'root_$predicate_discloseAuthor_eq_true': false,
67
+ 'root_$key_author': testUuid(10),
68
68
  },
69
69
  ],
70
70
  },
71
71
  },
72
72
  {
73
73
  sql:
74
- SQL`select "root_"."id" as "root_id", "root_"."name" as "root_name", "root_"."id" as "root_id" from "public"."author" as "root_" where "root_"."id" in (?)`,
74
+ SQL`select "root_"."id" as "root_$index_id", "root_"."name" as "root_name", "root_"."id" as "root_id" from "public"."author" as "root_" where "root_"."id" in (?)`,
75
75
  parameters: [testUuid(10)],
76
76
  response: {
77
77
  rows: [
78
78
  {
79
79
  root_id: testUuid(10),
80
+ 'root_$index_id': testUuid(10),
80
81
  root_name: 'John doe',
81
82
  },
82
83
  ],
@@ -147,19 +148,21 @@ test('can read same entity only over relation of some rows - many has many', asy
147
148
  executes: [
148
149
  {
149
150
  sql:
150
- SQL`select "root_"."title" as "root_title", "root_"."disclose_author" = ? as "root___predicate_discloseauthor_eq_true", "root_"."id" as "root_id", "root_"."id" as "root_id"
151
+ SQL`select "root_"."title" as "root_title", "root_"."disclose_author" = ? as "root_$predicate_discloseAuthor_eq_true", "root_"."id" as "root_$key_id", "root_"."id" as "root_id"
151
152
  from "public"."article" as "root_"`,
152
153
  response: {
153
154
  rows: [
154
155
  {
155
156
  root_id: testUuid(1),
157
+ 'root_$key_id': testUuid(1),
156
158
  root_title: 'Article A',
157
- root___predicate_discloseAuthor_eq_true: true,
159
+ 'root_$predicate_discloseAuthor_eq_true': true,
158
160
  },
159
161
  {
160
162
  root_id: testUuid(2),
163
+ 'root_$key_id': testUuid(2),
161
164
  root_title: 'Article B',
162
- root___predicate_discloseAuthor_eq_true: false,
165
+ 'root_$predicate_discloseAuthor_eq_true': false,
163
166
  },
164
167
  ],
165
168
  },
@@ -53,9 +53,9 @@ test('row level predicate includes main predicate', async () => {
53
53
  {
54
54
  sql: SQL`SELECT
55
55
  "root_"."id" AS "root_id",
56
- TRUE AS "root___predicate_isPublished_eq_true",
56
+ TRUE as "root_$predicate_isPublished_eq_true",
57
57
  "root_"."title" AS "root_title",
58
- "root_"."is_unlocked" = ? AS "root___predicate_and_isUnlocked_eq_true_isPubl",
58
+ "root_"."is_unlocked" = ? as "root_$predicate_and_isUnlocked_eq_true_isPubl",
59
59
  "root_"."content" AS "root_content"
60
60
  FROM "public"."article" AS "root_"
61
61
  WHERE "root_"."is_published" = ?`,
@@ -64,16 +64,16 @@ test('row level predicate includes main predicate', async () => {
64
64
  rows: [
65
65
  {
66
66
  root_id: testUuid(1),
67
- root___predicate_isPublished_eq_true: true,
67
+ 'root_$predicate_isPublished_eq_true': true,
68
68
  root_title: 'Hello',
69
- root___predicate_and_isUnlocked_eq_true_isPubl: false,
69
+ 'root_$predicate_and_isUnlocked_eq_true_isPubl': false,
70
70
  root_content: 'Foo bar',
71
71
  },
72
72
  {
73
73
  root_id: testUuid(2),
74
- root___predicate_isPublished_eq_true: true,
74
+ 'root_$predicate_isPublished_eq_true': true,
75
75
  root_title: 'Hello 2',
76
- root___predicate_and_isUnlocked_eq_true_isPubl: true,
76
+ 'root_$predicate_and_isUnlocked_eq_true_isPubl': true,
77
77
  root_content: 'Lorem ipsum',
78
78
  },
79
79
  ],
@@ -57,26 +57,27 @@ test('reads a through-only field over a relation', async () => {
57
57
  executes: [
58
58
  {
59
59
  sql:
60
- SQL`select "root_"."title" as "root_title", "root_"."author_id" as "root_author", "root_"."id" as "root_id" from "public"."article" as "root_"`,
60
+ SQL`select "root_"."title" as "root_title", "root_"."author_id" as "root_$key_author", "root_"."id" as "root_id" from "public"."article" as "root_"`,
61
61
  parameters: [],
62
62
  response: {
63
63
  rows: [
64
- { root_id: testUuid(1), root_title: 'Article A', root_author: testUuid(10) },
64
+ { root_id: testUuid(1), root_title: 'Article A', 'root_$key_author': testUuid(10) },
65
65
  ],
66
66
  },
67
67
  },
68
68
  {
69
69
  sql:
70
- SQL`select "root_"."id" as "root_id", "root_"."name" as "root_name", "root_"."disclosed" = ? as "root___predicate_disclosed_eq_true", "root_"."secret" as "root_secret", "root_"."id" as "root_id"
70
+ SQL`select "root_"."id" as "root_$index_id", "root_"."name" as "root_name", "root_"."disclosed" = ? as "root_$predicate_disclosed_eq_true", "root_"."secret" as "root_secret", "root_"."id" as "root_id"
71
71
  from "public"."author" as "root_" where "root_"."id" in (?)`,
72
72
  parameters: [true, testUuid(10)],
73
73
  response: {
74
74
  rows: [
75
75
  {
76
76
  root_id: testUuid(10),
77
+ 'root_$index_id': testUuid(10),
77
78
  root_name: 'John Doe',
78
79
  root_secret: 'shh',
79
- root___predicate_disclosed_eq_true: true,
80
+ 'root_$predicate_disclosed_eq_true': true,
80
81
  },
81
82
  ],
82
83
  },
@@ -197,21 +198,21 @@ test('the same entity is readable over a relation', async () => {
197
198
  }`,
198
199
  executes: [
199
200
  {
200
- sql: SQL`select "root_"."image_id" as "root_image", "root_"."id" as "root_id" from "public"."article" as "root_"`,
201
+ sql: SQL`select "root_"."image_id" as "root_$key_image", "root_"."id" as "root_id" from "public"."article" as "root_"`,
201
202
  parameters: [],
202
203
  response: {
203
204
  rows: [
204
- { root_id: testUuid(1), root_image: testUuid(20) },
205
+ { root_id: testUuid(1), 'root_$key_image': testUuid(20) },
205
206
  ],
206
207
  },
207
208
  },
208
209
  {
209
210
  sql:
210
- SQL`select "root_"."id" as "root_id", "root_"."url" as "root_url", "root_"."id" as "root_id" from "public"."image" as "root_" where "root_"."id" in (?)`,
211
+ SQL`select "root_"."id" as "root_$index_id", "root_"."url" as "root_url", "root_"."id" as "root_id" from "public"."image" as "root_" where "root_"."id" in (?)`,
211
212
  parameters: [testUuid(20)],
212
213
  response: {
213
214
  rows: [
214
- { root_id: testUuid(20), root_url: 'https://example.com/a.png' },
215
+ { root_id: testUuid(20), 'root_$index_id': testUuid(20), root_url: 'https://example.com/a.png' },
215
216
  ],
216
217
  },
217
218
  },
@@ -277,25 +278,26 @@ test('row-level predicate over a relation is the union of the root and through f
277
278
  }`,
278
279
  executes: [
279
280
  {
280
- sql: SQL`select "root_"."author_id" as "root_author", "root_"."id" as "root_id" from "public"."article" as "root_"`,
281
+ sql: SQL`select "root_"."author_id" as "root_$key_author", "root_"."id" as "root_id" from "public"."article" as "root_"`,
281
282
  parameters: [],
282
283
  response: {
283
284
  rows: [
284
- { root_id: testUuid(1), root_author: testUuid(10) },
285
+ { root_id: testUuid(1), 'root_$key_author': testUuid(10) },
285
286
  ],
286
287
  },
287
288
  },
288
289
  {
289
290
  sql:
290
- SQL`select "root_"."id" as "root_id", "root_"."disclosed" = ? as "root___predicate_disclosed_eq_true", "root_"."secret" as "root_secret", "root_"."id" as "root_id"
291
+ SQL`select "root_"."id" as "root_$index_id", "root_"."disclosed" = ? as "root_$predicate_disclosed_eq_true", "root_"."secret" as "root_secret", "root_"."id" as "root_id"
291
292
  from "public"."author" as "root_" where "root_"."id" in (?) and ("root_"."published" = ? or "root_"."disclosed" = ?)`,
292
293
  parameters: [true, testUuid(10), true, true],
293
294
  response: {
294
295
  rows: [
295
296
  {
296
297
  root_id: testUuid(10),
298
+ 'root_$index_id': testUuid(10),
297
299
  root_secret: 'shh',
298
- root___predicate_disclosed_eq_true: true,
300
+ 'root_$predicate_disclosed_eq_true': true,
299
301
  },
300
302
  ],
301
303
  },
@@ -94,21 +94,21 @@ test('the same not-null column is read over a relation', async () => {
94
94
  executes: [
95
95
  {
96
96
  sql:
97
- SQL`select "root_"."title" as "root_title", "root_"."author_id" as "root_author", "root_"."id" as "root_id" from "public"."article" as "root_"`,
97
+ SQL`select "root_"."title" as "root_title", "root_"."author_id" as "root_$key_author", "root_"."id" as "root_id" from "public"."article" as "root_"`,
98
98
  parameters: [],
99
99
  response: {
100
100
  rows: [
101
- { root_id: testUuid(1), root_title: 'Article A', root_author: testUuid(10) },
101
+ { root_id: testUuid(1), root_title: 'Article A', 'root_$key_author': testUuid(10) },
102
102
  ],
103
103
  },
104
104
  },
105
105
  {
106
- sql: SQL`select "root_"."id" as "root_id", "root_"."name" as "root_name", "root_"."secret" as "root_secret", "root_"."id" as "root_id"
106
+ sql: SQL`select "root_"."id" as "root_$index_id", "root_"."name" as "root_name", "root_"."secret" as "root_secret", "root_"."id" as "root_id"
107
107
  from "public"."author" as "root_" where "root_"."id" in (?)`,
108
108
  parameters: [testUuid(10)],
109
109
  response: {
110
110
  rows: [
111
- { root_id: testUuid(10), root_name: 'John Doe', root_secret: 'shh' },
111
+ { root_id: testUuid(10), 'root_$index_id': testUuid(10), root_name: 'John Doe', root_secret: 'shh' },
112
112
  ],
113
113
  },
114
114
  },
@@ -22,15 +22,17 @@ test('Categories with children filtered by back-referenced parent', async () =>
22
22
  {
23
23
  sql: SQL`select
24
24
  "root_"."id" as "root_id",
25
- "root_"."id" as "root_id"
25
+ "root_"."id" as "root_$key_id"
26
26
  from "public"."category" as "root_"`,
27
27
  response: {
28
28
  rows: [
29
29
  {
30
30
  root_id: testUuid(1),
31
+ 'root_$key_id': testUuid(1),
31
32
  },
32
33
  {
33
34
  root_id: testUuid(2),
35
+ 'root_$key_id': testUuid(2),
34
36
  },
35
37
  ],
36
38
  },
@@ -81,7 +81,7 @@ test('aliases', async () => {
81
81
  "root_"."id" AS "root_idx",
82
82
  "root_"."name" AS "root_name1",
83
83
  "root_"."name" AS "root_name2",
84
- "root_"."name" = ? AS "root___predicate_name_eq",
84
+ "root_"."name" = ? as "root_$predicate_name_eq",
85
85
  "root_"."id" AS "root_id"
86
86
  FROM "public"."author" AS "root_"`,
87
87
  parameters: ['John'],
@@ -92,7 +92,7 @@ test('aliases', async () => {
92
92
  root_idx: testUuid(1),
93
93
  root_name1: 'John',
94
94
  root_name2: 'John',
95
- root___predicate_name_eq: true,
95
+ 'root_$predicate_name_eq': true,
96
96
  },
97
97
  ],
98
98
  },
@@ -42,11 +42,11 @@ test('fragments', async () => {
42
42
  sql: SQL`select
43
43
  "root_"."id" as "root_id",
44
44
  "root_"."name" as "root_name",
45
- "root_"."id" as "root_id"
45
+ "root_"."id" as "root_$key_id"
46
46
  from "public"."author" as "root_"`,
47
47
  parameters: [],
48
48
  response: {
49
- rows: [{ root_id: testUuid(1), root_name: 'John' }],
49
+ rows: [{ root_id: testUuid(1), 'root_$key_id': testUuid(1), root_name: 'John' }],
50
50
  },
51
51
  },
52
52
  {
@@ -105,23 +105,23 @@ test('fragments merge', async () => {
105
105
  }`,
106
106
  executes: [
107
107
  {
108
- sql: `select "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."product" as "root_"`,
108
+ sql: `select "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."product" as "root_"`,
109
109
  parameters: [],
110
- response: { rows: [{ root_id: testUuid(1) }] },
110
+ response: { rows: [{ root_id: testUuid(1), 'root_$key_id': testUuid(1) }] },
111
111
  },
112
112
  {
113
113
  sql:
114
- `select "root_"."product_id" as "__grouping_key", "root_"."name" as "root_name", "root_"."image_id" as "root_image", "root_"."id" as "root_id" from "public"."product_locale" as "root_" where "root_"."product_id" in (?)`,
114
+ `select "root_"."product_id" as "__grouping_key", "root_"."name" as "root_name", "root_"."image_id" as "root_$key_image", "root_"."id" as "root_id" from "public"."product_locale" as "root_" where "root_"."product_id" in (?)`,
115
115
  parameters: [testUuid(1)],
116
116
  response: {
117
- rows: [{ __grouping_key: testUuid(1), root_name: 'foo', root_id: testUuid(2), root_image: testUuid(3) }],
117
+ rows: [{ __grouping_key: testUuid(1), root_name: 'foo', root_id: testUuid(2), 'root_$key_image': testUuid(3) }],
118
118
  },
119
119
  },
120
120
  {
121
121
  sql:
122
- `select "root_"."id" as "root_id", "root_"."url" as "root_url", "root_"."id" as "root_id" from "public"."image" as "root_" where "root_"."id" in (?)`,
122
+ `select "root_"."id" as "root_$index_id", "root_"."url" as "root_url", "root_"."id" as "root_id" from "public"."image" as "root_" where "root_"."id" in (?)`,
123
123
  parameters: [testUuid(3)],
124
- response: { rows: [{ root_id: testUuid(3), root_url: 'abcd' }] },
124
+ response: { rows: [{ root_id: testUuid(3), 'root_$index_id': testUuid(3), root_url: 'abcd' }] },
125
125
  },
126
126
  ],
127
127
  return: {
@@ -31,24 +31,24 @@ test('reduced has many', async () => {
31
31
  {
32
32
  sql: SQL`select
33
33
  "root_"."id" as "root_id",
34
- "root_"."id" as "root_id"
34
+ "root_"."id" as "root_$key_id"
35
35
  from "public"."post" as "root_"`,
36
36
  parameters: [],
37
37
  response: {
38
- rows: [{ root_id: testUuid(1) }, { root_id: testUuid(2) }],
38
+ rows: [{ root_id: testUuid(1), 'root_$key_id': testUuid(1) }, { root_id: testUuid(2), 'root_$key_id': testUuid(2) }],
39
39
  },
40
40
  },
41
41
  {
42
42
  sql: SQL`select
43
- "root_"."post_id" as "root_post",
43
+ "root_"."post_id" as "root_$index_post",
44
44
  "root_"."id" as "root_id"
45
45
  from "public"."post_locale" as "root_"
46
46
  where "root_"."locale" = ? and "root_"."post_id" in (?, ?)`,
47
47
  parameters: ['cs', testUuid(1), testUuid(2)],
48
48
  response: {
49
49
  rows: [
50
- { root_post: testUuid(1), root_id: testUuid(11) },
51
- { root_post: testUuid(2), root_id: testUuid(12) },
50
+ { 'root_$index_post': testUuid(1), root_id: testUuid(11) },
51
+ { 'root_$index_post': testUuid(2), root_id: testUuid(12) },
52
52
  ],
53
53
  },
54
54
  },
@@ -96,24 +96,24 @@ test('universal reduced has many', async () => {
96
96
  {
97
97
  sql: SQL`select
98
98
  "root_"."id" as "root_id",
99
- "root_"."id" as "root_id"
99
+ "root_"."id" as "root_$key_id"
100
100
  from "public"."post" as "root_"`,
101
101
  parameters: [],
102
102
  response: {
103
- rows: [{ root_id: testUuid(1) }, { root_id: testUuid(2) }],
103
+ rows: [{ root_id: testUuid(1), 'root_$key_id': testUuid(1) }, { root_id: testUuid(2), 'root_$key_id': testUuid(2) }],
104
104
  },
105
105
  },
106
106
  {
107
107
  sql: SQL`select
108
- "root_"."post_id" as "root_post",
108
+ "root_"."post_id" as "root_$index_post",
109
109
  "root_"."id" as "root_id"
110
110
  from "public"."post_locale" as "root_"
111
111
  where "root_"."locale" = ? and "root_"."post_id" in (?, ?)`,
112
112
  parameters: ['cs', testUuid(1), testUuid(2)],
113
113
  response: {
114
114
  rows: [
115
- { root_post: testUuid(1), root_id: testUuid(11) },
116
- { root_post: testUuid(2), root_id: testUuid(12) },
115
+ { 'root_$index_post': testUuid(1), root_id: testUuid(11) },
116
+ { 'root_$index_post': testUuid(2), root_id: testUuid(12) },
117
117
  ],
118
118
  },
119
119
  },
@@ -30,13 +30,13 @@ test('many has many with where, limit and orderBy', async () => {
30
30
  sql: SQL`select
31
31
  "root_"."id" as "root_id",
32
32
  "root_"."title" as "root_title",
33
- "root_"."id" as "root_id"
33
+ "root_"."id" as "root_$key_id"
34
34
  from "public"."category" as "root_"`,
35
35
  parameters: [],
36
36
  response: {
37
37
  rows: [
38
- { root_id: testUuid(1), root_title: 'Hello' },
39
- { root_id: testUuid(2), root_title: 'World' },
38
+ { root_id: testUuid(1), 'root_$key_id': testUuid(1), root_title: 'Hello' },
39
+ { root_id: testUuid(2), 'root_$key_id': testUuid(2), root_title: 'World' },
40
40
  ],
41
41
  },
42
42
  },
@@ -150,13 +150,13 @@ test('one has many with where, limit and orderBy', async () => {
150
150
  sql: SQL`select
151
151
  "root_"."id" as "root_id",
152
152
  "root_"."name" as "root_name",
153
- "root_"."id" as "root_id"
153
+ "root_"."id" as "root_$key_id"
154
154
  from "public"."author" as "root_"`,
155
155
  parameters: [],
156
156
  response: {
157
157
  rows: [
158
- { root_id: testUuid(1), root_name: 'John' },
159
- { root_id: testUuid(2), root_name: 'Jack' },
158
+ { root_id: testUuid(1), 'root_$key_id': testUuid(1), root_name: 'John' },
159
+ { root_id: testUuid(2), 'root_$key_id': testUuid(2), root_name: 'Jack' },
160
160
  ],
161
161
  },
162
162
  },
@@ -235,8 +235,8 @@ test('one has many with nulls first in a limited page', async () => {
235
235
  }`,
236
236
  executes: [
237
237
  {
238
- sql: SQL`select "root_"."id" as "root_id", "root_"."id" as "root_id" from "public"."author" as "root_"`,
239
- response: { rows: [{ root_id: testUuid(1) }] },
238
+ sql: SQL`select "root_"."id" as "root_$key_id", "root_"."id" as "root_id" from "public"."author" as "root_"`,
239
+ response: { rows: [{ root_id: testUuid(1), 'root_$key_id': testUuid(1) }] },
240
240
  },
241
241
  {
242
242
  sql: SQL`with "data" as
@@ -41,7 +41,7 @@ where "root_author"."name" = ?`,
41
41
  response: { rows: [{ row_count: 10 }] },
42
42
  },
43
43
  {
44
- sql: SQL`select "root_"."id" as "root_id", "root_"."title" as "root_title", "root_"."author_id" as "root_author"
44
+ sql: SQL`select "root_"."id" as "root_id", "root_"."title" as "root_title", "root_"."author_id" as "root_$key_author"
45
45
  from "public"."post" as "root_"
46
46
  left join "public"."author" as "root_author" on "root_"."author_id" = "root_author"."id"
47
47
  where "root_author"."name" = ? order by "root_"."id" asc limit 2 offset 1`,
@@ -50,12 +50,12 @@ where "root_author"."name" = ? order by "root_"."id" asc limit 2 offset 1`,
50
50
  {
51
51
  root_id: testUuid(1),
52
52
  root_title: 'Foo',
53
- root_author: testUuid(2),
53
+ 'root_$key_author': testUuid(2),
54
54
  },
55
55
  {
56
56
  root_id: testUuid(3),
57
57
  root_title: 'Bar',
58
- root_author: testUuid(2),
58
+ 'root_$key_author': testUuid(2),
59
59
  },
60
60
  ],
61
61
  },
@@ -63,7 +63,7 @@ where "root_author"."name" = ? order by "root_"."id" asc limit 2 offset 1`,
63
63
  {
64
64
  sql: SQL`
65
65
  select
66
- "root_"."id" as "root_id",
66
+ "root_"."id" as "root_$index_id",
67
67
  "root_"."name" as "root_name",
68
68
  "root_"."id" as "root_id"
69
69
  from "public"."author" as "root_"
@@ -74,6 +74,7 @@ where "root_author"."name" = ? order by "root_"."id" asc limit 2 offset 1`,
74
74
  rows: [
75
75
  {
76
76
  root_id: testUuid(2),
77
+ 'root_$index_id': testUuid(2),
77
78
  root_name: 'jack',
78
79
  },
79
80
  ],