public function searchDatabase(
        Connection $connection,
        string $databaseName,
        string $searchTerm
    ): \Generator {
        $databaseMetadata = (new MetadataFactory())->getDatabaseMetadata($connection, $databaseName);

        foreach ($databaseMetadata->getAllTableMetadata() as $tableMetadata) {
            $resultList = $this->searchTable(
                $connection,
                $tableMetadata->getDatabaseName(),
                $tableMetadata->getTableName(),
                $searchTerm
            );

            foreach ($resultList as $result) {
                yield $result;
            }
        }
    }