sjdbcOptions
Package Options and Defaults
Description
Stores presistent options and defaults for sjdbc package functions.
Usage
sjdbcOptions(...)
Arguments
... | you can provide no arguments. You can provide a list or vector of character strings
as the only argument, or you can provide arguments in name=value form.
See the VALUE and SIDE EFFECTS sections for more information. |
Value
The
sjdbcOptions function always returns a list, even if the list is of length 1.
- if no arguments are given, returns a list of current values for all options.
- if a character vector is given as the only argument, returns a list of current values
for the options named in the character vector.
- if an object of mode "list" is given as the only argument,
its components become the values for options with the corresponding names. The function returns a list of the
option values before they were modified. Usually, the list given as an argument is the return value
of a previous call to sjdbcOptions.
- if arguments are given in name=value form, sjdbcOptions changes the values of the
specified options and returns a list of the option values before they were modified.
Side Effects
When options are set, the sjdbcOptions function changes a list named .sjdbcOptions in the session
frame (frame 0). The components of .sjdbcOptions are all of the currently defined options.
If sjdbcOptions is called with either a list as the single argument or with one or more arguments
in name=value form, the options specified are changed or created.
Supported Options
| driverClass | a string containing the name of the Java class for the required JDBC driver. |
| con | the JDBC connection string. |
| user | a string specifying the user name with access to database. Note: Some drivers do not require this option. |
| password | a string containing the password for the given user name on the database. Note: Some drivers do not require this option. |
| keepAlive | a logical. if TRUE, keeps the database connection alive after executing the query. Defaults to FALSE. |
| batchSize | an integer containing the number of rows exported per batch in exportJDBC. Defaults to 1000. |
| useTransaction | export data as a single transaction. Defaults to TRUE. |
|
See Also
This function closely mimics the behavior of the options function in base Spotfire Enterprise Runtime for R.
Examples
# set a single option
sjdbcOptions(driverClass="COM.ibm.db2.jdbc.net.DB2Driver")
# set multiple options
sjdbcOptions(driverClass="COM.ibm.db2.jdbc.net.DB2Driver",
con="jdbc:db2://qadb1:6789/QATESTDB",
user="testqa",
password="testqa")