Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Database;
|
||||
|
||||
|
||||
use App\Framework\Database\Exception\DatabaseException;
|
||||
|
||||
final class PdoConnection implements ConnectionInterface
|
||||
@@ -25,6 +24,7 @@ final class PdoConnection implements ConnectionInterface
|
||||
try {
|
||||
$statement = $this->pdo->prepare($sql);
|
||||
$statement->execute($parameters);
|
||||
|
||||
return $statement->rowCount();
|
||||
} catch (\PDOException $e) {
|
||||
throw new DatabaseException("Failed to execute query: {$e->getMessage()}", 0, $e);
|
||||
@@ -36,6 +36,7 @@ final class PdoConnection implements ConnectionInterface
|
||||
try {
|
||||
$statement = $this->pdo->prepare($sql);
|
||||
$statement->execute($parameters);
|
||||
|
||||
return new PdoResult($statement);
|
||||
} catch (\PDOException $e) {
|
||||
throw new DatabaseException("Failed to execute query: {$e->getMessage()} --- SQL: {$sql} PARAMETERS: {".implode(", ", $parameters)."}", 0, $e);
|
||||
@@ -45,18 +46,21 @@ final class PdoConnection implements ConnectionInterface
|
||||
public function queryOne(string $sql, array $parameters = []): ?array
|
||||
{
|
||||
$result = $this->query($sql, $parameters);
|
||||
|
||||
return $result->fetch();
|
||||
}
|
||||
|
||||
public function queryColumn(string $sql, array $parameters = []): array
|
||||
{
|
||||
$result = $this->query($sql, $parameters);
|
||||
|
||||
return $result->fetchColumn();
|
||||
}
|
||||
|
||||
public function queryScalar(string $sql, array $parameters = []): mixed
|
||||
{
|
||||
$result = $this->query($sql, $parameters);
|
||||
|
||||
return $result->fetchScalar();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user