Added "db get-rows" command by petenelson · Pull Request #153 · wp-cli/db-command

Something like this, but it will take an update to the run_mysql_command() in Utils in order to pass an arg to be able to capture the output.

$descriptors = [
	[ 'pipe', 'r' ],
	[ 'pipe', 'w' ],
	[ 'pipe', 'w' ],
];

$run_args = [ 'return_results' => true ];

$results = self::run( '/usr/bin/env mysql --no-defaults --no-auto-rehash --skip-column-names', $assoc_args, $descriptors, $run_args );

$results = array_filter( explode( PHP_EOL, $results ) );

I'll need to get the main wp-cli project setup locally for development in order to submit a PR for the run_mysql_command() update.