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

'is' operator #221

Closed
danschumann opened this Issue Mar 25, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@danschumann
Contributor

danschumann commented Mar 25, 2014

I am using some code

Users.forge()
  .query('where', 'admin_id', 'is', null)

that works, but now in the new version of knex, it seems to be broken because is isn't an operator and you're checking for operators.

@danschumann

This comment has been minimized.

Contributor

danschumann commented Mar 25, 2014

this broke production!! changes like this are almost too big for patch change and should be a 0.x.0 level change

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Mar 25, 2014

Thats odd because some point operators was indeed being used to check, then it wasn't, which was a regression. The whereNull method is intended for nulls, or if you just omit the is like .query('where', 'admin_id', null) I believe it should it generate the is null.

In any case, I generally try to stick as close as I can to semver when making changes, apologies for the breakage.

@danschumann

This comment has been minimized.

Contributor

danschumann commented Mar 25, 2014

Thanks for quick response time!

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Mar 25, 2014

Sure, cleaned it up a bit so you can also now do .query(col, 'is not', null) and also null can be assumed to be null or 'null' if is or is not are used as the operator. Pushing a release in a few.

@danschumann

This comment has been minimized.

Contributor

danschumann commented Mar 25, 2014

+1

elliotf pushed a commit to elliotf/knex that referenced this issue Nov 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment