powered by
Create a database.
db_create(cushion, dbname, delifexists = FALSE, as = "list", ...)
A Cushion object. Required.
Cushion
Database name
If TRUE, delete any database of the same name before creating it. This is useful for testing. Default: FALSE
TRUE
FALSE
(character) One of list (default) or json
Curl args passed on to HttpClient
HttpClient
JSON as a character string or a list (determined by the as parameter)
as
# NOT RUN { (x <- Cushion$new()) if ("leothelion" %in% db_list(x)) { invisible(db_delete(x, dbname="leothelion")) } db_create(x, dbname='leothelion') ## see if its there now db_list(x) # }
Run the code above in your browser using DataLab