From 671b21a364bd108e14b51230178d5a98d4e5a324 Mon Sep 17 00:00:00 2001 From: darkdef Date: Sat, 26 Mar 2022 20:22:05 +0300 Subject: [PATCH 1/2] Step 4. Remove POD (work with internalQuery) --- src/PDO/CommandPDOMssql.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/PDO/CommandPDOMssql.php b/src/PDO/CommandPDOMssql.php index ad2f2586c..fa92c90a2 100644 --- a/src/PDO/CommandPDOMssql.php +++ b/src/PDO/CommandPDOMssql.php @@ -6,7 +6,7 @@ use PDOException; use Yiisoft\Db\Cache\QueryCache; -use Yiisoft\Db\Command\Command; +use Yiisoft\Db\Command\CommandPdo; use Yiisoft\Db\Connection\ConnectionPDOInterface; use Yiisoft\Db\Exception\ConvertException; use Yiisoft\Db\Exception\Exception; @@ -14,7 +14,7 @@ use function is_array; -final class CommandPDOMssql extends Command +final class CommandPDOMssql extends CommandPdo { public function __construct(private ConnectionPDOInterface $db, QueryCache $queryCache) { @@ -75,10 +75,11 @@ public function prepare(?bool $forRead = null): void } } - protected function getCacheKey(string $rawSql): array + protected function getCacheKey(int $queryMode, string $rawSql): array { return [ __CLASS__, + $queryMode, $this->db->getDriver()->getDsn(), $this->db->getDriver()->getUsername(), $rawSql, From 8ea5201186468b058b4a94abf52e5bf19eced787 Mon Sep 17 00:00:00 2001 From: darkdef Date: Sat, 26 Mar 2022 21:12:07 +0300 Subject: [PATCH 2/2] CommandPdo -> CommandPDO --- src/PDO/CommandPDOMssql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PDO/CommandPDOMssql.php b/src/PDO/CommandPDOMssql.php index fa92c90a2..9a53f6123 100644 --- a/src/PDO/CommandPDOMssql.php +++ b/src/PDO/CommandPDOMssql.php @@ -6,7 +6,7 @@ use PDOException; use Yiisoft\Db\Cache\QueryCache; -use Yiisoft\Db\Command\CommandPdo; +use Yiisoft\Db\Command\CommandPDO; use Yiisoft\Db\Connection\ConnectionPDOInterface; use Yiisoft\Db\Exception\ConvertException; use Yiisoft\Db\Exception\Exception; @@ -14,7 +14,7 @@ use function is_array; -final class CommandPDOMssql extends CommandPdo +final class CommandPDOMssql extends CommandPDO { public function __construct(private ConnectionPDOInterface $db, QueryCache $queryCache) {