-
Notifications
You must be signed in to change notification settings - Fork 367
Commit 98394e9
JaeYeon KimJaeYeon Kim
JaeYeon Kim
JaeYeon Kim
JdbcAggregateOperations delete by query
Issue link: #1978
Add deleteAllByQuery method to JdbcAggregateOperations
This method enables deleting aggregates based on a query by performing the following steps:
1. Select root IDs matching the query with a SELECT ... FOR UPDATE to lock the rows.
2. Delete all sub-entities associated with the selected root IDs.
3. Delete the root entities identified by the selected IDs.
Signed-off-by: JaeYeon Kim <JaeYeon.Kim@ibm.com>1 parent d98ef18 commit 98394e9
File tree
16 files changed
+401
-0
lines changed- spring-data-jdbc/src
- main/java/org/springframework/data/jdbc
- core
- convert
- mybatis
- test/java/org/springframework/data/jdbc/core
- convert
- spring-data-relational/src
- main/java/org/springframework/data/relational/core/conversion
- test/java/org/springframework/data/relational/core/conversion
16 files changed
+401
-0
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 | + | ||
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
| |||
101 | 102 |
| |
102 | 103 |
| |
103 | 104 |
| |
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
104 | 109 |
| |
105 | 110 |
| |
106 | 111 |
| |
107 | 112 |
| |
113 | + | ||
114 | + | ||
108 | 115 |
| |
109 | 116 |
| |
110 | 117 |
| |
|
Lines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 | + | ||
43 | 44 |
| |
44 | 45 |
| |
45 | 46 |
| |
| |||
60 | 61 |
| |
61 | 62 |
| |
62 | 63 |
| |
64 | + | ||
63 | 65 |
| |
64 | 66 |
| |
65 | 67 |
| |
| |||
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
77 | + | ||
75 | 78 |
| |
76 | 79 |
| |
77 | 80 |
| |
| |||
169 | 172 |
| |
170 | 173 |
| |
171 | 174 |
| |
175 | + | ||
176 | + | ||
177 | + | ||
178 | + | ||
179 | + | ||
180 | + | ||
181 | + | ||
182 | + | ||
183 | + | ||
184 | + | ||
185 | + | ||
186 | + | ||
187 | + | ||
188 | + | ||
189 | + | ||
190 | + | ||
191 | + | ||
192 | + | ||
193 | + | ||
194 | + | ||
195 | + | ||
196 | + | ||
197 | + | ||
198 | + | ||
199 | + | ||
200 | + | ||
201 | + | ||
202 | + | ||
172 | 203 |
| |
173 | 204 |
| |
174 | 205 |
| |
| |||
177 | 208 |
| |
178 | 209 |
| |
179 | 210 |
| |
211 | + | ||
212 | + | ||
213 | + | ||
214 | + | ||
215 | + | ||
216 | + | ||
217 | + | ||
180 | 218 |
| |
181 | 219 |
| |
182 | 220 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 | + | ||
40 | 41 |
| |
41 | 42 |
| |
42 | 43 |
| |
| |||
324 | 325 |
| |
325 | 326 |
| |
326 | 327 |
| |
328 | + | ||
329 | + | ||
330 | + | ||
331 | + | ||
332 | + | ||
333 | + | ||
334 | + | ||
335 | + | ||
336 | + | ||
327 | 337 |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 | + | ||
73 | 74 |
| |
74 | 75 |
| |
75 | 76 |
| |
| |||
461 | 462 |
| |
462 | 463 |
| |
463 | 464 |
| |
465 | + | ||
466 | + | ||
467 | + | ||
468 | + | ||
469 | + | ||
470 | + | ||
471 | + | ||
472 | + | ||
473 | + | ||
474 | + | ||
475 | + | ||
464 | 476 |
| |
465 | 477 |
| |
466 | 478 |
| |
| |||
639 | 651 |
| |
640 | 652 |
| |
641 | 653 |
| |
654 | + | ||
655 | + | ||
656 | + | ||
657 | + | ||
658 | + | ||
659 | + | ||
660 | + | ||
642 | 661 |
| |
643 | 662 |
| |
644 | 663 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 | + | ||
47 | 48 |
| |
48 | 49 |
| |
49 | 50 |
| |
| |||
119 | 120 |
| |
120 | 121 |
| |
121 | 122 |
| |
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | ||
122 | 128 |
| |
123 | 129 |
| |
124 | 130 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | + | ||
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
194 | 195 |
| |
195 | 196 |
| |
196 | 197 |
| |
198 | + | ||
199 | + | ||
200 | + | ||
201 | + | ||
202 | + | ||
203 | + | ||
204 | + | ||
205 | + | ||
206 | + | ||
207 | + | ||
208 | + | ||
209 | + | ||
197 | 210 |
| |
198 | 211 |
| |
199 | 212 |
| |
|
Lines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 | + | ||
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
| |||
63 | 64 |
| |
64 | 65 |
| |
65 | 66 |
| |
67 | + | ||
66 | 68 |
| |
67 | 69 |
| |
68 | 70 |
| |
| |||
259 | 261 |
| |
260 | 262 |
| |
261 | 263 |
| |
264 | + | ||
265 | + | ||
266 | + | ||
267 | + | ||
268 | + | ||
269 | + | ||
270 | + | ||
271 | + | ||
272 | + | ||
273 | + | ||
274 | + | ||
275 | + | ||
276 | + | ||
277 | + | ||
278 | + | ||
279 | + | ||
280 | + | ||
281 | + | ||
282 | + | ||
283 | + | ||
284 | + | ||
285 | + | ||
262 | 286 |
| |
263 | 287 |
| |
264 | 288 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 | + | ||
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
| |||
119 | 120 |
| |
120 | 121 |
| |
121 | 122 |
| |
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | ||
122 | 128 |
| |
123 | 129 |
| |
124 | 130 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 | + | ||
73 | 74 |
| |
74 | 75 |
| |
75 | 76 |
| |
| |||
377 | 378 |
| |
378 | 379 |
| |
379 | 380 |
| |
381 | + | ||
382 | + | ||
383 | + | ||
384 | + | ||
385 | + | ||
386 | + | ||
387 | + | ||
388 | + | ||
389 | + | ||
390 | + | ||
391 | + | ||
392 | + | ||
380 | 393 |
| |
381 | 394 |
| |
382 | 395 |
| |
| |||
594 | 607 |
| |
595 | 608 |
| |
596 | 609 |
| |
610 | + | ||
611 | + | ||
612 | + | ||
613 | + | ||
614 | + | ||
615 | + | ||
616 | + | ||
617 | + | ||
618 | + | ||
619 | + | ||
620 | + | ||
621 | + | ||
622 | + | ||
623 | + | ||
624 | + | ||
625 | + | ||
626 | + | ||
597 | 627 |
| |
598 | 628 |
| |
599 | 629 |
| |
|
spring-data-jdbc/src/main/java/org/springframework/data/jdbc/mybatis/MyBatisDataAccessStrategy.java
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
66 | + | ||
66 | 67 |
| |
67 | 68 |
| |
68 | 69 |
| |
| |||
253 | 254 |
| |
254 | 255 |
| |
255 | 256 |
| |
257 | + | ||
258 | + | ||
259 | + | ||
260 | + | ||
261 | + | ||
256 | 262 |
| |
257 | 263 |
| |
258 | 264 |
| |
|
0 commit comments