SystemRequest

class borneo.SystemRequest[source]

Bases: Request

On-premise only.

SystemRequest is an on-premise-only request used to perform any table-independent administrative operation such as create/drop of namespaces and security-relevant operations (create/drop users and roles). These operations are asynchronous and completion needs to be checked.

Examples of statements used in this object include:

CREATE NAMESPACE mynamespace

CREATE USER some_user IDENTIFIED BY password

CREATE ROLE some_role

GRANT ROLE some_role TO USER some_user

Execution of operations specified by this request is implicitly asynchronous. These are potentially long-running operations. NoSQLHandle.system_request() returns a SystemResult instance that can be used to poll until the operation succeeds or fails.

Methods Summary

get_statement()

Returns the statement, or None if not set.

get_timeout()

Returns the timeout to use for the operation, in milliseconds.

set_statement(statement)

Sets the statement to use for the operation.

set_timeout(timeout_ms)

Sets the request timeout value, in milliseconds.

Methods Documentation

get_statement()[source]

Returns the statement, or None if not set.

Returns:

the statement.

Return type:

str

get_timeout()[source]

Returns the timeout to use for the operation, in milliseconds. A value of 0 indicates that the timeout has not been set.

Returns:

the timeout value.

Return type:

int

set_statement(statement)[source]

Sets the statement to use for the operation.

Parameters:

statement (str) – the statement. This is a required parameter.

Returns:

self.

Raises:

IllegalArgumentException – raises the exception if statement is not a string.

set_timeout(timeout_ms)[source]

Sets the request timeout value, in milliseconds. This overrides any default value set in NoSQLHandleConfig. The value must be positive.

Parameters:

timeout_ms (int) – the timeout value, in milliseconds.

Returns:

self.

Raises:

IllegalArgumentException – raises the exception if the timeout value is less than or equal to 0.