Commit b8d8d953 authored by Guilherme Blanco's avatar Guilherme Blanco

Implemented SQRT function to Platform.

parent c8835edf
...@@ -507,11 +507,21 @@ abstract class AbstractPlatform ...@@ -507,11 +507,21 @@ abstract class AbstractPlatform
return 'LENGTH(' . $column . ')'; return 'LENGTH(' . $column . ')';
} }
/**
* Returns the squared value of a column
*
* @param string $column the column to use
* @return string generated sql including an SQRT aggregate function
*/
public function getSqrtExpression($column)
{
return 'SQRT(' . $column . ')';
}
/** /**
* Rounds a numeric field to the number of decimals specified. * Rounds a numeric field to the number of decimals specified.
* *
* @param string $expression1 * @param string $expression1
* @param string $expression2
* @return string * @return string
*/ */
public function getRoundExpression($column, $decimals = 0) public function getRoundExpression($column, $decimals = 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment