コード例 #1
0
 /**
  * Constructor.
  * @param TDbCommand the command generating the query result
  */
 public function __construct(TDbCommand $command)
 {
     $this->_statement = $command->getPdoStatement();
     $this->_statement->setFetchMode(PDO::FETCH_ASSOC);
 }
コード例 #2
0
 /**
  * Constructor.
  * @param TDbConnection the database connection
  * @param string the SQL statement to be executed
  * @param TDbStatementClassification Defaults to 'UNKNOWN'
  */
 public function __construct(TDbConnection $connection, $text, $classification = TDbStatementClassification::UNKNOWN)
 {
     $connection->setActive(true);
     parent::__construct($connection, $text);
     $this->_statementClassification = $classification;
     Prado::log($classification . ', ' . $connection->getServerRole() . ': ' . preg_replace('/[\\s]+/', ' ', $text), TLogger::DEBUG, 'System.Testing.Data.Distributed.TDistributedDbCommand');
 }