+ /**
+ * Returns all slot rows for a revision.
+ * Takes and returns a carry row from the last batch;
+ *
+ * @param IResultWrapper|array $results
+ * @param null|object &$carry A row carried over from the last call to getSlotRowBatch()
+ *
+ * @return object[]
+ */
+ protected function getSlotRowBatch( $results, &$carry = null ) {
+ $slotRows = [];
+ $prev = null;
+
+ if ( $carry ) {
+ $slotRows[] = $carry;
+ $prev = $carry;
+ $carry = null;
+ }
+
+ while ( $row = $results->fetchObject() ) {
+ if ( $prev && $prev->rev_id !== $row->rev_id ) {
+ $carry = $row;
+ break;
+ }
+ $slotRows[] = $row;
+ $prev = $row;
+ }
+
+ return $slotRows;
+ }
+