Commit e80b339d authored by zYne's avatar zYne

boolean value parsing added

parent f4553f80
......@@ -73,4 +73,22 @@ class Doctrine_DataDict extends Doctrine_Connection_Module
return $change;
}
/**
* parseBoolean
* parses a literal boolean value and returns
* proper sql equivalent
*
* @param string $value boolean value to be parsed
* @return string parsed boolean value
*/
public function parseBoolean($value)
{
// parse booleans
if ($value == 'true') {
$value = 1;
} elseif ($value == 'false') {
$value = 0;
}
return $value;
}
}
......@@ -602,4 +602,16 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
$name = $this->conn->quoteIdentifier($name, true);
return $name . ' ' . $this->getNativeDeclaration($field) . $default . $notnull;
}
/**
* parseBoolean
* parses a literal boolean value and returns
* proper sql equivalent
*
* @param string $value boolean value to be parsed
* @return string parsed boolean value
*/
public function parseBoolean($value)
{
return $value;
}
}
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