Skip to content

Commit

Permalink
Support for specifying column in condition.
Browse files Browse the repository at this point in the history
Nice to have ability to passing on instance of Column as part of condition.
Helpful to build complex query.

Example:
```
where()->equals( new Column("aCol", "tmpTable"), 1);
```
  • Loading branch information
prasad83 authored Jun 21, 2017
1 parent 4b2fc1d commit 13fd053
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Syntax/Where.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ public function compare($column, $value, $operator)
private function prepareColumn($column)
{
//This condition handles the "Select as a a column" special case.
if ($column instanceof Select) {
//or when compare column is customized.
if ($column instanceof Select || $column instanceof Column) {
return $column;
}

Expand Down

0 comments on commit 13fd053

Please sign in to comment.