Skip to content

Case sensitivity when translating to SQL #181

@krlmlr

Description

@krlmlr

Some SQL functions may be case-sensitive, for instance spatial methods in MSSQL. The syntax is a bit weird, e.g. colname.STBuffer(1) for STBuffer(), the call COLNAME.STBUFFER(1) fails.

library(tidyverse)
library(dbplyr)
memdb_frame(a = 1) %>%
  mutate(x = a.STBuffer(1)) %>%
  sql_render()
#> <SQL> SELECT `a`, A.STBUFFER(1.0) AS `x`
#> FROM `opozhizxky`

Created on 2018-11-05 by the reprex package (v0.2.1.9000)

(This example works identically with MSSQL, using SQLite for the reprex.)

What's the reason for converting all function calls to uppercase?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviordplyr verbs 🤖Translation of dplyr verbs to SQLhelp wanted ❤️we'd love your help!tidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-day

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions