1
0
Fork 0
arangodb/Doxygen/doc/UserManualArangosh.html

56 lines
3.8 KiB
HTML

<html><head><title>ArangoDB Manual</title> <style media="screen" type="text/css" style="display:none">body{background-color:white;font:13px Helvetica,arial,freesans,clean,sans-serif;line-height:1.4;color:#333;}#access{font-size:16px;margin-left:12px;display:block;margin-left:10px;margin-right:10px;background-color:#F3F1EE!important;}#access a{border-right:1px solid #DBDEDF;color:#A49F96;display:block;line-height:38px;padding:0 10px;text-decoration:none;}#navigation ul{text-transform:uppercase;list-style:none;margin:0;}#navigation li{float:left;position:relative;}#container{width:920px;margin:0 auto;}a{color:#4183C4;text-decoration:none;}.contents h2{font-size:24px;border-bottom:1px solid #CCC;color:black;}.contents h1{font-size:33px;border-bottom:1px solid #CCC;color:black;}.clearfix:after{content:".";display:block;clear:both;font-size:0;height:0;visibility:hidden;}/**/ *:first-child+html .clearfix{min-height:0;}/**/ * html .clearfix{height:1%;}</style></head><body><div id="container"><img src="images/logo_arangodb.png" width="397" height="67" alt="ArangoDB"><div id="access" role="navigation"><div id="navigation"><ul id="menu-ahome" class="menu"><li><a href="Home.html">Table of contents</a></li> <li><a href="http://www.arangodb.org">ArangoDB homepage</a></li></ul></div><div class="clearfix"></div></div><div>
<!-- Generated by Doxygen 1.7.5.1 -->
</div>
<div class="header">
<div class="headertitle">
<h1>The Arango Shell </h1> </div>
</div>
<div class="contents">
<div class="textblock"><hr/>
<ul>
<li>
<a class="el" href="UserManualArangosh.html">The Arango Shell</a> </li>
</ul>
<hr/>
<h2><a class="anchor" id="UserManualArangoshOutput"></a>
Arango Shell Output</h2>
<p>In general the Arango Shells prints its as output to standard output channel using the JSON stringifier.</p>
<div class="fragment"><pre class="fragment"> arangosh&gt; db.five.all().toArray();
[{ _id : <span class="stringliteral">&quot;2223655/3665447&quot;</span>, _rev : 3665447, name : <span class="stringliteral">&quot;one&quot;</span> },
{ _id : <span class="stringliteral">&quot;2223655/3730983&quot;</span>, _rev : 3730983, name : <span class="stringliteral">&quot;two&quot;</span> },
{ _id : <span class="stringliteral">&quot;2223655/3862055&quot;</span>, _rev : 3862055, name : <span class="stringliteral">&quot;four&quot;</span> },
{ _id : <span class="stringliteral">&quot;2223655/3993127&quot;</span>, _rev : 3993127, name : <span class="stringliteral">&quot;three&quot;</span> }]
</pre></div><hr/>
<code><b>start_pretty_print()</b></code><hr/>
While the standard JSON stringifier is very concise it is hard to read. Calling the function <code>start_pretty_print</code> will enable the pretty printer which formats the output in a human readable way.</p>
<div class="fragment"><pre class="fragment"> arangosh&gt; start_pretty_print();
<span class="keyword">using</span> pretty printing
arangosh&gt; db.five.all().toArray();
[
{
_id : <span class="stringliteral">&quot;2223655/3665447&quot;</span>,
_rev : 3665447,
name : <span class="stringliteral">&quot;one&quot;</span>
},
{
_id : <span class="stringliteral">&quot;2223655/3730983&quot;</span>,
_rev : 3730983,
name : <span class="stringliteral">&quot;two&quot;</span>
},
{
_id : <span class="stringliteral">&quot;2223655/3862055&quot;</span>,
_rev : 3862055,
name : <span class="stringliteral">&quot;four&quot;</span>
},
{
_id : <span class="stringliteral">&quot;2223655/3993127&quot;</span>,
_rev : 3993127,
name : <span class="stringliteral">&quot;three&quot;</span>
}
]
</pre></div><hr/>
<code><b>stop_pretty_print()</b></code><hr/>
The functions disable the pretty printer, switching back to the standard JSON output format. </p>
</div></div>
</div></body></html>