Se pasan datos a EmptyResult en base-
This commit is contained in:
@ -189,7 +189,7 @@ abstract class Repository implements Define\Repository
|
|||||||
try {
|
try {
|
||||||
$this->connection->execute($query, $values);
|
$this->connection->execute($query, $values);
|
||||||
} catch (PDOException $exception) {
|
} catch (PDOException $exception) {
|
||||||
throw new EmptyResult($query, $exception);
|
throw new EmptyResult($query, $exception, $data);
|
||||||
}
|
}
|
||||||
return $this->fetchById($this->getIndex($model));
|
return $this->fetchById($this->getIndex($model));
|
||||||
}
|
}
|
||||||
@ -205,10 +205,10 @@ abstract class Repository implements Define\Repository
|
|||||||
try {
|
try {
|
||||||
$result = $this->connection->execute($query, $data)->fetch(PDO::FETCH_ASSOC);
|
$result = $this->connection->execute($query, $data)->fetch(PDO::FETCH_ASSOC);
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
throw new EmptyResult($query);
|
throw new EmptyResult($query, null, $data);
|
||||||
}
|
}
|
||||||
} catch (PDOException $exception) {
|
} catch (PDOException $exception) {
|
||||||
throw new EmptyResult($query, $exception);
|
throw new EmptyResult($query, $exception, $data);
|
||||||
}
|
}
|
||||||
return $this->load($result);
|
return $this->load($result);
|
||||||
}
|
}
|
||||||
@ -224,7 +224,7 @@ abstract class Repository implements Define\Repository
|
|||||||
try {
|
try {
|
||||||
$results = $this->connection->execute($query, $data)->fetchAll(PDO::FETCH_ASSOC);
|
$results = $this->connection->execute($query, $data)->fetchAll(PDO::FETCH_ASSOC);
|
||||||
} catch (PDOException $exception) {
|
} catch (PDOException $exception) {
|
||||||
throw new EmptyResult($query, $exception);
|
throw new EmptyResult($query, $exception, $data);
|
||||||
}
|
}
|
||||||
return array_map([$this, 'load'], $results);
|
return array_map([$this, 'load'], $results);
|
||||||
}
|
}
|
||||||
@ -240,7 +240,7 @@ abstract class Repository implements Define\Repository
|
|||||||
try {
|
try {
|
||||||
$results = $this->connection->execute($query, $data)->fetchAll(PDO::FETCH_ASSOC);
|
$results = $this->connection->execute($query, $data)->fetchAll(PDO::FETCH_ASSOC);
|
||||||
} catch (PDOException $exception) {
|
} catch (PDOException $exception) {
|
||||||
throw new EmptyResult($query, $exception);
|
throw new EmptyResult($query, $exception, $data);
|
||||||
}
|
}
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user