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

Escape raw vectors and support list of raw vectors #433

Merged
merged 14 commits into from May 22, 2020

Conversation

okhoma
Copy link
Contributor

@okhoma okhoma commented Apr 23, 2020

Hi,

Please, consider my pull request to support escape of raw vectors and lists of raw vectors.

The motivation is to be able to pass UTF-8 strings into dplyr filter method using a workaround described in r-dbi/DBI#215 (comment). Here, UTF-8 character vectors are converted to list of UTF-16 raw vectors and then the data is properly written into the database. However, when I attempt to filter the table passing raw vectors or list of raw vectors in the same manner, I am getting an error Error in UseMethod("escape") : no applicable method for 'escape' applied to an object of class "raw".

R/escape.R Outdated Show resolved Hide resolved
krlmlr
krlmlr approved these changes May 14, 2020
Copy link
Member

@krlmlr krlmlr left a comment

Thanks, this looks great.

We should wait until #449 which also reexports the pipe.

@krlmlr krlmlr requested a review from hadley May 14, 2020
okhoma and others added 2 commits May 14, 2020
Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
R/escape.R Outdated Show resolved Hide resolved
R/escape.R Show resolved Hide resolved
R/sql-expr.R Outdated Show resolved Hide resolved
R/escape.R Outdated Show resolved Hide resolved
Oleh Khoma-ext added 2 commits May 18, 2020
@okhoma okhoma requested a review from hadley May 18, 2020
hadley
hadley approved these changes May 18, 2020
Copy link
Member

@hadley hadley left a comment

Looks good! Can you please add a bullet to the top of NEWS.md? It should briefly describe the change and end with (@yourname, #issuenumber).

R/escape.R Show resolved Hide resolved
R/escape.R Outdated Show resolved Hide resolved
R/backend-mssql.R Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
@krlmlr
Copy link
Member

krlmlr commented May 19, 2020

I also sent a pull request to remove the extraneous magrittr import: https://github.com/okhoma/dbplyr/pull/1/files.

okhoma and others added 4 commits May 19, 2020
magrittr reexport now in master
Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
krlmlr
krlmlr approved these changes May 19, 2020
@hadley hadley merged commit 08554db into tidyverse:master May 22, 2020
24 checks passed
@hadley
Copy link
Member

hadley commented May 22, 2020

Thanks!

okhoma pushed a commit to okhoma/dbplyr that referenced this issue Sep 21, 2020
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

3 participants