Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Use Connection instead of PDO #117

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Doctrine\DBAL\Result;
use Pixelant\Interest\DataHandling\Operation\AbstractRecordOperation;
use Pixelant\Interest\Domain\Repository\Exception\InvalidQueryResultException;
use TYPO3\CMS\Core\Database\Connection;

class DeferredRecordOperationRepository extends AbstractRepository
{
Expand Down Expand Up @@ -96,7 +97,7 @@ public function delete(int $uid)
->where(
$queryBuilder->expr()->eq(
'uid',
$queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)
$queryBuilder->createNamedParameter($uid, Connection::PARAM_INT)
)
)
->executeStatement();
Expand Down
3 changes: 2 additions & 1 deletion Classes/Domain/Repository/PendingRelationsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Doctrine\DBAL\Result;
use Pixelant\Interest\Domain\Repository\Exception\InvalidQueryResultException;
use TYPO3\CMS\Core\Database\Connection;

/**
* Database operations relating to pending relations to remote IDs that do not yet exist in the database.
Expand All @@ -31,7 +32,7 @@ public function get(string $remoteId): array
->where(
$queryBuilder->expr()->eq(
'remote_id',
$queryBuilder->createNamedParameter($remoteId, \PDO::PARAM_STR)
$queryBuilder->createNamedParameter($remoteId, Connection::PARAM_STR)
)
)
->executeQuery();
Expand Down
5 changes: 3 additions & 2 deletions Classes/Domain/Repository/RemoteIdMappingRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Pixelant\Interest\Domain\Repository\Exception\InvalidQueryResultException;
use Pixelant\Interest\Utility\DatabaseUtility;
use Pixelant\Interest\Utility\TcaUtility;
use TYPO3\CMS\Core\Database\Connection;

/**
* Repository for interaction with the database table tx_interest_remote_id_mapping.
Expand Down Expand Up @@ -58,7 +59,7 @@ public function get(string $remoteId, ?AbstractRecordOperation $recordOperation
->where(
$queryBuilder->expr()->eq(
'remote_id',
$queryBuilder->createNamedParameter($remoteId, \PDO::PARAM_STR)
$queryBuilder->createNamedParameter($remoteId, Connection::PARAM_STR)
)
)
->executeQuery();
Expand Down Expand Up @@ -398,7 +399,7 @@ public function getMetaData(string $remoteId): array
->where(
$queryBuilder->expr()->eq(
'remote_id',
$queryBuilder->createNamedParameter($remoteId, \PDO::PARAM_STR)
$queryBuilder->createNamedParameter($remoteId, Connection::PARAM_STR)
)
)
->executeQuery();
Expand Down
Loading