-
Notifications
You must be signed in to change notification settings - Fork 1
/
arangosh.mm
171 lines (171 loc) · 13.1 KB
/
arangosh.mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<map version="1.0.1">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1557715484636" ID="ID_826963131" MODIFIED="1557715499512" TEXT="arangosh">
<node CREATED="1557715524572" ID="ID_394464988" MODIFIED="1557715528271" POSITION="right" TEXT="collection"/>
<node CREATED="1557715528681" ID="ID_450228597" MODIFIED="1557715529826" POSITION="right" TEXT="query"/>
<node CREATED="1557715530053" FOLDED="true" ID="ID_887680903" MODIFIED="1557723298497" POSITION="right" TEXT="db.">
<node CREATED="1557721383838" ID="ID_1105692923" MODIFIED="1557721389236" TEXT="database">
<node CREATED="1557721391190" ID="ID_1369690238" MODIFIED="1557721494791" TEXT="_createDatabase"/>
<node CREATED="1557721495130" ID="ID_1975558578" MODIFIED="1557721500323" TEXT="_dropDatabase"/>
<node CREATED="1557721500783" ID="ID_1419909903" MODIFIED="1557721503394" TEXT="_useDatabase"/>
<node CREATED="1557721503670" ID="ID_1073433198" MODIFIED="1557721506633" TEXT="_name"/>
<node CREATED="1557721506903" ID="ID_980618806" MODIFIED="1557721510096" TEXT="_databases"/>
</node>
<node CREATED="1557720952679" FOLDED="true" ID="ID_1257180680" MODIFIED="1557723065633" TEXT="collection">
<node CREATED="1557716358017" FOLDED="true" ID="ID_1450264113" MODIFIED="1557720975629" TEXT="_create">
<node CREATED="1557716447525" ID="ID_985006507" MODIFIED="1557716468681" TEXT="(name, properties, type, options)">
<node CREATED="1557716497135" ID="ID_1962986425" MODIFIED="1557716498056" TEXT="type">
<node CREATED="1557716472084" ID="ID_1850183646" MODIFIED="1557716498952" TEXT="ArangoCollection.TYPE_DOCUMENT"/>
<node CREATED="1557716976237" ID="ID_1540667010" MODIFIED="1557716976988" TEXT="ArangoCollection.TYPE_EDGE"/>
</node>
<node CREATED="1557716493038" ID="ID_1550417157" MODIFIED="1557716503249" TEXT="properties">
<node CREATED="1557716640127" MODIFIED="1557716640127" TEXT="waitForSync"/>
<node CREATED="1557716640128" MODIFIED="1557716640128" TEXT="journalSize"/>
<node CREATED="1557716640128" MODIFIED="1557716640128" TEXT="isSystem"/>
<node CREATED="1557716640128" MODIFIED="1557716640128" TEXT="isVolatile"/>
<node CREATED="1557716640129" MODIFIED="1557716640129" TEXT="doCompact"/>
<node CREATED="1557716640129" MODIFIED="1557716640129" TEXT="keyOptions"/>
<node CREATED="1557716640129" MODIFIED="1557716640129" TEXT="shardKeys"/>
<node CREATED="1557716640129" ID="ID_683752312" MODIFIED="1557716653357" TEXT="numberOfShards">
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
</node>
<node CREATED="1557716640129" MODIFIED="1557716640129" TEXT="distributeShardsLike"/>
<node CREATED="1557716640130" MODIFIED="1557716640130" TEXT="indexBuckets"/>
<node CREATED="1557716640130" MODIFIED="1557716640130" TEXT="id"/>
<node CREATED="1557716640130" MODIFIED="1557716640130" TEXT="isSmart"/>
<node CREATED="1557716640130" ID="ID_1980936912" MODIFIED="1557716657128" TEXT="replicationFactor">
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
</node>
<node CREATED="1557716640130" MODIFIED="1557716640130" TEXT="shardingStrategy"/>
<node CREATED="1557716640131" MODIFIED="1557716640131" TEXT="smartGraphAttribute"/>
<node CREATED="1557716640131" MODIFIED="1557716640131" TEXT="smartJoinAttribute"/>
<node CREATED="1557716640131" MODIFIED="1557716640131" TEXT="avoidServers"/>
<node CREATED="1557716640131" MODIFIED="1557716640131" TEXT="cacheEnabled"/>
</node>
<node CREATED="1557716702624" ID="ID_547084686" MODIFIED="1557716704201" TEXT="options">
<node CREATED="1557716705082" ID="ID_89344089" MODIFIED="1557716706421" TEXT="waitForSyncReplication"/>
<node CREATED="1557716723970" ID="ID_728712301" MODIFIED="1557716724808" TEXT="enforceReplicationFactor"/>
</node>
</node>
<node CREATED="1557716731817" ID="ID_739983684" MODIFIED="1557716783006" TEXT="db._create("person2", {numberOfShards:3, replicationFactor:3})"/>
<node CREATED="1557716848536" ID="ID_1521148662" MODIFIED="1557716882711" TEXT="shard的replica数目不能超过dbserver的数目"/>
</node>
<node CREATED="1557716945603" ID="ID_1334061055" MODIFIED="1557720969141" TEXT="_createEdgeCollection">
<node CREATED="1557716965970" ID="ID_593322181" MODIFIED="1557716966970" TEXT="this._create(name, properties, ArangoCollection.TYPE_EDGE);"/>
</node>
<node CREATED="1557717422971" ID="ID_1461235805" MODIFIED="1557720969139" TEXT="_drop">
<node CREATED="1557717426895" ID="ID_377286708" MODIFIED="1557717428449" TEXT="for (var c of ["page", "person2", "user", "relationship2"]) {db._drop(c)}"/>
</node>
<node CREATED="1557720977907" ID="ID_1669489628" MODIFIED="1557721348730" TEXT="_truncate(name/id)">
<node CREATED="1557721350954" ID="ID_1840241096" MODIFIED="1557721360158" TEXT="truncate a collection"/>
</node>
<node CREATED="1557721864387" ID="ID_1824715295" MODIFIED="1557722250341" TEXT="collection method">
<node CREATED="1557721883021" ID="ID_988769315" MODIFIED="1557721889063" TEXT="get collection obj">
<node CREATED="1557721940773" ID="ID_1192675553" MODIFIED="1557722090656" TEXT="_help"/>
<node CREATED="1557721870435" ID="ID_467482216" MODIFIED="1557721914828" TEXT="var col = db.person"/>
<node CREATED="1557721892045" ID="ID_218351822" MODIFIED="1557721911238" TEXT="var col = db._collection("person")"/>
<node CREATED="1557722374127" ID="ID_191263404" MODIFIED="1557722375095" TEXT="info">
<node CREATED="1557721917599" ID="ID_1615972134" MODIFIED="1557722379226" TEXT="name"/>
<node CREATED="1557721930811" ID="ID_656046784" MODIFIED="1557722379225" TEXT="status"/>
<node CREATED="1557721933925" ID="ID_551506198" MODIFIED="1557722379224" TEXT="properties"/>
<node CREATED="1557721939662" ID="ID_329399913" MODIFIED="1557722379223" TEXT="type"/>
<node CREATED="1557722255923" ID="ID_1827071963" MODIFIED="1557722379223" TEXT="_id"/>
<node CREATED="1557722276854" ID="ID_675964653" MODIFIED="1557722379222" TEXT="count"/>
<node CREATED="1557722091960" ID="ID_820690114" MODIFIED="1557722379220" TEXT="getIndexes"/>
<node CREATED="1557722257628" ID="ID_678405225" MODIFIED="1557722379220" TEXT="_database"/>
</node>
<node CREATED="1557722381797" FOLDED="true" ID="ID_1552935459" MODIFIED="1557722393728" TEXT="mutation">
<node CREATED="1557722095490" ID="ID_421323470" MODIFIED="1557722098935" TEXT="refresh"/>
<node CREATED="1557722099744" ID="ID_302717707" MODIFIED="1557722100689" TEXT="rename"/>
<node CREATED="1557722100939" ID="ID_334901872" MODIFIED="1557722101773" TEXT="load"/>
<node CREATED="1557722102297" ID="ID_50533370" MODIFIED="1557722103556" TEXT="unload"/>
<node CREATED="1557722103790" ID="ID_1534029781" MODIFIED="1557722104711" TEXT="drop"/>
<node CREATED="1557722104939" ID="ID_1430593960" MODIFIED="1557722106426" TEXT="truncate"/>
</node>
<node CREATED="1557722341856" ID="ID_1442809256" MODIFIED="1557722346352" TEXT="document">
<node CREATED="1557722262340" ID="ID_1189318174" MODIFIED="1557722351616" TEXT="save"/>
<node CREATED="1557722266634" ID="ID_948445953" MODIFIED="1557722351615" TEXT="document"/>
<node CREATED="1557722292624" ID="ID_1155411812" MODIFIED="1557722351615" TEXT="replace"/>
<node CREATED="1557722295056" ID="ID_1270939591" MODIFIED="1557722351613" TEXT="update"/>
<node CREATED="1557722296430" ID="ID_261455140" MODIFIED="1557722351612" TEXT="remove"/>
<node CREATED="1557722297739" ID="ID_1093911826" MODIFIED="1557722354771" TEXT="exists"/>
</node>
</node>
</node>
</node>
<node CREATED="1557721367870" FOLDED="true" ID="ID_787091396" MODIFIED="1557721488545" TEXT="document">
<node CREATED="1557717495001" ID="ID_688652949" MODIFIED="1557721373996" TEXT="_document">
<node CREATED="1557717500943" ID="ID_398855373" MODIFIED="1557717518380" TEXT="db._document("person/person_1")"/>
</node>
<node CREATED="1557718466496" ID="ID_1655309934" MODIFIED="1557721373994" TEXT="_replace">
<node CREATED="1557720154884" ID="ID_175980671" MODIFIED="1557720172152" TEXT="_replace(<id>, <data>, <overwrite>)">
<node CREATED="1557720582150" ID="ID_1230626851" MODIFIED="1557720584148" TEXT="id">
<node CREATED="1557720585125" ID="ID_1659758388" MODIFIED="1557720596758" TEXT="scalar string"/>
<node CREATED="1557720601730" ID="ID_636034191" MODIFIED="1557720680249" TEXT="{_id:"collection/key", _rev: ""}">
<node CREATED="1557720682594" ID="ID_495430804" MODIFIED="1557720687896" TEXT="version validation"/>
</node>
</node>
<node CREATED="1557720694987" ID="ID_1950414224" MODIFIED="1557720698715" TEXT="overwrite">
<node CREATED="1557720700252" ID="ID_545725569" MODIFIED="1557720716236" TEXT="overwrite"/>
<node CREATED="1557720716556" ID="ID_1826931024" MODIFIED="1557720719593" TEXT="returnNew"/>
<node CREATED="1557720719830" ID="ID_805193769" MODIFIED="1557720721549" TEXT="returnOld"/>
<node CREATED="1557720721942" ID="ID_349979723" MODIFIED="1557720728878" TEXT="waitForSync"/>
</node>
</node>
<node CREATED="1557720175809" ID="ID_433900456" MODIFIED="1557720181254" TEXT="overwrite">
<node CREATED="1557720185490" ID="ID_70287764" MODIFIED="1557720186966" TEXT="true">
<node CREATED="1557720263565" ID="ID_486611165" MODIFIED="1557720282732" TEXT="no version validation">
<node CREATED="1557720339744" ID="ID_793997608" MODIFIED="1557720340764" TEXT="db._replace({_id:"person/person_2", _rev: "_Yo7-_nq--_"}, {job:"QA", name:"person_002", age: 23}, true)"/>
</node>
</node>
<node CREATED="1557720187424" ID="ID_746781537" MODIFIED="1557720244254" TEXT="false, _rev not specified">
<node CREATED="1557720286700" ID="ID_1601067072" MODIFIED="1557720317932" TEXT="no version validation"/>
</node>
<node CREATED="1557720205737" ID="ID_1365957846" MODIFIED="1557720217375" TEXT="false, _rev specified">
<node CREATED="1557720321170" ID="ID_1475722217" MODIFIED="1557720325893" TEXT="version validation"/>
</node>
</node>
<node CREATED="1557720557920" ID="ID_1609239412" MODIFIED="1557720559039" TEXT="db._replace({_id:"person/person_2", _rev: "_Yo7-_nq--_"}, {job:"QA", name:"person_002", age: 23}, {overwrite:true, returnNew:true, waitForSync:true})"/>
<node CREATED="1557720149646" ID="ID_917357212" MODIFIED="1557720560763" TEXT="db._replace({_id:"person/person_2", _rev: "_Yo7-_nq--_"}, {job:"QA", name:"person_002", age: 23}, true)"/>
</node>
<node CREATED="1557720829916" ID="ID_1201724812" MODIFIED="1557721373977" TEXT="_update">
<node CREATED="1557720816944" ID="ID_495193774" MODIFIED="1557720832727" TEXT="(id, data, overwrite, keepNull, waitForSync)"/>
</node>
<node CREATED="1557720855124" ID="ID_30276975" MODIFIED="1557721373975" TEXT="_remove"/>
<node CREATED="1557720866292" ID="ID_624427105" MODIFIED="1557721373974" TEXT="_exists"/>
</node>
<node CREATED="1557721742477" ID="ID_893807278" MODIFIED="1557721743341" TEXT="view">
<node CREATED="1557721744191" ID="ID_1378579250" MODIFIED="1557721756877" TEXT="_views"/>
<node CREATED="1557721757478" ID="ID_717289678" MODIFIED="1557721760557" TEXT="_view(name)"/>
<node CREATED="1557721761250" ID="ID_772169185" MODIFIED="1557721763699" TEXT="_createView"/>
<node CREATED="1557721764200" ID="ID_1161744810" MODIFIED="1557721767632" TEXT="_dropView"/>
</node>
<node CREATED="1557721576403" ID="ID_79957354" MODIFIED="1557721673926" TEXT="AQL query">
<node CREATED="1557721579146" ID="ID_420469340" MODIFIED="1557721580808" TEXT="_query"/>
<node CREATED="1557721581133" ID="ID_1332208641" MODIFIED="1557721599169" TEXT="_createStatement"/>
<node CREATED="1557723071129" ID="ID_853911796" MODIFIED="1557723106420" TEXT="new ArangoStatement(db, { "query": "FOR..." }) "/>
<node CREATED="1557723111291" ID="ID_1294101758" MODIFIED="1557723114214" TEXT="stmt">
<node CREATED="1557723115156" ID="ID_619555126" MODIFIED="1557723136823" TEXT="{set,get}{Query, BatchSize, Count}"/>
<node CREATED="1557723142566" ID="ID_848441063" MODIFIED="1557723166678" TEXT="bind(key, value)"/>
<node CREATED="1557723167023" ID="ID_1217899102" MODIFIED="1557723170645" TEXT="bind(values)"/>
<node CREATED="1557723171014" ID="ID_985300857" MODIFIED="1557723186338" TEXT="cursor=execute()"/>
<node CREATED="1557723253506" ID="ID_385155286" MODIFIED="1557723257219" TEXT="_help()"/>
<node CREATED="1557723186966" ID="ID_1383656953" MODIFIED="1557723190355" TEXT="cursor">
<node CREATED="1557723191098" ID="ID_821988930" MODIFIED="1557723194012" TEXT="toArray()"/>
<node CREATED="1557723194245" ID="ID_321094732" MODIFIED="1557723246420" TEXT="hasNext()"/>
<node CREATED="1557723246635" ID="ID_149440747" MODIFIED="1557723248050" TEXT="next()"/>
<node CREATED="1557723250345" ID="ID_440048877" MODIFIED="1557723252047" TEXT="_help()"/>
</node>
</node>
</node>
<node CREATED="1557721614081" ID="ID_59914978" MODIFIED="1557721617263" TEXT="transaction">
<node CREATED="1557721618766" ID="ID_104821182" MODIFIED="1557721640592" TEXT="_executeTransaction"/>
</node>
</node>
<node CREATED="1557723299072" ID="ID_1493908549" MODIFIED="1557723300911" POSITION="right" TEXT="misc">
<node CREATED="1557723302511" ID="ID_496640652" MODIFIED="1557723354475" TEXT="{start, stop}_{pager, pretty_print, color_print}"/>
<node CREATED="1557723306240" ID="ID_34154091" MODIFIED="1557723367036" TEXT="print"/>
<node CREATED="1557723368710" ID="ID_765104088" MODIFIED="1557723371157" TEXT="print_plain"/>
</node>
</node>
</map>