Skip to content

Commit 5f2f46a

Browse files
committed
PDO namespace
1 parent 73ffad0 commit 5f2f46a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Utopia\Database\Adapter;
44

55
use Exception;
6-
use PDO;
76
use PDOException;
87
use Utopia\Database\Database;
98
use Utopia\Database\Document;
@@ -14,7 +13,6 @@
1413
use Utopia\Database\Exception\Truncate as TruncateException;
1514
use Utopia\Database\Helpers\ID;
1615
use Utopia\Database\Query;
17-
use Utopia\Database\Validator\Authorization;
1816

1917
class MariaDB extends SQL
2018
{
@@ -1634,9 +1632,9 @@ protected function getSQLType(string $type, int $size, bool $signed = true, bool
16341632
protected function getPDOType(mixed $value): int
16351633
{
16361634
return match (gettype($value)) {
1637-
'string','double' => PDO::PARAM_STR,
1638-
'integer', 'boolean' => PDO::PARAM_INT,
1639-
'NULL' => PDO::PARAM_NULL,
1635+
'string','double' => \PDO::PARAM_STR,
1636+
'integer', 'boolean' => \PDO::PARAM_INT,
1637+
'NULL' => \PDO::PARAM_NULL,
16401638
default => throw new DatabaseException('Unknown PDO Type for ' . \gettype($value)),
16411639
};
16421640
}

src/Database/Adapter/SQL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2458,7 +2458,7 @@ public function find(Document $collection, array $queries = [], ?int $limit = 25
24582458

24592459
foreach ($binds as $key => $value) {
24602460
if (gettype($value) === 'double') {
2461-
$stmt->bindValue($key, $this->getFloatPrecision($value), PDO::PARAM_STR);
2461+
$stmt->bindValue($key, $this->getFloatPrecision($value), \PDO::PARAM_STR);
24622462
} else {
24632463
$stmt->bindValue($key, $value, $this->getPDOType($value));
24642464
}

0 commit comments

Comments
 (0)