1
0
mirror of synced 2024-12-14 07:06:04 +03:00
This commit is contained in:
zYne 2007-02-15 11:23:02 +00:00
parent 8fb01f704c
commit f4553f800f
2 changed files with 20 additions and 1 deletions

View File

@ -203,6 +203,25 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
}
return $text;
}
/**
* convertBoolean
* some drivers need the boolean values to be converted into integers
* when using DQL API
*
* This method takes care of that conversion
*
* @param array $item
* @return void
*/
public function convertBooleans(array $items)
{
foreach ($items as $k => $item) {
if (is_bool($item)) {
$items[$k] = (int) $item;
}
}
return $items;
}
/**
* Quote a string so it can be safely used as a table or column name
*

View File

@ -272,7 +272,7 @@ class Doctrine_Expression extends Doctrine_Connection_Module
public function concat($args)
{
$cols = $this->getIdentifiers($args);
return 'CONCAT(' . join(', ', $cols) . ')';
return 'CONCAT(' . join(', ', (array) $cols) . ')';
}
/**
* Returns the SQL for a logical not.