File: mysqlHasDefault.Rd

package info (click to toggle)
rmysql 0.10.16-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 416 kB
  • sloc: ansic: 1,662; sh: 58; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 567 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/default.R
\name{mysqlHasDefault}
\alias{mysqlHasDefault}
\title{Check if default database is available.}
\usage{
mysqlHasDefault()
}
\description{
RMySQL examples and tests connect to a database defined by the
\code{rs-dbi} group in \code{~/.my.cnf}. This function checks if that
database is available, and if not, displays an informative message.
}
\examples{
if (mysqlHasDefault()) {
  db <- dbConnect(RMySQL::MySQL(), dbname = "test")
  dbListTables(db)
  dbDisconnect(db)
}
}