Changes

Jump to navigation Jump to search
75 bytes removed ,  00:42, 26 May 2012
m
Text replace - "| valign='top' | " to "| "
|<code><b>client:execute</b>($id as xs:anyURI, $command as xs:string) as xs:string</code>
|-
| 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.
|-
|'''[[#Errors|BXCL0003]]''' is raised if an I/O error occurs while transferring data from or to the server.<br/>'''[[#Errors|BXCL0004]]''' is raised if an error occurs while executing a command.
|-
| valign='top' | '''Examples'''
|The following query creates a new database <code>TEST</code> on a remote BaseX server:
<pre class="brush:xquery">
|<code><b>client:query</b>($id as xs:anyURI, $query as xs:string) as item()*</code>
|-
| 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 query string, which will be evaluated by the server.
|-
|'''[[#Errors|BXCL0003]]''' is raised if an I/O error occurs while transferring data from or to the server.<br/>'''[[#Errors|BXCL0005]]''' is raised if an error occurs while evaluating a query, and if the original error cannot be extracted from the returned error string.
|-
| valign='top' | '''Examples'''
|The following query performs a query on a first server, the results of which are passed on to a second server:
<pre class="brush:xquery">
|<code><b>client:close</b>($id as xs:anyURI) as empty-sequence()</code>
|-
| valign='top' | '''Summary'''
| This function closes a client session. <code>$id</code> specifies the session id.<br/>At the end of query execution, open sessions will be automatically closed.
|-
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu