This commit is contained in:
Yuri Kuznetsov
2021-12-29 13:23:00 +02:00
parent cb5fdfba85
commit 2a4bd851ab
17 changed files with 102 additions and 42 deletions
@@ -209,7 +209,9 @@ class RDBRepository implements Repository
{
$mapper = $this->getMapper();
assert($mapper instanceof BaseMapper);
if (!$mapper instanceof BaseMapper) {
throw new RuntimeException("Not supported 'restoreDeleted'.");
}
$mapper->restoreDeleted($this->entityType, $id);
}
@@ -245,7 +247,9 @@ class RDBRepository implements Repository
{
$mapper = $this->getMapper();
assert($mapper instanceof BaseMapper);
if (!$mapper instanceof BaseMapper) {
throw new RuntimeException("Not supported 'deleteFromDb'.");
}
$mapper->deleteFromDb($this->entityType, $id, $onlyDeleted);
}
@@ -287,7 +291,9 @@ class RDBRepository implements Repository
{
$mapper = $this->getMapper();
assert($mapper instanceof BaseMapper);
if (!$mapper instanceof BaseMapper) {
throw new RuntimeException("Not supported 'findBySql'.");
}
return $mapper->selectBySql($this->entityType, $sql);
}