gmDatabase (version 0.5.0)

gmRemove: Delete objects in an geometallurgical database

Description

Deletes the specified object in an geometallurgical database.

Usage

gmRemove(expr, which=NULL, var=NULL, EXPR=substitute(expr), WHICH=substitute(which), envir=parent.frame(), db=getOption("gmDB"))

Arguments

expr
R expression of an SQL query. Expressions created with gmExpr and an ID in the database can be used as well.
which
Specifies for a set variable, which entry shall be deleted.
var
Defines the attributes, that shall be deleted.
EXPR
The quoted version of such an expression.
WHICH
The quoted version of which.
envir
defines the environment used for evaluation of expr.
db
The connection to the database.

Value

No value.

Details

gmRemove deletes the specified object in a geometallurgical database. This may include the removal of all its members, too.

If you only want to remove a certain attribute for an object, than use the argument var for specifying. In the case of this attribute being an object itself but not a value, you may have more than one entry to choose for deleting. Therefor choose the right one by stating an id or an gmExpr in the which argument.

See Also

gmRead, gmExpr

Examples

Run this code
## Not run: 
# gmRemove(4545)
# gmRemove(root$project[gmTitle=="Project X"])
# gmRemove(root$gmUserGroup, root$gmUser[gmUserName=="userXY"], var="gmUser")
# gmRemove(root$project[gmTitle=="Project X"], var="gmTitle"))
# ## End(Not run)

Run the code above in your browser using DataLab