Return the result of an SQl query given as R-like representation
gmRead translates the R representation
expr of an SQL query into SQL and evaluates it in the database
- R expression of an SQL query. Expressions created with
gmExprcan be used as well.
- defines the environment used for evaluation of
- The quoted version of such an expression.
- The selection statement in R representation.
- defines the number of lines returned in the query.
- defines the database, on which the query will be run.
- The gmVarID in the gmDatabase of gmName for later referencing of an object by its name in the gmDatabase.
gmRead is the principal function of the gmDatabase package. It provides the main functionality: Receiving an R expression
expr of an SQL query, it returns a dataframe, containing the requested data. On the other hand,
gmReadInternal, indicated by its notation, is meant for in-package use only. During the execution of
gmRead it creates a call containing the R representation, which is used later in
gmSQL to create and run a proper SQL query against the database.
gmReada dataframe is returned. It contains the requested data. For
gmReadInternala call is returned, consisting of an expression to be interpreted as the R representation of SQL by
gmSQL. Furthermore a list of the asked variables in
EXPRand the columns, where to look in the database tables are returned, too.
## Not run: # .gmDB <- dbConnect(...) # root <- "root" # erg <- gmRead(root) # ## returns the ID of root in the database # # gmRead(root$project[gmTitle=group]) # ## groups # ## End(Not run)