\HeaderA{hom.Rn.inp\_dbconn}{Collect information about the package annotation DB}{hom.Rn.inp.Rul.dbconn}
\aliasA{hom.Rn.inp\_dbfile}{hom.Rn.inp\_dbconn}{hom.Rn.inp.Rul.dbfile}
\aliasA{hom.Rn.inp\_dbInfo}{hom.Rn.inp\_dbconn}{hom.Rn.inp.Rul.dbInfo}
\aliasA{hom.Rn.inp\_dbschema}{hom.Rn.inp\_dbconn}{hom.Rn.inp.Rul.dbschema}
\keyword{utilities}{hom.Rn.inp\_dbconn}
\keyword{datasets}{hom.Rn.inp\_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}
  hom.Rn.inp_dbconn()
  hom.Rn.inp_dbfile()
  hom.Rn.inp_dbschema(file="", show.indices=FALSE)
  hom.Rn.inp_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{hom.Rn.inp\_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{hom.Rn.inp\_dbconn} or you will
break all the \code{\LinkA{AnnDbObj}{AnnDbObj}} objects defined in this package!

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

\code{hom.Rn.inp\_dbschema} prints the schema definition of the
package annotation DB.

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

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

\code{hom.Rn.inp\_dbschema}: none (invisible \code{NULL}).

\code{hom.Rn.inp\_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 "metadata" table:
  dbGetQuery(hom.Rn.inp_dbconn(), "SELECT COUNT(*) FROM metadata")

  ## The connection object returned by hom.Rn.inp_dbconn() was created with:
  dbConnect(SQLite(), dbname=hom.Rn.inp_dbfile(), cache_size=64000, synchronous=0)

  hom.Rn.inp_dbschema()

  hom.Rn.inp_dbInfo()
\end{ExampleCode}
\end{Examples}

