Skip to content

This backend supports MySQL and MariaDB databases, typically accessed via MySQLConnection or MariaDBConnection created by DBI::dbConnect(). Use dialect_mysql() with lazy_frame() to see simulated SQL without connecting to a live database.

Key differences for this backend are:

  • paste() uses CONCAT_WS()

  • String translations for str_detect(), str_locate(), and str_replace_all()

  • Clear error message for unsupported full joins

See vignette("translation-function") and vignette("translation-verb") for details of overall translation technology.

Usage

dialect_mariadb()

dialect_mysql()

simulate_mysql()

simulate_mariadb()

Examples

library(dplyr, warn.conflicts = FALSE)

lf <- lazy_frame(a = TRUE, b = 1, c = 2, d = "z", con = dialect_mysql())
lf |> transmute(x = paste0(d, " times"))
#> <SQL>
#> SELECT CONCAT_WS('', `d`, ' times') AS `x`
#> FROM `df`