R/show_MariaDBConnection.R

Defines functions show_MariaDBConnection

Documented in show_MariaDBConnection

# show()
#' @rdname MariaDBConnection-class
#' @usage NULL
show_MariaDBConnection <- function(object) {
  info <- dbGetInfo(object)
  cat("<MariaDBConnection>\n")
  if (dbIsValid(object)) {
    cat("  Host:    ", info$host, "\n", sep = "")
    cat("  Server:  ", info$serverVersion, "\n", sep = "")
    cat("  Client:  ", info$client, "\n", sep = "")
    # cat("  Proto:   ", info$protocolVersion, "\n", sep = "")
    # cat("  ThreadId:", info$threadId, "\n", sep = "")
    # cat("  User:    ", info$user, "\n", sep = "")
    # cat("  ConType: ", info$conType, "\n", sep = "")
    # cat("  Db:      ", info$dbname, "\n", sep = "")
  } else {
    cat("  DISCONNECTED\n")
  }
}

#' @rdname MariaDBConnection-class
#' @export
setMethod("show", "MariaDBConnection", show_MariaDBConnection)

Try the RMariaDB package in your browser

Any scripts or data that you put into this service are public.

RMariaDB documentation built on June 19, 2022, 9:05 a.m.