refactoring query compiler.
This commit is contained in:
parent
5ca2e2b7f9
commit
25c78b8c55
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
gitflow/*
|
||||||
1
gitflow
Submodule
1
gitflow
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit be5dabf88e98075b9bc936bfa7de0f54a21a0482
|
||||||
@ -31,9 +31,7 @@ class Compiler {
|
|||||||
if ( ! is_null($query->$clause)) $sql[] = call_user_func(array($this, 'compile_'.$clause), $query->$clause);
|
if ( ! is_null($query->$clause)) $sql[] = call_user_func(array($this, 'compile_'.$clause), $query->$clause);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($sql as $key => $value) { if (is_null($value) or (string) $value === '') unset($sql[$key]); }
|
return implode(' ', array_filter($sql, function($value) { return ! is_null($value) and (string) $value !== ''; }));
|
||||||
|
|
||||||
return implode(' ', $sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user