Skip to content
Permalink
Browse files

All tests pass in Sqlite now, additionally made more secure the way

DateDiff is translated
  • Loading branch information...
lorenzo committed Aug 13, 2013
1 parent 32983dc commit e043699e215bb19cf50a6b09ba5304faa2c576cc
@@ -71,7 +71,7 @@ protected function _transformFunctionExpression(FunctionExpression $expression)
->name('ROUND')
->type('-')
->iterateParts(function($p) {
return new FunctionExpression('JULIANDAY', [$p => 'literal']);
return new FunctionExpression('JULIANDAY', [$p['value']], [$p['type']]);
});
break;
case 'NOW':
@@ -65,6 +65,13 @@ public function __construct($name, $params = [], $types = []) {
parent::__construct($params, $types, ',');
}
/**
* Sets the name of the SQL function to be invoke in this expression,
* if no value is passed it will return current name
*
* @param string $name
* @return string
*/
public function name($name = null) {
if ($name === null) {
return $this->_name;
@@ -112,7 +119,6 @@ public function add($params, $types = []) {
* @return string
*/
public function sql(ValueBinder $generator) {
$parts = [];
foreach ($this->_conditions as $condition) {
if ($condition instanceof ExpressionInterface) {

0 comments on commit e043699

Please sign in to comment.
You can’t perform that action at this time.