Commit 07009102 authored by Taylor Otwell's avatar Taylor Otwell

refactor the query compiler.

parent 43f7e9e2
...@@ -12,20 +12,11 @@ class Compiler { ...@@ -12,20 +12,11 @@ class Compiler {
{ {
$sql = $query->select.' '.$query->from.' '.$query->where; $sql = $query->select.' '.$query->from.' '.$query->where;
if ( ! is_null($query->order)) if ( ! is_null($query->order)) $sql .= ' '.$query->order;
{
$sql .= ' '.$query->order;
}
if ( ! is_null($query->limit)) if ( ! is_null($query->limit)) $sql .= ' '.$query->limit;
{
$sql .= ' '.$query->limit;
}
if ( ! is_null($query->offset)) if ( ! is_null($query->offset)) $sql .= ' '.$query->offset;
{
$sql .= ' '.$query->offset;
}
return $sql; return $sql;
} }
......
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