Clean-up the default database grammar.

This commit is contained in:
Taylor Otwell 2011-11-07 13:24:22 -06:00
parent 466f05499f
commit f46a3deab6
1 changed files with 9 additions and 3 deletions

View File

@ -161,7 +161,9 @@ final protected function wheres(Query $query)
*/
protected function where($where)
{
return $this->wrap($where['column']).' '.$where['operator'].' '.$this->parameter($where['value']);
$parameter = $this->parameter($where['value']);
return $this->wrap($where['column']).' '.$where['operator'].' '.$parameter;
}
/**
@ -172,7 +174,9 @@ protected function where($where)
*/
protected function where_in($where)
{
return $this->wrap($where['column']).' IN ('.$this->parameterize($where['values']).')';
$parameters = $this->parameterize($where['values']);
return $this->wrap($where['column']).' IN ('.$parameters.')';
}
/**
@ -183,7 +187,9 @@ protected function where_in($where)
*/
protected function where_not_in($where)
{
return $this->wrap($where['column']).' NOT IN ('.$this->parameterize($where['values']).')';
$parameters = $this->parameterize($where['values']);
return $this->wrap($where['column']).' NOT IN ('.$parameters.')';
}
/**