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

Prepared(true) issues when using IS NULL comparisson operation #33

Closed
danielfbm opened this issue Mar 6, 2017 · 2 comments
Closed

Prepared(true) issues when using IS NULL comparisson operation #33

danielfbm opened this issue Mar 6, 2017 · 2 comments

Comments

@danielfbm
Copy link
Contributor

Hi,
First of all, thank you very much for this amazing library. I have been using it for a week or so, and I found it to be very useful and very quick to get used to.

I am still facing a weird issue when doing selects using goqu.I("column").IsNull(). If the query is Prepared(true) then this would generate a following condition: "column" IS $1 and that is not allowed in different databases. I didnt get it to work with psql.

I think this, although is prepared, could keep the IS NULL as this is not really a parameter.

@doug-martin
Copy link
Owner

I agree it seems we handle that for TRUE and FALSE but not NULL if you want to open a PR that would be great not sure when Ill have time to get to this.

I would start here https://github.com/doug-martin/goqu/blob/master/default_adapter.go#L815 and add some tests to the select tests both prepared and not https://github.com/doug-martin/goqu/blob/master/dataset_select_test.go.

@danielfbm
Copy link
Contributor Author

danielfbm commented Mar 11, 2017

@doug-martin I opened a pull-request for this. I updated the relevant tests and ran all of them with the compose file (+1 for that)
Take your time to review and let me know If there is something wrong in there...

#34

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