-
Notifications
You must be signed in to change notification settings - Fork 53
Development Guide
Here is a simple guide for developing wrapper functions of MADlib.
-
Useful Utility Functions in PivotalR
cbinddb.arraydb.data.frameas.db.data.frameconn.idnamesdeletecontentconn.eqlas.factoreql -
Useful Internal Utility Functions in PivotalR
Call a hidden function from command line for testing.db.getQuery.load.func.suppress.warnings.restore.warnings.check.madlib.version.get.params.get.res.is.conn.id.valid.unique.string.strip.get.dbms.str.madlib.version.number -
Check whether an object belongs to a classGet the command call as a string
PivotalR:::.unique.string()
Execute the query string in connection conn.id, returns a data.frame,
which is the result of the SQL query. The function .get.params is
preferred than this one. One should use .get.res function instead.
Load a SQL function definition from inst/sql/
Suppress all warnings, returns the original warning levels
Restore the original levels
When MADlib version is smaller than allowed.version, raise an error
Analyze a formula and get the dependent, independent and grouping
variables. Do pivoting if factor column is specified. Create
intermediate table for db.Rquery and db.view objects.
stop("We have ",
"an error at line ", 365, "!")
cat("We have ",
"a string here ", 365, sep = "")
paste("We have", "something at", 365)
paste("We have ", "something at ", 365, sep="")
paste0("We have ", "something at ", 365)
a <- c(1,2,3)
paste(a, "is a", collapse=" + ", sep="")
res <- try(.db.getQuery(sql, conn.id(x)), silent = TRUE)
if (is(res, .err.class))
stop("Could not do the summary!")
.get.res already has exception handling built in.
class(rst) <- "arima.css.madlib"
is(x, "db.Rquery")
is(res, .err.class)
is(res, "data.frame")
call <- deparse(math.call())
if (missing(j)) {
stop("Error")
}