diff --git a/NEWS.md b/NEWS.md index 16dd32805..05b2224cd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,7 +14,8 @@ ## Documentation updates -- Update docs on how to cope with stored procedures (#239, @aryoda). +- The DBI specification vignette is rendered correctly from the installed package (#234). +- Update docs on how to cope with stored procedures (#242, @aryoda). - Add "Additional arguments" sections and more examples for `dbGetQuery()`, `dbSendQuery()`, `dbExecute()` and `dbSendStatement()`. - The `dbColumnInfo()` method is now fully specified (#75). - The `dbListFields()` method is now fully specified (#75). diff --git a/R/rd.R b/R/rd.R index 49aadd229..56bbdc315 100644 --- a/R/rd.R +++ b/R/rd.R @@ -9,8 +9,11 @@ methods_as_rd <- function(method) { s4_topic <- function(x) { sig <- paste0(x@defined, collapse = ",") sig_text <- paste0('"', x@defined, '"', collapse = ", ") - package <- getNamespaceName(environment(x@.Data)) - if (package == "DBI") { + package <- tryCatch( + getNamespaceName(environment(x@.Data)), + error = function(e) NA + ) + if (is.na(package) || package == "DBI") { NA_character_ } else { paste0(