Learn R Programming

RBaseX (version 0.1.4)

BasexClient: BasexClient

Description

The client can be used in 'standard' mode and in 'query' mode. Standard Mode is used for connecting to a server and sending commands.

Arguments

Methods

Public methods

Method new()

Initialize a new client-session

Usage

BasexClient$new(host, port = 1984L, username, password)

Arguments

host, port, username, password

Host-information and user-credentials

Method Execute()

Execute a command

Usage

BasexClient$Execute(command)

Arguments

command

Command

Details

For a list of database commands see http://docs.basex.org/wiki/Commands

Method Query()

Create a new query-object

Usage

BasexClient$Query(query)

Arguments

query

Query-string

Details

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.

Returns

ID for the created query-object

Method Add()

Add a new resouce at the specified path

Usage

BasexClient$Add(path, input)

Arguments

path

Path

input

File, directory or XML-string

Method Create()

Create a new database

Usage

BasexClient$Create(name, input)

Arguments

name

Name

input

Initial content, Optional

Details

Initial content can be offered as string, URL or file.

Method Replace()

Replace resource, adressed by path

Usage

BasexClient$Replace(path, input)

Arguments

path

Path

input

File, directory or XML-string

Method Store()

Store binary content

Usage

BasexClient$Store(path, input)

Arguments

path

Path

input

File, directory or XML-string

Details

Binary content can be retrieved by executing a retrieve-command

Method bool_test_sock()

Return a boolean that indicates the result from the last action on the socket

Usage

BasexClient$bool_test_sock(socket)

Arguments

socket

Socket-ID

Method str_receive()

Read a string from a stream

Usage

BasexClient$str_receive(input, output, bin = FALSE)

Arguments

input, output

Input- and output-stream

bin

Boolean; TRUE when str_receive has to retrieve binary data

Details

This method is not intented to be called direct. Due to the lack of a 'protected' classifier for R6, this is a 'public' method

Method getSocket()

Get socket-ID

Usage

BasexClient$getSocket()

Method clone()

The objects of this class are cloneable with this method.

Usage

BasexClient$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.