"Fossies" - the Fresh Open Source Software Archive

Member "arangodb-3.4.7/Documentation/Examples/012_documentsCollectionUpdateByExample.generated" (24 Jun 2019, 1511 Bytes) of package /linux/misc/arangodb-3.4.7.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "012_documentsCollectionUpdateByExample.generated": 3.4.6.1_vs_3.4.7.

    1 arangosh&gt; db.example.insert({ <span class="hljs-attr">Hello</span> : <span class="hljs-string">"world"</span>, <span class="hljs-attr">foo</span> : <span class="hljs-string">"bar"</span> });
    2 { 
    3   <span class="hljs-string">"_id"</span> : <span class="hljs-string">"example/6712"</span>, 
    4   <span class="hljs-string">"_key"</span> : <span class="hljs-string">"6712"</span>, 
    5   <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g6hJu--_"</span> 
    6 }
    7 arangosh&gt; db.example.updateByExample({ <span class="hljs-attr">Hello</span>: <span class="hljs-string">"world"</span> }, { <span class="hljs-attr">Hello</span>: <span class="hljs-string">"foo"</span>, <span class="hljs-attr">World</span>: <span class="hljs-string">"bar"</span> }, <span class="hljs-literal">false</span>);
    8 <span class="hljs-number">1</span>
    9 arangosh&gt; db.example.byExample({ <span class="hljs-attr">Hello</span>: <span class="hljs-string">"foo"</span> }).toArray()
   10 [ 
   11   { 
   12     <span class="hljs-string">"_key"</span> : <span class="hljs-string">"6712"</span>, 
   13     <span class="hljs-string">"_id"</span> : <span class="hljs-string">"example/6712"</span>, 
   14     <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g6hJy--_"</span>, 
   15     <span class="hljs-string">"Hello"</span> : <span class="hljs-string">"foo"</span>, 
   16     <span class="hljs-string">"foo"</span> : <span class="hljs-string">"bar"</span>, 
   17     <span class="hljs-string">"World"</span> : <span class="hljs-string">"bar"</span> 
   18   } 
   19 ]