public function query()
{
try {
// Prado::trace('Query: '.$this->getDebugStatementText(), 'Prado\Data');
if ($this->_statement instanceof PDOStatement) {
$this->_statement->execute();
} else {
$this->_statement = $this->getConnection()->getPdoInstance()->query($this->getText());
}
return new TDbDataReader($this);
} catch (Exception $e) {
throw new TDbException('dbcommand_query_failed', $e->getMessage(), $this->getDebugStatementText());
}
}