The client can be used in 'standard' mode and in 'query' mode. Standard Mode is used for connecting to a server and sending commands.
new()
Initialize a new client-session
BasexClient$new(host, port = 1984L, username, password)
host, port, username, password
Host-information and user-credentials
Execute()
Execute a command
BasexClient$Execute(command)
command
Command
For a list of database commands see http://docs.basex.org/wiki/Commands
Query()
Create a new query-object
BasexClient$Query(query)
query
Query-string
A query-object has two fields. 'queryObject' is an ID for the new created 'QueryClass'-instance. 'success' holds the status from the last executed operation on the queryObject.
ID for the created query-object
Add()
Add a new resouce at the specified path
BasexClient$Add(path, input)
path
Path
input
File, directory or XML-string
Create()
Create a new database
BasexClient$Create(name, input)
name
Name
input
Initial content, Optional
Initial content can be offered as string, URL or file.
Replace()
Replace resource, adressed by path
BasexClient$Replace(path, input)
path
Path
input
File, directory or XML-string
Store()
Store binary content
BasexClient$Store(path, input)
path
Path
input
File, directory or XML-string
Binary content can be retrieved by executing a retrieve-command
bool_test_sock()
Return a boolean that indicates the result from the last action on the socket
BasexClient$bool_test_sock(socket)
socket
Socket-ID
str_receive()
Read a string from a stream
BasexClient$str_receive(input, output, bin = FALSE)
input, output
Input- and output-stream
bin
Boolean; TRUE when str_receive has to retrieve binary data
This method is not intented to be called direct. Due to the lack of a 'protected' classifier for R6, this is a 'public' method
getSocket()
Get socket-ID
BasexClient$getSocket()
clone()
The objects of this class are cloneable with this method.
BasexClient$clone(deep = FALSE)
deep
Whether to make a deep clone.