Commit b2a2f0aa authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #36 from laszlokorte/output_fix

Writing the result into the output object instead of just echoing it out.
parents 2434d95a b011ef6c
......@@ -26,7 +26,7 @@ use Symfony\Component\Console\Input\InputArgument,
/**
* Task for executing arbitrary SQL that can come from a file or directly from
* the command line.
*
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @since 2.0
......@@ -71,13 +71,17 @@ EOT
if ( ! is_numeric($depth)) {
throw new \LogicException("Option 'depth' must contains an integer value");
}
if (preg_match('/^select/i', $sql)) {
$resultSet = $conn->fetchAll($sql);
} else {
$resultSet = $conn->executeUpdate($sql);
}
ob_start();
\Doctrine\Common\Util\Debug::dump($resultSet, (int) $depth);
$output = ob_get_clean();
$output->write();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment