Commit 201c8cd
committed
Remove
In order to deal with multitable joins, we'll need to support cases
where both `Lhs` and `Rhs` are not tables. `Lhs` will not be a table in
the case like `users.inner_joins(posts).inner_joins(comments)`, which
should return `(User, Post, Comment)` and represent the user, all their
posts, and all comments that they've left (not necessarily on their own
posts). `Rhs` will not be a table in the case like
`users.inner_joins(posts.inner_joins(comments))`, which should return
`(User, (Post, Comment))` and represents the user, all their posts, and
all comments left on those posts (not necessarily by that user).
Having this distinction (or multi-table joins at all, really) will
enable the much trickier case of
`users.inner_joins(posts.inner_joins(comments)).inner_joins(comments)`,
which requires table aliases to work properly... I'm not entirely sure
what I want to do for the design there, but I'm not sure I can fail that
case at compile time just yetTable constraints from query_source::joins
1 parent 31cede5 commit 201c8cd
2 files changed
Lines changed: 18 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 46 | + | |
| 47 | + | |
63 | 48 | | |
64 | | - | |
| 49 | + | |
65 | 50 | | |
66 | 51 | | |
67 | 52 | | |
68 | 53 | | |
69 | | - | |
70 | | - | |
| 54 | + | |
| 55 | + | |
71 | 56 | | |
72 | 57 | | |
73 | 58 | | |
| |||
438 | 423 | | |
439 | 424 | | |
440 | 425 | | |
441 | | - | |
| 426 | + | |
442 | 427 | | |
443 | 428 | | |
444 | | - | |
| 429 | + | |
445 | 430 | | |
446 | 431 | | |
447 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
0 commit comments