public function searchServer(
        Connection $connection,
        string $searchTerm
    ): \Generator {
        $serverMetadata = (new MetadataFactory())->getServerMetadata($connection);

        foreach ($serverMetadata->getAllDatabaseMetadata() as $databaseMetadata) {
            $resultList = $this->searchDatabase(
                $connection,
                $databaseMetadata->getDatabaseName(),
                $searchTerm
            );

            foreach ($resultList as $result) {
                yield $result;
            }
        }
    }
public function searchServer(
        Connection $connection,
        string $searchTerm
    ): \Generator {
        $serverMetadata = (new MetadataFactory())->getServerMetadata($connection);

        foreach ($serverMetadata->getAllDatabaseMetadata() as $databaseMetadata) {
            $resultList = $this->searchDatabase(
                $connection,
                $databaseMetadata->getDatabaseName(),
                $searchTerm
            );

            foreach ($resultList as $result) {
                yield $result;
            }
        }
    }
public function searchServer ( Connection $ connection , string $ searchTerm ) : \ Generator { $ serverMetadata = ( new MetadataFactory ( ) ) -> getServerMetadata ( $ connection ) ; foreach ( $ serverMetadata -> getAllDatabaseMetadata ( ) as $ databaseMetadata ) { $ resultList = $ this -> searchDatabase ( $ connection , $ databaseMetadata -> getDatabaseName ( ) , $ searchTerm ) ; foreach ( $ resultList as $ result ) { yield $ result ; } } }
Performs a search across databases on a server.

@param Connection $connection
@param string $searchTerm
@return \Generator|RowSearchResult[]
Performs a search across databases on a server .