Commit 9200d127 authored by zYne's avatar zYne

small refactorings

parent ee5a7f8c
...@@ -186,9 +186,9 @@ class Doctrine_Expression extends Doctrine_Connection_Module { ...@@ -186,9 +186,9 @@ class Doctrine_Expression extends Doctrine_Connection_Module {
* locate * locate
* returns the position of the first occurrence of substring $substr in string $str * 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 * @param string $str literal string
* @return string * @return integer
*/ */
public function locate($substr, $str) { public function locate($substr, $str) {
return 'LOCATE(' . $str . ', ' . $substr . ')'; return 'LOCATE(' . $str . ', ' . $substr . ')';
...@@ -201,6 +201,19 @@ class Doctrine_Expression extends Doctrine_Connection_Module { ...@@ -201,6 +201,19 @@ class Doctrine_Expression extends Doctrine_Connection_Module {
public function now() { public function now() {
return '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 * return string to call a function to get a substring inside an SQL statement
* *
......
...@@ -143,16 +143,15 @@ class Doctrine_Import_Builder { ...@@ -143,16 +143,15 @@ class Doctrine_Import_Builder {
/** /**
* *
* @param Doctrine_Schema_Object $schema * @param Doctrine_Schema_Object $schema
* @return
* @access public
* @throws Doctrine_Import_Exception * @throws Doctrine_Import_Exception
* @return void
*/ */
public function build(Doctrine_Schema_Object $schema) { public function build(Doctrine_Schema_Object $schema) {
foreach($schema->getDatabases() as $database){ foreach($schema->getDatabases() as $database){
foreach($database->getTables() as $table){ foreach($database->getTables() as $table){
$this->buildRecord($table); $this->buildRecord($table);
} }
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment