From a181b06e70714b0d7fd67122e474899d8b15f795 Mon Sep 17 00:00:00 2001 From: zYne Date: Sat, 11 Aug 2007 22:12:17 +0000 Subject: [PATCH] added TRIM function --- lib/Doctrine/Expression/Driver.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Doctrine/Expression/Driver.php b/lib/Doctrine/Expression/Driver.php index adf5cba2f..2a0ec0287 100644 --- a/lib/Doctrine/Expression/Driver.php +++ b/lib/Doctrine/Expression/Driver.php @@ -169,6 +169,17 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module $expression2 = $this->getIdentifier($expression2); return 'MOD(' . $expression1 . ', ' . $expression2 . ')'; } + /** + * trim + * returns the string $str with leading and proceeding space characters removed + * + * @param string $str literal string or column name + * @return string + */ + public function trim($str) + { + return 'TRIM(' . $str . ')'; + } /** * ltrim * returns the string $str with leading space characters removed