Skip to content

Commit

Permalink
chore: Indicate MySQL server, bump to dev version of RMariaDB, work a…
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Oct 8, 2023
1 parent bfd1498 commit 6364dcf
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Suggests:
colourpicker,
covr,
crayon,
dbplyr (>= 2.2.0),
dbplyr (>= 2.3.4),
DiagrammeR,
DiagrammeRsvg,
digest,
Expand All @@ -91,7 +91,7 @@ Suggests:
pool,
progress,
reactable,
RMariaDB (>= 1.2.2),
RMariaDB (>= 1.2.2.9008),
rmarkdown,
RPostgres,
RSQLite (>= 2.2.8),
Expand Down Expand Up @@ -127,3 +127,5 @@ Roxygen: list(
roclets = c("collate", "namespace", "rd", "roxyglobals::global_roclet")
)
RoxygenNote: 7.2.3
Remotes:
r-dbi/RMariaDB
12 changes: 11 additions & 1 deletion R/db-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,17 @@ is_postgres <- function(dest) {
}

is_mariadb <- function(dest) {
inherits_any(dest, c("MariaDBConnection", "src_MariaDBConnection", "src_DoltConnection", "src_DoltLocalConnection"))
inherits_any(
dest,
c(
"MariaDBConnection",
"src_MariaDBConnection",
"MySQLConnection",
"src_MySQLConnection",
"src_DoltConnection",
"src_DoltLocalConnection"
)
)
}

schema_supported_dbs <- function() {
Expand Down
10 changes: 10 additions & 0 deletions R/mariadb.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# No longer needed for dbplyr >= 2.4.0
# https://github.com/tidyverse/dbplyr/pull/1190
rlang::on_load({
if (rlang::is_installed("dbplyr") && getNamespaceInfo("dbplyr", "spec")["version"] <= "2.3.4") {
dbplyr <- asNamespace("dbplyr")
unlockBinding("sql_values_subquery.MariaDBConnection", dbplyr)
try(dbplyr$sql_values_subquery.MariaDBConnection <- dbplyr$sql_values_subquery.DBIConnection, silent = TRUE)
lockBinding("sql_values_subquery.MariaDBConnection", dbplyr)
}
})

0 comments on commit 6364dcf

Please sign in to comment.