putBinary | R Documentation |
Store or replace a binary resource in the opened database.
putBinary(session, path, input)
session |
BasexClient instance-ID |
path |
Path where to store the data |
input |
Additional input, may be empty |
Use the database-command retrieve to retrieve the resource. The input can be a UTF-8 encoded XML document, a binary resource, or any other data (such as JSON or CSV) that can be successfully converted to a resource by the server. This method returns self invisibly, thus making it possible to chain together multiple method calls.
A list with two items
info Aditional info
success A boolean, indicating if the command was completed successfull
## Not run: Execute(Session, "DROP DB BinBase") testBin <- Execute(Session, "Check BinBase") bais <- raw() for (b in 252:255) bais <- c(bais, c(b)) %>% as.raw() test <- putBinary(Session, "test.bin", bais) print(test$success) baos <- Execute(Session, "BINARY GET test.bin") print(bais) print(baos$result) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.