gpt4 book ai didi

mysql - 如何在 Flow Framework 中打印查询?

转载 作者:行者123 更新时间:2023-11-28 23:58:09 26 4
gpt4 key购买 nike

我想从 Flow Framework 中的对象打印 SQL 查询。

$query = $this->createQuery();

return $query->matching(
$query->logicalAnd(
$query->equals('account.accountIdentifier', trim($email)),
$query->equals('isBlocked', 0)
)
)->execute();

最佳答案

试试这个,我将打印 sql/dql 查询:

/** @var $query \TYPO3\Flow\Persistence\Doctrine\Query */
/** @var $doctrineQueryBuilder \Doctrine\ORM\QueryBuilder */
$doctrineQueryBuilder = \TYPO3\Flow\Reflection\ObjectAccess::getProperty($query, 'queryBuilder', TRUE);

/** @var $doctrineQuery \Doctrine\ORM\Query */
$doctrineQuery = $doctrineQueryBuilder->getQuery();

\TYPO3\Flow\var_dump($doctrineQuery->getDQL());
\TYPO3\Flow\var_dump($doctrineQuery->getSQL());

关于mysql - 如何在 Flow Framework 中打印查询?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30907895/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com