1\name{register_db_backend}
2\alias{register_db_backend}
3\alias{register_sqlite_backend}
4\alias{register_mysql_backend}
5\title{
6Functions to setup a database backend for twitteR
7}
8\description{
9twitteR can have a database backend registered from which to store and load
10tweet and user data. These functions provide mechanisms for setting up the
11connection within twitteR
12}
13\usage{
14register_db_backend(db_handle)
15register_sqlite_backend(sqlite_file, ...)
16register_mysql_backend(db_name, host, user, password, ...)
17}
18\arguments{
19  \item{db_handle}{A DBI connection}
20  \item{sqlite_file}{File path for a SQLite file}
21  \item{db_name}{Name of the database to connect to}
22  \item{host}{Hostname the database is on}
23  \item{user}{username to connect to the database with}
24  \item{password}{password to connect to the database with}
25  \item{...}{extra arguments to pass to \code{dbConnect}}
26}
27\details{
28  Currently only \code{RSQLite} and \code{RMySQL} are supported. To use either
29  of these DBI implementations the appropriate packages will need to be
30  installed.
31
32  The \code{register_sqlite_backend} and \code{register_mysql_backend} are
33  convenience wrappers to both create the DBI connection and call \code{register_db_backend}
34  for you.
35}
36\value{
37  The DBI connection, invisibly
38}
39\author{Jeff Gentry}
40\seealso{
41\code{\link{store_tweets_db}}, \code{\link{store_users_db}}, \code{\link{load_tweets_db}}, \code{\link{load_users_db}}
42}
43\examples{
44   \dontrun{
45    register_sqlite_backend("/path/to/sqlite/file")
46    tweets = searchTwitter("#scala")
47    store_tweets_db(tweets)
48    from_db = load_tweets_db()
49   }
50}
51\keyword{ utilities }