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, passwordHost-information and user-credentials
Execute()Execute a command
BasexClient$Execute(command)
commandCommand
For a list of database commands see http://docs.basex.org/wiki/Commands
Query()Create a new query-object
BasexClient$Query(query)
queryQuery-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)
pathPath
inputFile, directory or XML-string
Create()Create a new database
BasexClient$Create(name, input)
nameName
inputInitial content, Optional
Initial content can be offered as string, URL or file.
Replace()Replace resource, adressed by path
BasexClient$Replace(path, input)
pathPath
inputFile, directory or XML-string
Store()Store binary content
BasexClient$Store(path, input)
pathPath
inputFile, 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)
socketSocket-ID
str_receive()Read a string from a stream
BasexClient$str_receive(input, output, bin = FALSE)
input, outputInput- and output-stream
binBoolean; 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)
deepWhether to make a deep clone.