| @@ 1671-1682 (lines=12) @@ | ||
| 1668 | ||
| 1669 | $result = self::getConnection()->query($sqlQuery); |
|
| 1670 | ||
| 1671 | if ($result) { |
|
| 1672 | $row = $result->fetch_array(MYSQLI_ASSOC); |
|
| 1673 | ||
| 1674 | self::$logger->debug('<<getHistoryCount ['.$row['object_count'].']'); |
|
| 1675 | ||
| 1676 | return $row['object_count']; |
|
| 1677 | } else { |
|
| 1678 | throw new AlphaException('Failed to get the history count for the business object ['.$this->BO->getOID().'] from the table ['.$this->BO->getTableName().'_history], query is ['.$this->BO->getLastQuery().']'); |
|
| 1679 | self::$logger->debug('<<getHistoryCount [0]'); |
|
| 1680 | ||
| 1681 | return 0; |
|
| 1682 | } |
|
| 1683 | } |
|
| 1684 | ||
| 1685 | /** |
|
| @@ 1652-1661 (lines=10) @@ | ||
| 1649 | ||
| 1650 | $this->BO->setLastQuery($sqlQuery); |
|
| 1651 | ||
| 1652 | if (!$result = self::getConnection()->query($sqlQuery)) { |
|
| 1653 | self::$logger->debug('<<getCount'); |
|
| 1654 | throw new AlphaException('Failed to get the count for the class ['.get_class($this->BO).'] from the table ['.$this->BO->getTableName().'], query is ['.$this->BO->getLastQuery().']'); |
|
| 1655 | } else { |
|
| 1656 | $row = $result->fetchArray(SQLITE3_ASSOC); |
|
| 1657 | ||
| 1658 | self::$logger->debug('<<getCount ['.$row['class_count'].']'); |
|
| 1659 | ||
| 1660 | return $row['class_count']; |
|
| 1661 | } |
|
| 1662 | } |
|
| 1663 | ||
| 1664 | /** |
|
| @@ 1682-1691 (lines=10) @@ | ||
| 1679 | $this->BO->setLastQuery($sqlQuery); |
|
| 1680 | self::$logger->debug('query ['.$sqlQuery.']'); |
|
| 1681 | ||
| 1682 | if (!$result = self::getConnection()->query($sqlQuery)) { |
|
| 1683 | self::$logger->debug('<<getHistoryCount'); |
|
| 1684 | throw new AlphaException('Failed to get the history count for the business object ['.$this->BO->getOID().'] from the table ['.$this->BO->getTableName().'_history], query is ['.$this->BO->getLastQuery().']'); |
|
| 1685 | } else { |
|
| 1686 | $row = $result->fetchArray(SQLITE3_ASSOC); |
|
| 1687 | ||
| 1688 | self::$logger->debug('<<getHistoryCount ['.$row['object_count'].']'); |
|
| 1689 | ||
| 1690 | return $row['object_count']; |
|
| 1691 | } |
|
| 1692 | } |
|
| 1693 | ||
| 1694 | /** |
|