Changes

Jump to navigation Jump to search
486 bytes removed ,  17:28, 25 May 2012
no edit summary
| valign='top' | '''Summary'''
|This function establishes a connection to a remote BaseX server and creates a new client session. As a result, a session id is returned. The parameter <code>$host</code> is the name of the database server, <code>$host</code> specifies the database host, and <code>$user</code> and <code>$password</code> represent the login data.
|-
| valign='top' | '''Errors'''
|<b>BXCL0001</b> is raised if a connection error occurs (e.g., if the addressed server is not available).
|}
| valign='top' | '''Summary'''
| This function executes a database command and returns the result as string. The parameter <code>$id</code> contains the session id returned by [[Client Module#client:connect|client:connect()]]. The <code>$command</code> represents the database command string, which will be executed by the server.
|-
| valign='top' | '''Errors'''
|<b>BXCL0002</b> is raised if the specified session id is unknown.<br/><b>BXCL0003</b> is raised if an error occurs while executing the command.<br/>
|-
| valign='top' | '''Examples'''
| valign='top' | '''Summary'''
| This function evaluates a query and returns the result as sequence. The parameter <code>$id</code> contains the session id returned by [[Client Module#client:connect|client:connect()]], and <code>$query</code> represents the queru string, which will be evaluated by the server.
|-
| valign='top' | '''Errors'''
|<b>BXCL0002</b> is raised if the specified session id is unknown.<br/><b>BXCL0003</b> is raised if an error occurs while evaluating the query.<br/>
|-
| valign='top' | '''Examples'''
| valign='top' | '''Summary'''
| This function closes a client session. <code>$id</code> specifies the session id.
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#SQL Functions Errors|FOSQ0001]]</b> is raised if an SQL exception occurs.<br/ >
<b>[[XQuery Errors#SQL Functions Errors|FOSQ0002]]</b> is raised if a wrong connection handle is passed.<br/ >
|}
 
=Errors=
 
* <b>BXCL0001</b> is raised if a connection error occurs (e.g., if the addressed server is not available).
* <b>BXCL0002</b> is raised if the specified session id is unknown.
* <b>BXCL0003</b> is raised if an error occurs while executing the command.
=Changelog=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu