Learn R Programming

RBaseX (version 1.1.2)

Store: Store

Description

Stores a binary resource in the opened database.

Usage

Store(session, path, input)

Value

A list with two items

  • info Aditional info

  • success A boolean, indicating if the command was completed successfull

Arguments

session

BasexClient instance-ID

path

Path where to store the data

input

Additional input, may be empty

Details

The 'Store' command is deprecated and has been renamed to 'putBinary'. 'Store' is being kept as convenience.

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.

Examples

Run this code
if (FALSE) {
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 <- Store(Session, "test.bin", bais)
print(test$success)
baos <- Execute(Session, "binary get test.bin")
print(bais)
print(baos$result)
}

Run the code above in your browser using DataLab