\HeaderA{indac\_dbconn}{Collect information about the package annotation DB}{indac.Rul.dbconn}
\aliasA{indac\_dbfile}{indac\_dbconn}{indac.Rul.dbfile}
\aliasA{indac\_dbInfo}{indac\_dbconn}{indac.Rul.dbInfo}
\aliasA{indac\_dbschema}{indac\_dbconn}{indac.Rul.dbschema}
\keyword{utilities}{indac\_dbconn}
\keyword{datasets}{indac\_dbconn}
\begin{Description}\relax
Some convenience functions for getting a connection object to (or collecting
information about) the package annotation DB.
\end{Description}
\begin{Usage}
\begin{verbatim}
  indac_dbconn()
  indac_dbfile()
  indac_dbschema(file="", show.indices=FALSE)
  indac_dbInfo()
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] A connection, or a character string naming the file to print to (see
the \code{file} argument of the \code{\LinkA{cat}{cat}} function for
the details).

\item[\code{show.indices}] The CREATE INDEX statements are not shown by default.
Use \code{show.indices=TRUE} to get them.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{indac\_dbconn} returns a connection object to the package
annotation DB.
IMPORTANT: Don't call \code{\LinkA{dbDisconnect}{dbDisconnect}} on the connection
object returned by \code{indac\_dbconn} or you will
break all the \code{\LinkA{AnnDbObj}{AnnDbObj}} objects defined in this package!

\code{indac\_dbfile} returns the path (character string) to the
package annotation DB (this is an SQLite file).

\code{indac\_dbschema} prints the schema definition of the
package annotation DB.

\code{indac\_dbInfo} prints other information about the package
annotation DB.
\end{Details}
\begin{Value}
\code{indac\_dbconn}: a DBIConnection object representing an open
connection to the package annotation DB.

\code{indac\_dbfile}: a character string with the path to the
package annotation DB.

\code{indac\_dbschema}: none (invisible \code{NULL}).

\code{indac\_dbInfo}: none (invisible \code{NULL}).
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{dbGetQuery}{dbGetQuery}},
\code{\LinkA{dbConnect}{dbConnect}},
\code{\LinkA{dbconn}{dbconn}},
\code{\LinkA{dbfile}{dbfile}},
\code{\LinkA{dbschema}{dbschema}},
\code{\LinkA{dbInfo}{dbInfo}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  ## Count the number of rows in the "probes" table:
  dbGetQuery(indac_dbconn(), "SELECT COUNT(*) FROM probes")

  ## The connection object returned by indac_dbconn() was created with:
  dbConnect(SQLite(), dbname=indac_dbfile(), cache_size=64000, synchronous=0)

  indac_dbschema()

  indac_dbInfo()
\end{ExampleCode}
\end{Examples}

