Re-jigged the class implementation to get better support from roxygen2 and CRAN check(). Majority of public functions are documented (remaining are the CRUD functions)
This commit is contained in:
30
man/DBClient-cash-collectGeometries.Rd
Normal file
30
man/DBClient-cash-collectGeometries.Rd
Normal file
@@ -0,0 +1,30 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-dbCollect.R
|
||||
\name{DBClient$collectGeometries}
|
||||
\alias{DBClient$collectGeometries}
|
||||
\title{DBClient$collectGeometries}
|
||||
\arguments{
|
||||
\item{qry}{\if{html}{\out{<complex>}} The query to collect}
|
||||
|
||||
\item{geometry_cols}{\if{html}{\out{<character>}} Any geometry columns to translate to sf}
|
||||
|
||||
\item{geometry_crs}{\if{html}{\out{<complex>}} The CRS to assign to the columns. Either
|
||||
specified by the CRS number or an sf::st_crs() object.}
|
||||
|
||||
\item{check_ring_dir}{\if{html}{\out{<logical>}} Check the direction of rings during the
|
||||
translation. See \code{sf::st_as_sfc} for further details.}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<complex>}} The collected query with translated geometry columns
|
||||
}
|
||||
\description{
|
||||
Requires sf package.
|
||||
|
||||
Runs dplyr::collect on a query, If there are gemoetry columns (specified by
|
||||
gemoetry_cols or named geom or named proj) then they are translated into sf
|
||||
geometry columns using sf::st_as_sfc with a CRS.
|
||||
|
||||
The default CRS for a column named \code{geom} is 4326.
|
||||
The default CRS for a column named \code{proj} is 3035.
|
||||
The default CRS for other geometry columns is specified by \code{geometry_crs}
|
||||
}
|
||||
18
man/DBClient-cash-collectOrReturn.Rd
Normal file
18
man/DBClient-cash-collectOrReturn.Rd
Normal file
@@ -0,0 +1,18 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-dbCollect.R
|
||||
\name{DBClient$collectOrReturn}
|
||||
\alias{DBClient$collectOrReturn}
|
||||
\title{DBClient$collectOrReturn}
|
||||
\arguments{
|
||||
\item{qry}{\if{html}{\out{<character>}} A dplyr query}
|
||||
|
||||
\item{collect}{\if{html}{\out{<logical>}} Collect the query. Defaults to checking parent frame
|
||||
for the parameter value}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<complex>}} The query, optionally collect'd
|
||||
}
|
||||
\description{
|
||||
Utility method which returns the query and optionally runs dplyr::collect on
|
||||
it first.
|
||||
}
|
||||
14
man/DBClient-cash-dbAction.Rd
Normal file
14
man/DBClient-cash-dbAction.Rd
Normal file
@@ -0,0 +1,14 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-dbAction.R
|
||||
\name{DBClient$dbAction}
|
||||
\alias{DBClient$dbAction}
|
||||
\title{DBClient$dbAction}
|
||||
\arguments{
|
||||
\item{statement}{\if{html}{\out{<character>}} Statement to run}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<logical>}} TRUE if the execution was successful, FALSE if not
|
||||
}
|
||||
\description{
|
||||
Executes a query/statement on a database which has no result
|
||||
}
|
||||
14
man/DBClient-cash-dbQuery.Rd
Normal file
14
man/DBClient-cash-dbQuery.Rd
Normal file
@@ -0,0 +1,14 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-dbQuery.R
|
||||
\name{DBClient$dbQuery}
|
||||
\alias{DBClient$dbQuery}
|
||||
\title{DBClient$dbQuery}
|
||||
\arguments{
|
||||
\item{statement}{\if{html}{\out{<character>}} Query to run on the database}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<complex>}} A lazy data table with the results from the query
|
||||
}
|
||||
\description{
|
||||
Runs a query (statement) on a database and returns the results
|
||||
}
|
||||
16
man/DBClient-cash-dplyrWithSchema.Rd
Normal file
16
man/DBClient-cash-dplyrWithSchema.Rd
Normal file
@@ -0,0 +1,16 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-dbSchema.R
|
||||
\name{DBClient$dplyrWithSchema}
|
||||
\alias{DBClient$dplyrWithSchema}
|
||||
\title{DBClient$dplyrWithSchema}
|
||||
\arguments{
|
||||
\item{table_name}{\if{html}{\out{<character>}} Table name to prefix schema to}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<character>}} Table name with prefixed schema
|
||||
}
|
||||
\description{
|
||||
Prefixes schema to the table name, if set in the configuration. Specifically
|
||||
uses the dbplyr::in_schema method rather than the direct
|
||||
DBI::dbQuoteIdentifier method.
|
||||
}
|
||||
8
man/DBClient-cash-getConnection.Rd
Normal file
8
man/DBClient-cash-getConnection.Rd
Normal file
@@ -0,0 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-Initialize.R
|
||||
\name{DBClient$getConnection}
|
||||
\alias{DBClient$getConnection}
|
||||
\title{DBClient$getConnection}
|
||||
\description{
|
||||
Returns the DBConnection instance for this client
|
||||
}
|
||||
11
man/DBClient-cash-initialize.Rd
Normal file
11
man/DBClient-cash-initialize.Rd
Normal file
@@ -0,0 +1,11 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-Initialize.R
|
||||
\name{DBClient$initialize}
|
||||
\alias{DBClient$initialize}
|
||||
\title{DBClient$initialize}
|
||||
\arguments{
|
||||
\item{conn}{\if{html}{\out{<DBConnection>}} An instance of DBConnection}
|
||||
}
|
||||
\description{
|
||||
Initalises the DBClient instance with a DBConnection
|
||||
}
|
||||
14
man/DBClient-cash-table.Rd
Normal file
14
man/DBClient-cash-table.Rd
Normal file
@@ -0,0 +1,14 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-dbTable.R
|
||||
\name{DBClient$table}
|
||||
\alias{DBClient$table}
|
||||
\title{DBClient$table}
|
||||
\arguments{
|
||||
\item{table_name}{\if{html}{\out{<character>}} The database table name}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<complex>}} A dplyr::tbl instance
|
||||
}
|
||||
\description{
|
||||
Creates a \code{dplyr::tbl} instantiation with the current database connection.
|
||||
}
|
||||
14
man/DBClient-cash-withSchema.Rd
Normal file
14
man/DBClient-cash-withSchema.Rd
Normal file
@@ -0,0 +1,14 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-dbSchema.R
|
||||
\name{DBClient$withSchema}
|
||||
\alias{DBClient$withSchema}
|
||||
\title{DBClient$withSchema}
|
||||
\arguments{
|
||||
\item{table_name}{\if{html}{\out{<character>}} Table name to prefix schema to}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<character>}} Table name with prefixed schema
|
||||
}
|
||||
\description{
|
||||
Prefixes schema to the table name, if set in the configuration.
|
||||
}
|
||||
14
man/DBClient-cash-withTransaction.Rd
Normal file
14
man/DBClient-cash-withTransaction.Rd
Normal file
@@ -0,0 +1,14 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBClient-dbTransaction.R
|
||||
\name{DBClient$withTransaction}
|
||||
\alias{DBClient$withTransaction}
|
||||
\title{DBClient$withTransaction}
|
||||
\arguments{
|
||||
\item{expr}{\if{html}{\out{<expression>}} Expression to run in a transaction}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<logical>}} TRUE if transaction was successful
|
||||
}
|
||||
\description{
|
||||
Runs a given expression within a database transaction.
|
||||
}
|
||||
15
man/DBConnection-cash-beginTransaction.Rd
Normal file
15
man/DBConnection-cash-beginTransaction.Rd
Normal file
@@ -0,0 +1,15 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Transaction.R
|
||||
\name{DBConnection$beginTransaction}
|
||||
\alias{DBConnection$beginTransaction}
|
||||
\title{DBConnection$beginTransaction}
|
||||
\arguments{
|
||||
\item{session}{\if{html}{\out{<complex>}} The R Shiny session to register the callback with}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<function>}} A function to cancel the onSessionEnded callback
|
||||
}
|
||||
\description{
|
||||
Registers a callback with an R Shiny session so that the connection is
|
||||
disconnected once the session ends.
|
||||
}
|
||||
18
man/DBConnection-cash-commitTransaction.Rd
Normal file
18
man/DBConnection-cash-commitTransaction.Rd
Normal file
@@ -0,0 +1,18 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Transaction.R
|
||||
\name{DBConnection$commitTransaction}
|
||||
\alias{DBConnection$commitTransaction}
|
||||
\title{DBConnection$commitTransaction}
|
||||
\arguments{
|
||||
\item{quietly}{\if{html}{\out{<logical>}} If there is no transaction, will cause a \code{stop()}
|
||||
if TRUE}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<function>}} A function to cancel the onSessionEnded callback
|
||||
}
|
||||
\description{
|
||||
Commits the current database transaction. If nested, will not actually commit
|
||||
until the last level is committed.
|
||||
|
||||
If \code{rollbackTransaction()}
|
||||
}
|
||||
18
man/DBConnection-cash-configure.Rd
Normal file
18
man/DBConnection-cash-configure.Rd
Normal file
@@ -0,0 +1,18 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Configure.R
|
||||
\name{DBConnection$configure}
|
||||
\alias{DBConnection$configure}
|
||||
\title{DBConnection$configure}
|
||||
\arguments{
|
||||
\item{...}{Named parameters for configuring the connection or a name list of
|
||||
parameters}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<list>}} The configuration that has loaded
|
||||
}
|
||||
\description{
|
||||
Configures the DBClient instance.
|
||||
|
||||
There are 2 options for configuration, either: pass in a named list; or use
|
||||
named parameters.
|
||||
}
|
||||
12
man/DBConnection-cash-connect.Rd
Normal file
12
man/DBConnection-cash-connect.Rd
Normal file
@@ -0,0 +1,12 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Connect.R
|
||||
\name{DBConnection$connect}
|
||||
\alias{DBConnection$connect}
|
||||
\title{DBConnection$connect}
|
||||
\value{
|
||||
\if{html}{\out{<logical>}} TRUE if connection was success, FALSE if it failed
|
||||
}
|
||||
\description{
|
||||
Attempts to connect to the database. If not already configured, will first
|
||||
attempt to load the configuration.
|
||||
}
|
||||
8
man/DBConnection-cash-disconnect.Rd
Normal file
8
man/DBConnection-cash-disconnect.Rd
Normal file
@@ -0,0 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Connect.R
|
||||
\name{DBConnection$disconnect}
|
||||
\alias{DBConnection$disconnect}
|
||||
\title{DBConnection$disconnect}
|
||||
\description{
|
||||
Disconnects the current database connection, if connected.
|
||||
}
|
||||
15
man/DBConnection-cash-disconnectOnSessionEnd.Rd
Normal file
15
man/DBConnection-cash-disconnectOnSessionEnd.Rd
Normal file
@@ -0,0 +1,15 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Connect.R
|
||||
\name{DBConnection$disconnectOnSessionEnd}
|
||||
\alias{DBConnection$disconnectOnSessionEnd}
|
||||
\title{DBConnection$disconnectOnSessionEnd}
|
||||
\arguments{
|
||||
\item{session}{\if{html}{\out{<complex>}} The R Shiny session to register the callback with}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<function>}} A function to cancel the onSessionEnded callback
|
||||
}
|
||||
\description{
|
||||
Registers a callback with an R Shiny session so that the connection is
|
||||
disconnected once the session ends.
|
||||
}
|
||||
11
man/DBConnection-cash-getConfiguration.Rd
Normal file
11
man/DBConnection-cash-getConfiguration.Rd
Normal file
@@ -0,0 +1,11 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Configure.R
|
||||
\name{DBConnection$getConfiguration}
|
||||
\alias{DBConnection$getConfiguration}
|
||||
\title{DBConnection$getConfiguration}
|
||||
\value{
|
||||
\if{html}{\out{<list>}} Current configuration. If not configured, NULL is returned
|
||||
}
|
||||
\description{
|
||||
Get the current configuration of the DBClient instance.
|
||||
}
|
||||
14
man/DBConnection-cash-getConnection.Rd
Normal file
14
man/DBConnection-cash-getConnection.Rd
Normal file
@@ -0,0 +1,14 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Connect.R
|
||||
\name{DBConnection$getConnection}
|
||||
\alias{DBConnection$getConnection}
|
||||
\title{DBConnection$getConnection}
|
||||
\arguments{
|
||||
\item{do_connect}{\if{html}{\out{<logical>}} Forcibly connect if not already connected}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<DBConnection>}} DBConnection instance
|
||||
}
|
||||
\description{
|
||||
Returns the DBConnection instance for this client.
|
||||
}
|
||||
8
man/DBConnection-cash-getToken.Rd
Normal file
8
man/DBConnection-cash-getToken.Rd
Normal file
@@ -0,0 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Initialize.R
|
||||
\name{DBConnection$getToken}
|
||||
\alias{DBConnection$getToken}
|
||||
\title{DBConnection$getToken}
|
||||
\description{
|
||||
Returns the identity token for this DBConnection instance.
|
||||
}
|
||||
8
man/DBConnection-cash-initialize.Rd
Normal file
8
man/DBConnection-cash-initialize.Rd
Normal file
@@ -0,0 +1,8 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Initialize.R
|
||||
\name{DBConnection$initialize}
|
||||
\alias{DBConnection$initialize}
|
||||
\title{DBConnection$initialize}
|
||||
\description{
|
||||
Initalises the DBConnection instance with an identity token.
|
||||
}
|
||||
11
man/DBConnection-cash-isConnected.Rd
Normal file
11
man/DBConnection-cash-isConnected.Rd
Normal file
@@ -0,0 +1,11 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Connect.R
|
||||
\name{DBConnection$isConnected}
|
||||
\alias{DBConnection$isConnected}
|
||||
\title{DBConnection$isConnected}
|
||||
\value{
|
||||
\if{html}{\out{<logical>}} TRUE if connected to the database, FALSE otherwise
|
||||
}
|
||||
\description{
|
||||
Indicates if the instance has an active database connection.
|
||||
}
|
||||
14
man/DBConnection-cash-loadConfiguration.Rd
Normal file
14
man/DBConnection-cash-loadConfiguration.Rd
Normal file
@@ -0,0 +1,14 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Configure.R
|
||||
\name{DBConnection$loadConfiguration}
|
||||
\alias{DBConnection$loadConfiguration}
|
||||
\title{DBConnection$loadConfiguration}
|
||||
\arguments{
|
||||
\item{warn}{Emit a warning with which file it attempting to be loaded}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<logical>}} TRUE if configuration was successful, FALSE otherwise
|
||||
}
|
||||
\description{
|
||||
Attempts to load the configuration either from global.R or .env.R.
|
||||
}
|
||||
15
man/DBConnection-cash-rollbackTransaction.Rd
Normal file
15
man/DBConnection-cash-rollbackTransaction.Rd
Normal file
@@ -0,0 +1,15 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Transaction.R
|
||||
\name{DBConnection$rollbackTransaction}
|
||||
\alias{DBConnection$rollbackTransaction}
|
||||
\title{DBConnection$rollbackTransaction}
|
||||
\arguments{
|
||||
\item{session}{\if{html}{\out{<complex>}} The R Shiny session to register the callback with}
|
||||
}
|
||||
\value{
|
||||
\if{html}{\out{<function>}} A function to cancel the onSessionEnded callback
|
||||
}
|
||||
\description{
|
||||
Registers a callback with an R Shiny session so that the connection is
|
||||
disconnected once the session ends.
|
||||
}
|
||||
@@ -4,5 +4,5 @@
|
||||
\alias{DBConnection}
|
||||
\title{DBConnection}
|
||||
\description{
|
||||
Database Connection class
|
||||
Database Connection class.
|
||||
}
|
||||
|
||||
44
man/dot-configureDefault.Rd
Normal file
44
man/dot-configureDefault.Rd
Normal file
@@ -0,0 +1,44 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/DBConnection-Configure.R
|
||||
\name{.configureDefault}
|
||||
\alias{.configureDefault}
|
||||
\title{Configures the DBClient instance.}
|
||||
\usage{
|
||||
.configureDefault(
|
||||
host,
|
||||
port,
|
||||
user,
|
||||
password,
|
||||
dbname,
|
||||
engine = NULL,
|
||||
name = NULL,
|
||||
schema = NULL,
|
||||
autoconnect = NULL
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{host}{The database host}
|
||||
|
||||
\item{port}{The database port}
|
||||
|
||||
\item{user}{The database user to connect with}
|
||||
|
||||
\item{password}{The database password to connect with}
|
||||
|
||||
\item{dbname}{The database to use}
|
||||
|
||||
\item{engine}{The database engine (mysql, postgres) as supported by DBI}
|
||||
|
||||
\item{name}{The database to use (alternative to dbname)}
|
||||
|
||||
\item{schema}{The database schema to use (postgres)}
|
||||
|
||||
\item{autoconnect}{Autoconnect to the database if not already connected}
|
||||
}
|
||||
\value{
|
||||
The configuration accepted
|
||||
}
|
||||
\description{
|
||||
There are 2 options for configuration, either: pass in a named list; or use
|
||||
named parameters.
|
||||
}
|
||||
Reference in New Issue
Block a user