#' @title Set the connection ID so that it can be identified
#'
#' @description This is primarily so that connections can be identified
#' on the database end for testing and debugging purposes.
#'
#' @param conn (DBIConnection) object
#' @param name (str) name of the object
#'
#' @family Extra DBI Methods
#' @export
dbSetConnId <- function(conn, name) {
UseMethod("dbSetConnId")
}
#' @export
dbSetConnId.PqConnection <- function(conn, name) {
dbExecute(conn, glue_sql("set application_name to {name}", .con = conn))
invisible(NULL)
}
#' @export
dbSetConnId.SQLiteConnection <- function(conn, name) {
invisible(NULL)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.