File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,16 @@ impl<'a> DatabaseDB<'a> {
53
53
// tables as this is just simpler and the results dominate the storage
54
54
// size anyway. In the future we might expand this to other tables, but
55
55
// for now that wouldn't really add enough value to be worth it.
56
+ //
57
+ // The query here would be simpler if rusqlite came with delete .. limit
58
+ // support compiled in, but that's not likely to happen (see
59
+ // https://github.com/rusqlite/rusqlite/issues/1111).
56
60
self . db . execute (
57
- "delete from results where experiment in (select name from experiments where status = 'completed') limit 100" ,
61
+ "delete from results where rowid in (
62
+ select rowid from results where \
63
+ experiment in (select name from experiments where status = 'completed') \
64
+ limit 100
65
+ )" ,
58
66
& [ ] ,
59
67
) ?;
60
68
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments