Alexander Makarov
Alexander Makarov
Oh... It could be multi-level.
@mariuszkrzaczkowski ``` php $case = new \yii\db\Case()) ->when('lead.status IS NULL || lead.status = ""')->then('') ->else('lead.status'); $query->select([ 'leadstatus' =>$case, ]); ```
Parameters are already handled on query level so I don't think there's a need to add special support at `CaseQuery` level.
@cebe yes, a good name.
Which file?
In our heads. We're just thinking loud.
No only in orderBy. It should be everywhere.
``` php $case = new \yii\db\CaseExpression()) ->when(['org.size' => [0, 1]])->then('
> Also, PHP < 7 does not allow method else(). `orElse`?
@SilverFire is it possible to implement such a thing with your recent proposal?