diff --git a/lib/Doctrine/Expression.php b/lib/Doctrine/Expression.php index 9ced16eb0..bf0d4ebb9 100644 --- a/lib/Doctrine/Expression.php +++ b/lib/Doctrine/Expression.php @@ -661,6 +661,15 @@ class Doctrine_Expression extends Doctrine_Connection_Module { throw new Doctrine_Expression_Exception('method not implemented'); } + /** + * returns arcus cosine SQL string + * + * @return string + */ + public function acos($value) + { + return 'ACOS(' . $value . ')'; + } /** * __call * @@ -671,5 +680,6 @@ class Doctrine_Expression extends Doctrine_Connection_Module if ($this->conn->getAttribute(Doctrine::ATTR_PORTABILITY) & Doctrine::PORTABILITY_EXPR) { throw new Doctrine_Expression_Exception('Unknown expression ' . $m); } + return $m . '()'; } }