File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ unit role DBDish::Connection does DBDish::ErrorHandling;
19
19
20
20
has % . Statements ;
21
21
has $ . last-sth-id is rw ;
22
+ has $ . last-rows is rw ;
22
23
23
24
method dispose () {
24
25
$ _ . dispose for % ! Statements . values ;
@@ -60,6 +61,8 @@ method rows {
60
61
if $ ! last-sth-id {
61
62
with % ! Statements {$ ! last-sth-id } {
62
63
. rows;
64
+ } else {
65
+ $ ! last-rows
63
66
}
64
67
}
65
68
}
Original file line number Diff line number Diff line change @@ -55,8 +55,10 @@ method new(*%args) {
55
55
method dispose () {
56
56
self . finish unless $ ! Finished ;
57
57
self . _free;
58
- my \id := self . WHICH . Str ;
59
- ? ($ . parent . Statements{id}: delete);
58
+ with $ . parent . Statements{self . WHICH }: delete {
59
+ $ . parent . last-rows = self . rows;
60
+ True ;
61
+ } else { False };
60
62
}
61
63
# Avoid leaks if explicit dispose isn't used by the user.
62
64
submethod DESTROY () {
You can’t perform that action at this time.
0 commit comments