()
| 1136 | // toArray → toArray — both levels are plain arrays |
| 1137 | describe(`nested includes: Collection → Collection`, () => { |
| 1138 | function buildNestedQuery() { |
| 1139 | return createLiveQueryCollection((q) => |
| 1140 | q.from({ p: projects }).select(({ p }) => ({ |
| 1141 | id: p.id, |
| 1142 | name: p.name, |
| 1143 | issues: q |
| 1144 | .from({ i: issues }) |
| 1145 | .where(({ i }) => eq(i.projectId, p.id)) |
| 1146 | .select(({ i }) => ({ |
| 1147 | id: i.id, |
| 1148 | title: i.title, |
| 1149 | comments: q |
| 1150 | .from({ c: comments }) |
| 1151 | .where(({ c }) => eq(c.issueId, i.id)) |
| 1152 | .select(({ c }) => ({ |
| 1153 | id: c.id, |
| 1154 | body: c.body, |
| 1155 | })), |
| 1156 | })), |
| 1157 | })), |
| 1158 | ) |
| 1159 | } |
| 1160 | |
| 1161 | it(`supports two levels of includes`, async () => { |
| 1162 | const collection = buildNestedQuery() |
no test coverage detected
searching dependent graphs…