public function searchTable(
        Connection $connection,
        string $databaseName,
        string $tableName,
        string $searchTerm
    ): \Generator {
        $tableMetadata = (new MetadataFactory())->getTableMetadata($connection, $databaseName, $tableName);

        if (!$tableMetadata->hasStringTypeColumn()) {
            return;
        }

        $rowResultList = (new StringMatchTableSearchStrategy())->getMatches(
            $connection,
            $tableMetadata,
            $searchTerm
        );

        // Yield batch tracking rows returned
        foreach ($rowResultList as $rowResult) {
            yield $rowResult;
        }
    }
public function searchTable(
        Connection $connection,
        string $databaseName,
        string $tableName,
        string $searchTerm
    ): \Generator {
        $tableMetadata = (new MetadataFactory())->getTableMetadata($connection, $databaseName, $tableName);

        if (!$tableMetadata->hasStringTypeColumn()) {
            return;
        }

        $rowResultList = (new StringMatchTableSearchStrategy())->getMatches(
            $connection,
            $tableMetadata,
            $searchTerm
        );

        // Yield batch tracking rows returned
        foreach ($rowResultList as $rowResult) {
            yield $rowResult;
        }
    }
public function searchTable ( Connection $ connection , string $ databaseName , string $ tableName , string $ searchTerm ) : \ Generator { $ tableMetadata = ( new MetadataFactory ( ) ) -> getTableMetadata ( $ connection , $ databaseName , $ tableName ) ; if ( ! $ tableMetadata -> hasStringTypeColumn ( ) ) { return ; } $ rowResultList = ( new StringMatchTableSearchStrategy ( ) ) -> getMatches ( $ connection , $ tableMetadata , $ searchTerm ) ; // Yield batch tracking rows returned foreach ( $ rowResultList as $ rowResult ) { yield $ rowResult ; } }
Performs a search on the provided table.

@param Connection $connection
@param string $databaseName
@param string $tableName
@param string $searchTerm
@return \Generator|RowSearchResult[]
Performs a search on the provided table .