| @@ 944-954 (lines=11) @@ | ||
| 941 | * |
|
| 942 | * @return int |
|
| 943 | */ |
|
| 944 | protected function getTotalBackupCount($table) |
|
| 945 | { |
|
| 946 | $platform = $this->connection->getDatabasePlatform(); |
|
| 947 | ||
| 948 | $queryBuilder = $this->connection->createQueryBuilder(); |
|
| 949 | $queryBuilder |
|
| 950 | ->select($platform->getCountExpression('id')) |
|
| 951 | ->from($table); |
|
| 952 | ||
| 953 | return (int)$queryBuilder->execute()->fetchColumn(); |
|
| 954 | } |
|
| 955 | ||
| 956 | /** |
|
| 957 | * Creates database table for custom Location URL alias backup. |
|
| @@ 1023-1033 (lines=11) @@ | ||
| 1020 | * |
|
| 1021 | * @return bool |
|
| 1022 | */ |
|
| 1023 | protected function isTableEmpty($name) |
|
| 1024 | { |
|
| 1025 | $queryBuilder = $this->connection->createQueryBuilder(); |
|
| 1026 | $queryBuilder |
|
| 1027 | ->select($this->connection->getDatabasePlatform()->getCountExpression('*')) |
|
| 1028 | ->from($name); |
|
| 1029 | ||
| 1030 | $count = $queryBuilder->execute()->fetchColumn(); |
|
| 1031 | ||
| 1032 | return $count == 0; |
|
| 1033 | } |
|
| 1034 | ||
| 1035 | /** |
|
| 1036 | * Returns configured progress bar helper. |
|
| @@ 1367-1375 (lines=9) @@ | ||
| 1364 | return $rows; |
|
| 1365 | } |
|
| 1366 | ||
| 1367 | public function countTrashed(): int |
|
| 1368 | { |
|
| 1369 | $dbPlatform = $this->connection->getDatabasePlatform(); |
|
| 1370 | $query = $this->connection->createQueryBuilder() |
|
| 1371 | ->select($dbPlatform->getCountExpression('node_id')) |
|
| 1372 | ->from('ezcontentobject_trash'); |
|
| 1373 | ||
| 1374 | return $query->execute()->fetchColumn(); |
|
| 1375 | } |
|
| 1376 | ||
| 1377 | /** |
|
| 1378 | * Removes every entries in the trash. |
|