Standard Mode

In the standard mode of the Clients, a database command can be sent to the server using the  function of the. This functions returns the whole result. With the  function, you can request some information on your executed process. If an error occurs, an exception with the error message will be thrown.

Usage
The standard execution works as follows:


 * 1) Create a new session instance with hostname, port, username and password.
 * 2) Call the   function of the session with the database commands as argument.
 * 3) Receive the result of a successfully executed command. If an error occurs, an exception is thrown.
 * 4) Optionally, call   to get some process information
 * 5) Continue using the client (back to 2.), or close the session.

Example in PHP
Taken from our repository:

 execute("xquery 1 to 10");

// close session $session->close;

// print time needed $time = (microtime(true) - $start) * 1000; print "\n$time ms\n";

} catch (Exception $e) { // print exception print $e->getMessage; } ?>