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

escaping for integer64 #60

Closed
wants to merge 1 commit into from
Closed

escaping for integer64 #60

wants to merge 1 commit into from

Conversation

refik
Copy link

@refik refik commented Dec 19, 2017

This is for enabling integer64 support on queries. Useful for filtering on bigint primary keys. On its absence, this is the error:

int64
#> integer64
#> [1] 223743292
dplyr::filter(postgresql_table, id == !!int64)
#> Error in UseMethod("escape") : 
#>  no applicable method for 'escape' applied to an object of class "integer64"

@refik
Copy link
Author

@refik refik commented Dec 19, 2017

Or maybe custom class methods shouldn't be in this package?

@hadley
Copy link
Member

@hadley hadley commented Dec 28, 2017

I think int64 is fine here, since we're going to use it throughout DBI.

I'll add a couple of tests tomorrow before merging. In particular, need to confirm that int64 NA gets converted to NULL.

@hadley
Copy link
Member

@hadley hadley commented Dec 29, 2017

Your approach didn't quite work, as revealed by a couple of tests: f716654

Thanks for the idea and the initial implementation!

@hadley hadley closed this Dec 29, 2017
@refik
Copy link
Author

@refik refik commented Dec 29, 2017

Thank you for showing the way :) I'll definitely write a test next time.

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

Successfully merging this pull request may close these issues.

None yet

2 participants