From 1f6a9da6884bbf0498c87a8745def4fe231ea220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 30 Mar 2024 20:30:42 +0100 Subject: [PATCH] fix: Avoid S4 warning due to method dispatch ambiguity for `dbQuoteString()` and `dbQuoteIdentifier()` --- R/dbQuoteIdentifier_AdbiConnection_character.R | 8 ++++++++ R/dbQuoteString_AdbiConnection_character.R | 8 ++++++++ man/AdbiConnection-class.Rd | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/R/dbQuoteIdentifier_AdbiConnection_character.R b/R/dbQuoteIdentifier_AdbiConnection_character.R index 588f7cb..566a2fb 100644 --- a/R/dbQuoteIdentifier_AdbiConnection_character.R +++ b/R/dbQuoteIdentifier_AdbiConnection_character.R @@ -12,3 +12,11 @@ setMethod( c("AdbiConnection", "character"), dbQuoteIdentifier_AdbiConnection_character ) + +#' @rdname AdbiConnection-class +#' @export +setMethod( + "dbQuoteIdentifier", + c("AdbiConnection", "SQL"), + dbQuoteIdentifier_AdbiConnection_character +) diff --git a/R/dbQuoteString_AdbiConnection_character.R b/R/dbQuoteString_AdbiConnection_character.R index 7047fcd..9ab258b 100644 --- a/R/dbQuoteString_AdbiConnection_character.R +++ b/R/dbQuoteString_AdbiConnection_character.R @@ -12,3 +12,11 @@ setMethod( c("AdbiConnection", "character"), dbQuoteString_AdbiConnection_character ) + +#' @rdname AdbiConnection-class +#' @export +setMethod( + "dbQuoteString", + c("AdbiConnection", "SQL"), + dbQuoteString_AdbiConnection_character +) diff --git a/man/AdbiConnection-class.Rd b/man/AdbiConnection-class.Rd index 514a6a5..704180c 100644 --- a/man/AdbiConnection-class.Rd +++ b/man/AdbiConnection-class.Rd @@ -49,10 +49,12 @@ \alias{dbListTables,AdbiConnection-method} \alias{dbQuoteIdentifier_AdbiConnection_character} \alias{dbQuoteIdentifier,AdbiConnection,character-method} +\alias{dbQuoteIdentifier,AdbiConnection,SQL-method} \alias{dbQuoteLiteral_AdbiConnection_character} \alias{dbQuoteLiteral,AdbiConnection,character-method} \alias{dbQuoteString_AdbiConnection_character} \alias{dbQuoteString,AdbiConnection,character-method} +\alias{dbQuoteString,AdbiConnection,SQL-method} \alias{dbRemoveTable_AdbiConnection} \alias{dbRemoveTable,AdbiConnection,character-method} \alias{dbRemoveTable,AdbiConnection,Id-method} @@ -98,10 +100,14 @@ \S4method{dbQuoteIdentifier}{AdbiConnection,character}(conn, x, ...) +\S4method{dbQuoteIdentifier}{AdbiConnection,SQL}(conn, x, ...) + \S4method{dbQuoteLiteral}{AdbiConnection,character}(conn, x, ...) \S4method{dbQuoteString}{AdbiConnection,character}(conn, x, ...) +\S4method{dbQuoteString}{AdbiConnection,SQL}(conn, x, ...) + \S4method{dbRemoveTable}{AdbiConnection,character}(conn, name, ..., temporary = FALSE, fail_if_missing = TRUE) \S4method{dbRemoveTable}{AdbiConnection,Id}(conn, name, ..., temporary = FALSE, fail_if_missing = TRUE)