1
0
mirror of synced 2025-02-22 07:03:13 +03:00

Moved SQRT function to Platform.

This commit is contained in:
Guilherme Blanco 2012-03-03 23:10:56 -05:00
parent 6195d42778
commit 1a192b6530
2 changed files with 4 additions and 3 deletions

View File

@ -41,8 +41,9 @@ class SqrtFunction extends FunctionNode
*/ */
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
{ {
//TODO: Use platform to get SQL return $sqlWalker->getConnection()->getDatabasePlatform()->getSqrtExpression(
return 'SQRT(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')'; $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression)
);
} }
/** /**

@ -1 +1 @@
Subproject commit 480b127fb5c35d6fbd70964a228cd63cfe2b7e14 Subproject commit b8d8d9535472ea805f14187343f80ac6cb3c2614