Skip to content

Files

Latest commit

4966c45 · Oct 10, 2013

History

History
This branch is 336 commits behind r-dbi/RMySQL:main.

inst

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 27, 2009
Jan 27, 2009
Aug 31, 2006
Oct 10, 2013
Apr 7, 2009
Oct 10, 2013
Dec 11, 2008
Jun 1, 2007
Aug 31, 2006
Aug 31, 2006
Aug 31, 2006
R/S-Plus Database Interface and the MySQL driver

For details, see the Adobe PDF file "DBI.pdf"" in this 
library directory or help(MySQL).

This package implements an R/S4/Splus5+ to MySQL interface according
to the RS-Database Interface specification, see

     http://www.omegahat.org/contrib/RS-DBI

The R/S MySQL implementation can handle multiple connections to
multiple MySQL servers. 

Basic usage:
------------
  # initialize S/Splus as a MySQL client
  mgr <- dbDriver("MySQL")       

  # create a connection to a MySQL server
  con <- dbConnect(mgr, user="user", pass="pass", 
                   host="host", dbname="database")

  # run a query, leave results on the server
  rs <- dbSendQuery(con, "select * from A_TABLE")

  # fetch up to, say, 50 records
  a.table <- fetch(rs, n = 50)
  
  # close resultSet rs and connection con 
  dbClearResult(rs);  dbDisconnect(con)

Basic Methods:
--------------
  summary(dbObj)   # prints metadata for dbObj (e.g, mgr, con, rs)
  dbGetInfo(dbObj)    # returns a list of available metadata for dbObj
  dbDisconnect(con)      # closes dbObj (connection or resultSet)
  dbClearReasults(res)
  dbListTables(con)
  dbListConnections(drv)
  dbListResults(con)