1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

Fixed documentation for Doctrine\ORM\Query\Exec

This commit is contained in:
Benjamin Morel 2012-12-13 11:57:46 +00:00
parent 98ac6b5fec
commit d4357801a2
6 changed files with 54 additions and 8 deletions

View file

@ -53,6 +53,11 @@ abstract class AbstractSqlExecutor
return $this->_sqlStatements; return $this->_sqlStatements;
} }
/**
* @param \Doctrine\DBAL\Cache\QueryCacheProfile $qcp
*
* @return void
*/
public function setQueryCacheProfile(QueryCacheProfile $qcp) public function setQueryCacheProfile(QueryCacheProfile $qcp)
{ {
$this->queryCacheProfile = $qcp; $this->queryCacheProfile = $qcp;
@ -61,9 +66,10 @@ abstract class AbstractSqlExecutor
/** /**
* Executes all sql statements. * Executes all sql statements.
* *
* @param \Doctrine\DBAL\Connection $conn The database connection that is used to execute the queries. * @param Connection $conn The database connection that is used to execute the queries.
* @param array $params The parameters. * @param array $params The parameters.
* @param array $types The parameter types. * @param array $types The parameter types.
*
* @return \Doctrine\DBAL\Driver\Statement * @return \Doctrine\DBAL\Driver\Statement
*/ */
abstract public function execute(Connection $conn, array $params, array $types); abstract public function execute(Connection $conn, array $params, array $types);

View file

@ -33,15 +33,27 @@ use Doctrine\ORM\Query\AST;
*/ */
class MultiTableDeleteExecutor extends AbstractSqlExecutor class MultiTableDeleteExecutor extends AbstractSqlExecutor
{ {
/**
* @var string
*/
private $_createTempTableSql; private $_createTempTableSql;
/**
* @var string
*/
private $_dropTempTableSql; private $_dropTempTableSql;
/**
* @var string
*/
private $_insertSql; private $_insertSql;
/** /**
* Initializes a new <tt>MultiTableDeleteExecutor</tt>. * Initializes a new <tt>MultiTableDeleteExecutor</tt>.
* *
* @param Node $AST The root AST node of the DQL query. * @param \Doctrine\ORM\Query\AST\Node $AST The root AST node of the DQL query.
* @param SqlWalker $sqlWalker The walker used for SQL generation from the AST. * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker The walker used for SQL generation from the AST.
*
* @internal Any SQL construction and preparation takes place in the constructor for * @internal Any SQL construction and preparation takes place in the constructor for
* best performance. With a query cache the executor will be cached. * best performance. With a query cache the executor will be cached.
*/ */

View file

@ -34,17 +34,37 @@ use Doctrine\ORM\Query\AST;
*/ */
class MultiTableUpdateExecutor extends AbstractSqlExecutor class MultiTableUpdateExecutor extends AbstractSqlExecutor
{ {
/**
* @var string
*/
private $_createTempTableSql; private $_createTempTableSql;
/**
* @var string
*/
private $_dropTempTableSql; private $_dropTempTableSql;
/**
* @var string
*/
private $_insertSql; private $_insertSql;
/**
* @var array
*/
private $_sqlParameters = array(); private $_sqlParameters = array();
/**
* @var int
*/
private $_numParametersInUpdateClause = 0; private $_numParametersInUpdateClause = 0;
/** /**
* Initializes a new <tt>MultiTableUpdateExecutor</tt>. * Initializes a new <tt>MultiTableUpdateExecutor</tt>.
* *
* @param Node $AST The root AST node of the DQL query. * @param \Doctrine\ORM\Query\AST\Node $AST The root AST node of the DQL query.
* @param SqlWalker $sqlWalker The walker used for SQL generation from the AST. * @param \Doctrine\ORM\Query\SqlWalker $sqlWalker The walker used for SQL generation from the AST.
*
* @internal Any SQL construction and preparation takes place in the constructor for * @internal Any SQL construction and preparation takes place in the constructor for
* best performance. With a query cache the executor will be cached. * best performance. With a query cache the executor will be cached.
*/ */

View file

@ -33,6 +33,10 @@ use Doctrine\ORM\Query\SqlWalker;
*/ */
class SingleSelectExecutor extends AbstractSqlExecutor class SingleSelectExecutor extends AbstractSqlExecutor
{ {
/**
* @param \Doctrine\ORM\Query\AST\SelectStatement $AST
* @param \Doctrine\ORM\Query\SqlWalker $sqlWalker
*/
public function __construct(SelectStatement $AST, SqlWalker $sqlWalker) public function __construct(SelectStatement $AST, SqlWalker $sqlWalker)
{ {
$this->_sqlStatements = $sqlWalker->walkSelectStatement($AST); $this->_sqlStatements = $sqlWalker->walkSelectStatement($AST);

View file

@ -34,6 +34,10 @@ use Doctrine\ORM\Query\AST;
*/ */
class SingleTableDeleteUpdateExecutor extends AbstractSqlExecutor class SingleTableDeleteUpdateExecutor extends AbstractSqlExecutor
{ {
/**
* @param \Doctrine\ORM\Query\AST\Node $AST
* @param \Doctrine\ORM\Query\SqlWalker $sqlWalker
*/
public function __construct(AST\Node $AST, $sqlWalker) public function __construct(AST\Node $AST, $sqlWalker)
{ {
if ($AST instanceof AST\UpdateStatement) { if ($AST instanceof AST\UpdateStatement) {

View file

@ -205,7 +205,7 @@ class SqlWalker implements TreeWalker
/** /**
* Gets the EntityManager used by the walker. * Gets the EntityManager used by the walker.
* *
* @return EntityManager * @return \Doctrine\ORM\EntityManager
*/ */
public function getEntityManager() public function getEntityManager()
{ {