Changes

Jump to navigation Jump to search
327 bytes added ,  18:17, 13 November 2011
> _</pre>
Available command-line options flags can be listed with the {{Mono|-h}} flag:
<pre>
$ basex -h
</pre>
The options flags have the following meaning:
{| class="wikitable"
! width='75' | Flag
! Description
! Option
! width='165' | Examples
|- valign="top"
| {{Mono|-b&lt;pars&gt;}}
| Binds external variables to XQuery expressions. This flag may be specified multiple times. Variables names and their values are delimited by equality signs (<code>=</code>). The names may be optionally prefixed with dollar signs. The [[Options#BINDINGS|BINDINGS]] option serves the same purpose.
| <code>[[Options#BINDINGS|BINDINGS]]</code>
| <code>-bv=example<br />-q"declare variable $v external; $v"</code>
|- valign="top"
| {{Mono|-c&lt;cmd&gt;}}
| Launches database commands and skips the interactive mode. The flag should be placed last, as all remaining characters are interpreted as commands. Several commands can be separated by semicolons.
|
| {{Mono|-c"list;info"}}
|- valign="top"
| {{Mono|-d}}
| Turns on the debugging mode. Debugging information is output to ''standard error''.
| <code>[[Options#DEBUG|DEBUG]]</code>
|
|- valign="top"
| {{Mono|-i&lt;input&gt;}}
| Opens a database or XML document specified by the argument. The opened input may be further processed by an XQuery expression.
|
| {{Mono|-iitems.xml -q"//item"}}
|- valign="top"
| {{Mono|-o&lt;file&gt;}}
| All command and query output is written to the specified file.
|| {{Mono|-o output.txt}}
|- valign="top"
| {{Mono|-q&lt;expr&gt;}}
| Executes the specified string as XQuery expression. The flag should be placed last, as all remaining characters are interpreted as XQuery.
|
| {{Mono|-q"doc('input')//head"}}
|- valign="top"
| {{Mono|-s&lt;pars&gt;}}
| Specifies parameters for serializing XQuery results; see [[Serialization]] for more details. This flag may be specified multiple times. Key and values are separated by the equality sign (<code>=</code>).
| <code>[[Options#SERIALIZER|SERIALIZER]]</code>
| <code>-smethod=text</code>
|- valign="top"
| {{Mono|-u}}
| Modifies original files after evaluating XQuery Update expressions.
| <code>[[Options#WRITEBACK|WRITEBACK]]</code>
|
|- valign="top"
| {{Mono|-v}}
| Prints process and timing information to the ''standard output''.
|
|
|- valign="top"
| {{Mono|-V}}
| Prints detailed query information to the ''standard output'', including details on the compilation and profiling steps.
| <code>[[Options#QUERYINFO|QUERYINFO]]</code>
|
|- valign="top"
| {{Mono|-w}}
| By default, whitespaces around text nodes are chopped when a database is created. This flag can be specified to preserve whitespaces. The | <code>[[Options#CHOP|CHOP]] option serves the same purpose.</code>
|
|- valign="top"
| {{Mono|-x}}
| This flags turn on the output of the query execution plan, formatted in [[Options#XMLPLAN|XML]].
| <code>[[Options#XMLPLAN|XMLPLAN]]</code>
|
|- valign="top"
| {{Mono|-z}}
| Skip Skips the serialization of XQuery results. This flag is useful for analyzing if the query plansis profiled or analyzed.| <code>[[Options#SERIALIZE|SERIALIZE]]</code>
|
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu