Skip to content

Commit

Permalink
[fix] insert/update/delete return format.
Browse files Browse the repository at this point in the history
  • Loading branch information
telanflow committed Nov 5, 2019
1 parent 1eb3381 commit ca4f1a9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Event/EventBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,14 @@ public function makeUpdateRecord(): ?EventInterface
$beforeBinaryData = $this->eventBinaryData->read($columnsBinarySize);
$afterBinaryData = $this->eventBinaryData->read($columnsBinarySize);

$values = [];
$values = [
'before' => [],
'after' => [],
];
while (!$this->eventBinaryData->isComplete($this->eventInfo->getSizeNoHeader()))
{
$values[] = [
'before' => $this->getColumnData($beforeBinaryData),
'after' => $this->getColumnData($afterBinaryData)
];
$values['before'] = $this->getColumnData($beforeBinaryData);
$values['after'] = $this->getColumnData($afterBinaryData);
}

return new Update(
Expand Down Expand Up @@ -310,7 +311,7 @@ protected function getValues(): array

$values = [];
while (!$this->eventBinaryData->isComplete($this->eventInfo->getSizeNoHeader())) {
$values[] = $this->getColumnData($binaryData);
$values = $this->getColumnData($binaryData);
}

return $values;
Expand Down

0 comments on commit ca4f1a9

Please sign in to comment.