Skip to content

Commit a98a638

Browse files
committed
Tests.
1 parent 873c0da commit a98a638

File tree

3 files changed

+861
-12
lines changed

3 files changed

+861
-12
lines changed

tests/dbsetup/orm_qb.edgeql

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,23 +277,60 @@ insert Inh_AXA {
277277
axa := 10002,
278278
};
279279

280+
insert Link_Inh_A { n := -1 };
281+
insert Link_Inh_A2 { n := -2 };
282+
insert Link_Inh_A3 { n := -3 };
283+
280284
insert Link_Inh_A {
281285
n := 1,
282286
l := assert_exists((select Inh_A filter .a = 1 limit 1)),
283287
};
284-
insert Link_Inh_A {
288+
insert Link_Inh_A2 {
285289
n := 4,
286290
l := assert_exists((select Inh_AB filter .a = 4 limit 1)),
287291
};
288-
insert Link_Inh_A {
292+
insert Link_Inh_A2 {
289293
n := 7,
290294
l := assert_exists((select Inh_AC filter .a = 7 limit 1)),
291295
};
292-
insert Link_Inh_A {
296+
insert Link_Inh_A3 {
293297
n := 13,
294298
l := assert_exists((select Inh_ABC filter .a = 13 limit 1)),
295299
};
296-
insert Link_Inh_A {
300+
insert Link_Inh_A3 {
297301
n := 17,
298302
l := assert_exists((select Inh_AB_AC filter .a = 17 limit 1)),
299303
};
304+
305+
insert Link_Inh_AB { n := -1 };
306+
insert Link_Inh_AB {
307+
n := 1004,
308+
l := assert_exists((select Inh_AB filter .a = 4 limit 1)),
309+
};
310+
insert Link_Inh_AB {
311+
n := 1017,
312+
l := assert_exists((select Inh_AB_AC filter .a = 17 limit 1)),
313+
};
314+
315+
insert Link_Link_Inh_A { n := -1 };
316+
317+
insert Link_Link_Inh_A {
318+
n := 1,
319+
l := assert_exists((select Link_Inh_A filter .n = 1 limit 1)),
320+
};
321+
insert Link_Link_Inh_A {
322+
n := 4,
323+
l := assert_exists((select Link_Inh_A filter .n = 4 limit 1)),
324+
};
325+
insert Link_Link_Inh_A {
326+
n := 7,
327+
l := assert_exists((select Link_Inh_A filter .n = 7 limit 1)),
328+
};
329+
insert Link_Link_Inh_A {
330+
n := 13,
331+
l := assert_exists((select Link_Inh_A filter .n = 13 limit 1)),
332+
};
333+
insert Link_Link_Inh_A {
334+
n := 17,
335+
l := assert_exists((select Link_Inh_A filter .n = 17 limit 1)),
336+
};

tests/dbsetup/orm_qb.gel

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,21 @@ type Link_Inh_A {
617617
on target delete allow;
618618
};
619619
};
620+
type Link_Inh_A2 extending Link_Inh_A;
621+
type Link_Inh_A3 extending Link_Inh_A2;
622+
type Link_Inh_AB {
623+
n: int64;
624+
l: Inh_AB {
625+
on target delete allow;
626+
};
627+
};
628+
629+
type Link_Link_Inh_A {
630+
n: int64;
631+
l: Link_Inh_A {
632+
on target delete allow;
633+
};
634+
}
620635

621636
function Read_Inh_A(x: Inh_A) -> int64 using (x.a ?? -1);
622637
function Read_Inh_A_Overload(x: Inh_A) -> int64 using (x.a ?? -1);

0 commit comments

Comments
 (0)