Commit b958a27
Reorder UpdateStatement, tighten comment, and cover empty-orders path
Three follow-ups from the review of #2781:
- Reorder visit_Arel_Nodes_UpdateStatement to sit between
split_order_string and visit_Arel_Nodes_HomogeneousIn in
oracle_common.rb. Groups the ORDER BY handling (order_hacks +
split_order_string + UpdateStatement) together and keeps the
IN-list cluster (HomogeneousIn + In + NotIn) intact.
- Rewrite the comment to make explicit that this override only
handles the ORDER BY part. With a LIMIT, the statement is passed
through to super so Oracle's own error for the unsupported
LIMIT-in-UPDATE surfaces (the visitor does not try to smooth
that over).
- Add a fifth visitor-level spec example covering the no-orders
short-circuit (`return` from the if guard) — previously implicit
via sibling tests that did not set orders.
Refs #2663 (task B).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 20808f2 commit b958a27
2 files changed
Lines changed: 19 additions & 12 deletions
File tree
- lib/arel/visitors
- spec/active_record/connection_adapters/oracle_enhanced/arel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
101 | 113 | | |
102 | 114 | | |
103 | 115 | | |
| |||
145 | 157 | | |
146 | 158 | | |
147 | 159 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
0 commit comments