Skip to content

Commit a5f6c98

Browse files
authored
Merge pull request #86 from prasad83/master
Accept Column object through setColumns.
2 parents 877d54f + 13fd053 commit a5f6c98

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Syntax/SyntaxFactory.php

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public static function createColumns(array &$arguments, $table = null)
3535
$column->setAlias($index);
3636
}
3737

38+
$createdColumns[] = $column;
39+
} else if ($column instanceof Column) {
3840
$createdColumns[] = $column;
3941
}
4042
}

src/Syntax/Where.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ protected function compare($column, $value, $operator)
278278
protected function prepareColumn($column)
279279
{
280280
//This condition handles the "Select as a a column" special case.
281-
if ($column instanceof Select) {
281+
//or when compare column is customized.
282+
if ($column instanceof Select || $column instanceof Column) {
282283
return $column;
283284
}
284285

0 commit comments

Comments
 (0)