- use sql standard concat syntax instead of registering concat() mysql hack
This commit is contained in:
parent
658f73f045
commit
b1df27b1ac
@ -71,7 +71,6 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
|
|||||||
|
|
||||||
if ($this->isConnected) {
|
if ($this->isConnected) {
|
||||||
$this->dbh->sqliteCreateFunction('mod', array('Doctrine_Expression_Sqlite', 'modImpl'), 2);
|
$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('md5', 'md5', 1);
|
||||||
$this->dbh->sqliteCreateFunction('now', 'time', 0);
|
$this->dbh->sqliteCreateFunction('now', 'time', 0);
|
||||||
}
|
}
|
||||||
@ -92,7 +91,6 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
|
|||||||
parent::connect();
|
parent::connect();
|
||||||
|
|
||||||
$this->dbh->sqliteCreateFunction('mod', array('Doctrine_Expression_Sqlite', 'modImpl'), 2);
|
$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('md5', 'md5', 1);
|
||||||
$this->dbh->sqliteCreateFunction('now', 'time', 0);
|
$this->dbh->sqliteCreateFunction('now', 'time', 0);
|
||||||
}
|
}
|
||||||
|
@ -55,17 +55,6 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver
|
|||||||
return $dividend % $divisor;
|
return $dividend % $divisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a concatenation of the data that SQLite's concat() function receives.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function concatImpl()
|
|
||||||
{
|
|
||||||
$args = func_get_args();
|
|
||||||
return join('', $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* locate
|
* locate
|
||||||
* returns the position of the first occurrence of substring $substr in string $str that
|
* returns the position of the first occurrence of substring $substr in string $str that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user