"Fossies" - the Fresh Open Source Software Archive

Member "arangodb-3.4.7/Documentation/Examples/documentsCollectionRemoveConflict.generated" (24 Jun 2019, 1512 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 "documentsCollectionRemoveConflict.generated": 3.4.6.1_vs_3.4.7.

    1 arangosh&gt; a1 = db.example.insert({ <span class="hljs-attr">a</span> : <span class="hljs-number">1</span> });
    2 { 
    3   <span class="hljs-string">"_id"</span> : <span class="hljs-string">"example/110982"</span>, 
    4   <span class="hljs-string">"_key"</span> : <span class="hljs-string">"110982"</span>, 
    5   <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g68Sm--_"</span> 
    6 }
    7 arangosh&gt; a2 = db._replace(a1, { <span class="hljs-attr">a</span> : <span class="hljs-number">2</span> });
    8 { 
    9   <span class="hljs-string">"_id"</span> : <span class="hljs-string">"example/110982"</span>, 
   10   <span class="hljs-string">"_key"</span> : <span class="hljs-string">"110982"</span>, 
   11   <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g68Sm--B"</span>, 
   12   <span class="hljs-string">"_oldRev"</span> : <span class="hljs-string">"_Y2g68Sm--_"</span> 
   13 }
   14 arangosh&gt; db._remove(a1);
   15 [ArangoError <span class="hljs-number">1200</span>: precondition failed]
   16 arangosh&gt; db._remove(a1, {<span class="hljs-attr">overwrite</span>: <span class="hljs-literal">true</span>} );
   17 { 
   18   <span class="hljs-string">"_id"</span> : <span class="hljs-string">"example/110982"</span>, 
   19   <span class="hljs-string">"_key"</span> : <span class="hljs-string">"110982"</span>, 
   20   <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g68Sm--B"</span> 
   21 }
   22 arangosh&gt; db._document(a1);
   23 [ArangoError <span class="hljs-number">1202</span>: <span class="hljs-built_in">document</span> not found]