From 95d443575f4c2aa88efb46aeee9daac25c3cd6d3 Mon Sep 17 00:00:00 2001 From: jackbravo Date: Sat, 25 Aug 2007 00:14:14 +0000 Subject: [PATCH] Added some user functions (trim, ltrim, rtrim, sha1), the trim function prevented the tests from running --- lib/Doctrine/Connection/Sqlite.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Connection/Sqlite.php b/lib/Doctrine/Connection/Sqlite.php index f59f70e36..f392d53ed 100644 --- a/lib/Doctrine/Connection/Sqlite.php +++ b/lib/Doctrine/Connection/Sqlite.php @@ -84,10 +84,15 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common public function connect() { parent::connect(); - - $this->dbh->sqliteCreateFunction('md5', array('Doctrine_Expression_Sqlite', 'md5Impl'), 1); + $this->dbh->sqliteCreateFunction('mod', array('Doctrine_Expression_Sqlite', 'modImpl'), 2); $this->dbh->sqliteCreateFunction('concat', array('Doctrine_Expression_Sqlite', 'concatImpl')); + $this->dbh->sqliteCreateFunction('md5', 'md5', 1); + $this->dbh->sqliteCreateFunction('sha1', 'sha1', 1); + $this->dbh->sqliteCreateFunction('locate', 'strpos', 2); + $this->dbh->sqliteCreateFunction('rtrim', 'rtrim', 1); + $this->dbh->sqliteCreateFunction('ltrim', 'ltrim', 1); + $this->dbh->sqliteCreateFunction('trim', 'trim', 1); $this->dbh->sqliteCreateFunction('now', 'time', 0); } /**