"Fossies" - the Fresh Open Source Software Archive

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

    1 arangosh&gt; db.old.ensureIndex({ <span class="hljs-attr">type</span>: <span class="hljs-string">"skiplist"</span>, <span class="hljs-attr">fields</span>: [ <span class="hljs-string">"age"</span> ] });
    2 { 
    3   <span class="hljs-string">"deduplicate"</span> : <span class="hljs-literal">true</span>, 
    4   <span class="hljs-string">"fields"</span> : [ 
    5     <span class="hljs-string">"age"</span> 
    6   ], 
    7   <span class="hljs-string">"id"</span> : <span class="hljs-string">"old/262"</span>, 
    8   <span class="hljs-string">"isNewlyCreated"</span> : <span class="hljs-literal">true</span>, 
    9   <span class="hljs-string">"sparse"</span> : <span class="hljs-literal">false</span>, 
   10   <span class="hljs-string">"type"</span> : <span class="hljs-string">"skiplist"</span>, 
   11   <span class="hljs-string">"unique"</span> : <span class="hljs-literal">false</span>, 
   12   <span class="hljs-string">"code"</span> : <span class="hljs-number">201</span> 
   13 }
   14 arangosh&gt; db.old.insert({ <span class="hljs-attr">age</span>: <span class="hljs-number">15</span> });
   15 { 
   16   <span class="hljs-string">"_id"</span> : <span class="hljs-string">"old/265"</span>, 
   17   <span class="hljs-string">"_key"</span> : <span class="hljs-string">"265"</span>, 
   18   <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g6gp2--_"</span> 
   19 }
   20 arangosh&gt; db.old.insert({ <span class="hljs-attr">age</span>: <span class="hljs-number">25</span> });
   21 { 
   22   <span class="hljs-string">"_id"</span> : <span class="hljs-string">"old/269"</span>, 
   23   <span class="hljs-string">"_key"</span> : <span class="hljs-string">"269"</span>, 
   24   <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g6gp6--_"</span> 
   25 }
   26 arangosh&gt; db.old.insert({ <span class="hljs-attr">age</span>: <span class="hljs-number">30</span> });
   27 { 
   28   <span class="hljs-string">"_id"</span> : <span class="hljs-string">"old/272"</span>, 
   29   <span class="hljs-string">"_key"</span> : <span class="hljs-string">"272"</span>, 
   30   <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g6gp6--B"</span> 
   31 }
   32 arangosh&gt; db.old.closedRange(<span class="hljs-string">"age"</span>, <span class="hljs-number">10</span>, <span class="hljs-number">30</span>).toArray();
   33 [ 
   34   { 
   35     <span class="hljs-string">"_key"</span> : <span class="hljs-string">"265"</span>, 
   36     <span class="hljs-string">"_id"</span> : <span class="hljs-string">"old/265"</span>, 
   37     <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g6gp2--_"</span>, 
   38     <span class="hljs-string">"age"</span> : <span class="hljs-number">15</span> 
   39   }, 
   40   { 
   41     <span class="hljs-string">"_key"</span> : <span class="hljs-string">"269"</span>, 
   42     <span class="hljs-string">"_id"</span> : <span class="hljs-string">"old/269"</span>, 
   43     <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g6gp6--_"</span>, 
   44     <span class="hljs-string">"age"</span> : <span class="hljs-number">25</span> 
   45   }, 
   46   { 
   47     <span class="hljs-string">"_key"</span> : <span class="hljs-string">"272"</span>, 
   48     <span class="hljs-string">"_id"</span> : <span class="hljs-string">"old/272"</span>, 
   49     <span class="hljs-string">"_rev"</span> : <span class="hljs-string">"_Y2g6gp6--B"</span>, 
   50     <span class="hljs-string">"age"</span> : <span class="hljs-number">30</span> 
   51   } 
   52 ]