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

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Syntax/Where.php

Lines changed: 2 additions & 1 deletion
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)