Changes

Jump to navigation Jump to search
854 bytes added ,  01:10, 2 March 2012
! Client Request
! Server Response
! Description
|-
| COMMAND
| <code>{command}</code>
| <code>{result} {info} \0</code>
| Executes a BaseX database command.
|-
| QUERY
| <code>\0 {query}</code>
| <code>{id} \0</code>
| Creates a query object and returns its id.
|-
| CREATE
| <code>\8 {name} {input}</code>
| <code>{info} \0</code>
| Creates a new database with the specified input (may be empty).
|-
| ADD
| <code>\9 {name} {path} {input}</code>
| <code>{info} \0</code>
| Adds a new resource in the opened database.
|-
| WATCH
| <code>\10 {name}</code>
| <code></code>
| Registers the client for the specified event.
|-
| UNWATCH
| <code>\11 {name}</code>
| <code></code>
| Unregisters the client.
|-
| REPLACE
| <code>\12 {path} {input}</code>
| <code>{info} \0</code>
| Replaces a resource with the specified input.
|-
| STORE
| <code>\13 {path} {input}</code>
| <code>{info} \0</code>
| Stores a binary resource in the opened database.
|-
| ↯ error
| <code></code>
| <code>{</code>''start of response''<code>} {error} \1</code>
| Error feedback.
|}
{| class="wikitable"
|-
! Query Command
! Client Request
! Server Response
! Description
|-
| CLOSE
| <code>\2 {id}</code>
| <code>\0 \0</code>
| Closes and unregisters the query with the specified id.
|-
| BIND
| <code>\3 {id} {name} {value} {type}</code>
| <code>\0 \0</code>
| Binds a value to a variable.
|-
| ITER
| <code>\4 {id}</code>
| <code>\t {item 1} ... \t {item n} \0</code>
| Returns all results of the query, prefixed by their [[Server Protocol|Data Type].
|-
| EXECUTE
| <code>\5 {id}</code>
| <code>{result} \0</code>
| Executes the query and returns all results as a UTF8 string.
|-
| INFO
| <code>\6 {id}</code>
| <code>{result} \0</code>
| Returns a query info string.
|-
| OPTIONS
| <code>\7 {id}</code>
| <code>{result} \0</code>
| Returns the query serialization parameters.
|-
| FULL
| <code>\31 {id} {{Version|7.1.2}}</code>
| <code>{meta 1} {item 1} ... {meta n} {item n} \0</code>
| {{Version|7.1.2}}: Returns all results of the query, prefixed by their [[Server Protocol/XDM Meta Data|XDM meta data]].
|-
| ↯ error
| <code></code>
| <code>{</code>''start of response''<code>} \1 {error}</code>
| Error feedback.
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu