Skip to content

Commit 13fd053

Browse files
authored
Support for specifying column in condition.
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); ```
1 parent 4b2fc1d commit 13fd053

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Syntax/Where.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ public function compare($column, $value, $operator)
267267
private function prepareColumn($column)
268268
{
269269
//This condition handles the "Select as a a column" special case.
270-
if ($column instanceof Select) {
270+
//or when compare column is customized.
271+
if ($column instanceof Select || $column instanceof Column) {
271272
return $column;
272273
}
273274

0 commit comments

Comments
 (0)