Skip to content

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

@lymanmark

Description

@lymanmark

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviordplyr verbs 🤖Translation of dplyr verbs to SQL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions