diff --git a/src/Connection.php b/src/Connection.php index 5a53b5a2..e6db4a19 100755 --- a/src/Connection.php +++ b/src/Connection.php @@ -750,6 +750,7 @@ public function transactionRollback(): void $this->rollBack(); } + #[\Override] public function hasOpenTransactions(): bool { return $this->numberOfOpenTransactions > 0; @@ -810,6 +811,7 @@ public function getTables(?string $prefix = null): array * @throws ConnectionException * @deprecated */ + #[\Override] public function getColumnsOfTable(string $tableName): array { if (!$this->hasTable($tableName)) { @@ -1298,6 +1300,7 @@ public function dbsafeString(mixed $input, bool $htmlSpecialChars = true, bool $ /** * Method to flush the query-cache. */ + #[\Override] public function flushQueryCache(): void { $this->queryCache = []; @@ -1308,6 +1311,7 @@ public function flushQueryCache(): void * Since the tables won't change during regular operations, * flushing the tables cache is only required during package updates / installations. */ + #[\Override] public function flushTablesCache(): void { $this->tablesCache = []; @@ -1319,6 +1323,7 @@ public function flushTablesCache(): void * * @throws ConnectionException */ + #[\Override] public function flushPreparedStatementsCache(): void { if (!$this->connected) { @@ -1375,6 +1380,7 @@ public function isConnected(): bool * method unifies the behaviour. In order to select a column, which contains a backslash you need to escape the value * with this method. */ + #[\Override] public function escape(mixed $value): mixed { return $this->dbDriver->escape($value); diff --git a/src/ConnectionInterface.php b/src/ConnectionInterface.php index ae8ed8e2..44c5ef92 100755 --- a/src/ConnectionInterface.php +++ b/src/ConnectionInterface.php @@ -377,4 +377,19 @@ public function getJsonColumnExpression(string $column, string $key): string; * @return string The generated SQL snippet. */ public function getNthLastElementFromSlug(string $column, int $position): string; + + public function flushQueryCache(): void; + + public function flushTablesCache(): void; + + public function flushPreparedStatementsCache(): void; + + /** + * @return array + */ + public function getColumnsOfTable(string $tableName): array; + + public function escape(mixed $value): mixed; + + public function hasOpenTransactions(): bool; } diff --git a/src/MockConnection.php b/src/MockConnection.php index 12adb616..95015445 100644 --- a/src/MockConnection.php +++ b/src/MockConnection.php @@ -419,4 +419,37 @@ public function getNthLastElementFromSlug(string $column, int $position): string { return ''; } + + #[Override] + public function flushQueryCache(): void + { + } + + #[Override] + public function flushTablesCache(): void + { + } + + #[Override] + public function flushPreparedStatementsCache(): void + { + } + + #[Override] + public function getColumnsOfTable(string $tableName): array + { + return []; + } + + #[Override] + public function escape(mixed $value): mixed + { + return $value; + } + + #[Override] + public function hasOpenTransactions(): bool + { + return false; + } }