1
0
mirror of synced 2025-01-18 22:41:43 +03:00

small refactorings

This commit is contained in:
zYne 2006-11-22 18:15:21 +00:00
parent ee5a7f8c1b
commit 9200d1271a
2 changed files with 21 additions and 9 deletions

View File

@ -186,9 +186,9 @@ class Doctrine_Expression extends Doctrine_Connection_Module {
* locate
* returns the position of the first occurrence of substring $substr in string $str
*
* @param string $substr literal string
* @param string $substr literal string to find
* @param string $str literal string
* @return string
* @return integer
*/
public function locate($substr, $str) {
return 'LOCATE(' . $str . ', ' . $substr . ')';
@ -201,6 +201,19 @@ class Doctrine_Expression extends Doctrine_Connection_Module {
public function now() {
return 'NOW()';
}
/**
* soundex
* Returns a string to call a function to compute the
* soundex encoding of a string
*
* The string "?000" is returned if the argument is NULL.
*
* @param string $value
* @return string SQL soundex function with given parameter
*/
public function soundex($value) {
throw new Doctrine_Expression_Exception('SQL soundex function not supported by this driver.');
}
/**
* return string to call a function to get a substring inside an SQL statement
*

View File

@ -143,16 +143,15 @@ class Doctrine_Import_Builder {
/**
*
* @param Doctrine_Schema_Object $schema
* @return
* @access public
* @throws Doctrine_Import_Exception
* @return void
*/
public function build(Doctrine_Schema_Object $schema) {
foreach($schema->getDatabases() as $database){
foreach($database->getTables() as $table){
$this->buildRecord($table);
}
}
foreach($schema->getDatabases() as $database){
foreach($database->getTables() as $table){
$this->buildRecord($table);
}
}
}
}