Learn R Programming

RObsDat (version 16.03)

reload: Internal functions: helping to do things

Description

The following methods are used internally:

Reload is used to recompile and reload the package during development.

Todo is used to indicate unfinished implementations. options(verbose.todos = TRUE) can be used to determine if the corresponding text is printed.

run.query is used to run queries. In addition, the query string is printed if options(verbose.queries=TRUE) is set.

run.sql.script reads an SQL script from a text file and executes all the commands.

sqlnow returns a database engine specific term to obtain the current time and date.

sv and svk are used to return the correct element from a vector to be entered in a database query. The commands take care to give useful result also for vectors that are NULL and NA-entries in a vector. svk must be used if the database column has to meet a foreign key relation ship. In this case, the appropriate key is returned.

Usage

reload() run.query(object, query) run.sql.script(con, script.file) sqlstatements(object, term) sv(the.vect, rownum) svk(the.vect, tablename, rownum, object) todo(text)

Arguments

con
Connection returned by dbConnect

query
Query string to be executed
script.file
Location (path) of the SQL script to be run.
object
ODM handler object returned by new("ODM1_1") or new("ODM1_1Ver").
term
Internal function. SQL statement to be translated in the appropriate SQL-dialect.
tablename
Name of the table defining the foreign key.
the.vect
Vector from which to return the correct element.
rownum
Element to be returned from vector.
text
String describing what is missing in the implementation.

Value

See code for return values.

Details

See code for details.

Examples

Run this code
# see code for examples

Run the code above in your browser using DataLab