A function that uses the parallel package to execute a SQL statement in a separate process.
1 2 | dbGetQueryForkExec(dbConnectionFun, dbConnectionArgs, statement,
async = FALSE)
|
dbConnectionFun |
The function to be called to instantiate a database connection |
dbConnectionArgs |
The values of the parameters (in a named list) to be passed to dbConnectionFun to instantiate a connection |
statement |
The SQL statement to be executed |
async |
If FALSE, then the function blocks and waits for the subprocess to complete, and returns the result of the query. If TRUE, the function asyncronously returns an object of the class parallelJob that can be used to collect the results via parallel::mccollect |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.