gmClass: Returning information from geometallurgicala database

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Get information on given object or variable from the database.

Usage

1
2
3
gmClass(expr, var, envir=parent.frame(), EXPR=substitute(expr),db=getOption("gmDB"))
gmClassMembers(expr, var, envir=parent.frame(), EXPR=substitute(expr),
                db=getOption("gmDB"))

Arguments

expr

R expression of an SQL query. Expressions created with gmExpr can be used as well.

var

a number or variable name specifying a variable.

envir

defines the environment used for evaluation of expr

EXPR

The quoted version of such an expression.

db

defines the database, on which the query will be run.

Details

If you want information on a special variable in the database, specify var. You may use its variable id or the variable name. If var is missing information on the object(s) specified by expr is retrieved.

gmClass gives information on the variable itself or the variable the object is. gmClassMembers shows information about all possible members of a variable or the variable the object is.

Value

gmClass returns a data frame containing the id, gmVarID, gmVarTypeID, gmVarName, and gmVarDescription of the desired variable or object. If the object is not distinct, then information for every object retrieved. gmClassMembers returns a data frame containing the gmVarID and gmVarName of this all of the possible given members of variable respectively object. required is a boolean stating if the member is mandatory or not, definer states the variable, where this member is defined. If it is not inheritated, then the variable itself is given.

Author(s)

K. Gerald van den Boogaart, S. Matos Camacho

See Also

gmGet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
.gmDB <- dbConnect(...)
root <- "root"
gmClass(root)
## returns information on the root in the database

gmClass(root$project)
## returns information on every project in root in the database

gmClass(var="project")
## returns information on the variable/class project

gmClass(var=2)
## returns information on the variable with variable id 2

## End(Not run)

gmDatabase documentation built on May 2, 2019, 9:31 a.m.