collections
collections copied to clipboard
ExpressionBuilder doesn't have a 'is not null' expresion method
ExpressionBuilder class has a method isNull() and it's based on equal operator. Why then we can't have a notNull() method based on miscellaneous operator? Is there any problem to compare result with '<>' operator? If not, my suggestion of method is allegorical for isNull(), and looks like this:
/**
* @param string $field
*
* @return Comparison
*/
public function notNull($field)
{
return new Comparison($field, Comparison::NEQ, new Value(null));
}
Came here for exactly this reason. Mkaelit did you have time for a pullrequest?