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

types vs. field.types in db_write_table.Microsoft SQL Server #251

Closed
lymanmark opened this issue Mar 1, 2019 · 0 comments
Closed

types vs. field.types in db_write_table.Microsoft SQL Server #251

lymanmark opened this issue Mar 1, 2019 · 0 comments
Labels
bug an unexpected problem or unintended behavior verb trans 🤖 Translation of dplyr verbs to SQL

Comments

@lymanmark
Copy link

lymanmark commented Mar 1, 2019

db_write_table.Microsoft SQL Server passes "types" as an argument to dbWriteTable rather than "field.types" like db_write_table.DBIConnection. dbWriteTable methods are expecting the "field.types" argument not the "types"

> dbplyr:::`db_write_table.Microsoft SQL Server`
function (con, table, types, values, temporary = TRUE, ...) 
{
    table <- mssql_temp_name(table, temporary)
    dbWriteTable(con, name = table, types = types, value = values, 
        temporary = FALSE, row.names = FALSE)
    table
}
<environment: namespace:dbplyr>
> dbplyr:::db_write_table.DBIConnection
function (con, table, types, values, temporary = TRUE, ...) 
{
    dbWriteTable(con, name = dbi_quote(as.sql(table), con), value = values, 
        field.types = types, temporary = temporary, row.names = FALSE)
    table
}
<environment: namespace:dbplyr>
@hadley hadley added bug an unexpected problem or unintended behavior verb trans 🤖 Translation of dplyr verbs to SQL labels Mar 12, 2019
@hadley hadley closed this as completed in 44b282e Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior verb trans 🤖 Translation of dplyr verbs to SQL
Projects
None yet
Development

No branches or pull requests

2 participants