Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExpressionBuilder doesn't have a 'is not null' expresion method #132

Open
mikaelit opened this issue Sep 5, 2017 · 1 comment
Open

ExpressionBuilder doesn't have a 'is not null' expresion method #132

mikaelit opened this issue Sep 5, 2017 · 1 comment

Comments

@mikaelit
Copy link

mikaelit commented Sep 5, 2017

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));
    }

@michsk
Copy link

michsk commented Mar 9, 2018

Came here for exactly this reason. Mkaelit did you have time for a pullrequest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants