1
0
Fork 0
This commit is contained in:
Frank Celler 2012-05-15 10:40:12 +02:00
parent 90955bdb96
commit d05bd0a6ba
28 changed files with 3 additions and 232 deletions

View File

@ -1,10 +0,0 @@
curl --data @- -X PUT --dump - http://localhost:8530/_api/simple/all
{ "collection" : "examples" }
HTTP/1.1 200 OK
content-type: application/json
[
{"_id":"189990:1631782","_rev":1631782,"hallo":"world"},
{"_id":"189990:1975069","_rev":1975069,"world":"hallo"}
]

View File

@ -1,7 +0,0 @@
curl --data @- -X PUT --dump - http://localhost:8530/_api/simple/all
{ "collection" : "examples", "skip" : 1, "limit" : 1 }
HTTP/1.1 200 OK
content-type: application/json
[ {"_id":"189990:1975069","_rev":1975069,"world":"hallo"} ]

View File

@ -1,11 +0,0 @@
> curl --data @- -X PUT --dump - http://localhost:8530/_api/simple/near
{ "collection" : "geo", "latitude" : 0, "longitude" : 0, "limit" : 3 }
HTTP/1.1 200 OK
content-type: application/json
[
{"_id":"154092:24861164","_rev":24861164,"name":"Name/0/0","loc":[0,0]},
{"_id":"154092:24926700","_rev":24926700,"name":"Name/0/10","loc":[0,10]},
{"_id":"154092:22436332","_rev":22436332,"name":"Name/-10/0","loc":[-10,0]}
]

View File

@ -1,11 +0,0 @@
> curl --data @- -X PUT --dump - http://localhost:8530/_api/simple/near
{ "collection" : "geo", "latitude" : 0, "longitude" : 0, "limit" : 3, "distance" : "DISTANCE" }
HTTP/1.1 200 OK
content-type: application/json
[
{"_id":"154092:24861164","_rev":24861164,"DISTANCE":0,"name":"Name/0/0","loc":[0,0]},
{"_id":"154092:24926700","_rev":24926700,"DISTANCE":1111949.27,"name":"Name/0/10","loc":[0,10]},
{"_id":"154092:22436332","_rev":22436332,"DISTANCE":1111949.27,"name":"Name/-10/0","loc":[-10,0]}
]

View File

@ -1,18 +0,0 @@
> curl --data @- -X PUT --dump - http://localhost:8530/_api/simple/within
{ "collection" : "geo", "latitude" : 0, "longitude" : 0, "radius" : 2000000 }
HTTP/1.1 200 OK
content-type: application/json
server: triagens GmbH High-Performance HTTP Server
[
{"_id":"154092:24861164","_rev":24861164,"name":"Name/0/0","loc":[0,0]},
{"_id":"154092:24795628","_rev":24795628,"name":"Name/0/-10","loc":[0,-10]},
{"_id":"154092:27285996","_rev":27285996,"name":"Name/10/0","loc":[10,0]},
{"_id":"154092:22436332","_rev":22436332,"name":"Name/-10/0","loc":[-10,0]},
{"_id":"154092:24926700","_rev":24926700,"name":"Name/0/10","loc":[0,10]},
{"_id":"154092:27351532","_rev":27351532,"name":"Name/10/10","loc":[10,10]},
{"_id":"154092:27220460","_rev":27220460,"name":"Name/10/-10","loc":[10,-10]},
{"_id":"154092:22370796","_rev":22370796,"name":"Name/-10/-10","loc":[-10,-10]},
{"_id":"154092:22501868","_rev":22501868,"name":"Name/-10/10","loc":[-10,10]}
]

View File

@ -1,18 +0,0 @@
> curl --data @- -X PUT --dump - http://localhost:8530/_api/simple/within
{ "collection" : "geo", "latitude" : 0, "longitude" : 0, "radius" : 2000000, "distance" : "DISTANCE" }
HTTP/1.1 200 OK
content-type: application/json
server: triagens GmbH High-Performance HTTP Server
[
{"_id":"154092:24861164","_rev":24861164,"DISTANCE":0,"name":"Name/0/0","loc":[0,0]},
{"_id":"154092:24926700","_rev":24926700,"DISTANCE":1111949.2664455874,"name":"Name/0/10","loc":[0,10]},
{"_id":"154092:24795628","_rev":24795628,"DISTANCE":1111949.2664455874,"name":"Name/0/-10","loc":[0,-10]},
{"_id":"154092:27285996","_rev":27285996,"DISTANCE":1111949.2664455874,"name":"Name/10/0","loc":[10,0]},
{"_id":"154092:22436332","_rev":22436332,"DISTANCE":1111949.2664455874,"name":"Name/-10/0","loc":[-10,0]},
{"_id":"154092:22370796","_rev":22370796,"DISTANCE":1568520.556798576,"name":"Name/-10/-10","loc":[-10,-10]},
{"_id":"154092:27351532","_rev":27351532,"DISTANCE":1568520.556798576,"name":"Name/10/10","loc":[10,10]},
{"_id":"154092:22501868","_rev":22501868,"DISTANCE":1568520.556798576,"name":"Name/-10/10","loc":[-10,10]},
{"_id":"154092:27220460","_rev":27220460,"DISTANCE":1568520.556798576,"name":"Name/10/-10","loc":[10,-10]}
]

View File

@ -1,9 +0,0 @@
> curl --data @- -X PUT --dump - http://localhost:8530/_api/simple/by-example
{ "collection" : "five", "example" : { "b" : "One" } }
HTTP/1.1 200 OK
content-type: application/json
[
{"a":1,"b":"One","_id":"138663:1711527","_rev":1711527}
]

View File

@ -1,14 +0,0 @@
arango> db.examples.ensureGeoIndex("location");
4545321
arango> db.examples.getIndexes();
[ { "iid" : 4545321, "type" : "geo1", "location" : "location" } ]
arango> db.examples.dropIndex(4545321);
true
arango> db.examples.getIndexes();
[]
arango> db.examples.dropIndex(4545321);
false

View File

@ -1,5 +0,0 @@
arango> db.examples.getIndexes();
[
{ "iid" : 4701883, "type" : "geo1", "location" : "work" },
{ "iid" : 4545321, "type" : "geo1", "location" : "home" }
]

View File

@ -1,18 +0,0 @@
arango> for (i = 0; i < 30; ++i) { db.examples.save({ name : "Name" + i, first_name : "Yes", age : i }) }
arango> db.examples.all();
{ "age" : 2, "name" : "Name2", "first_name" : "Yes", "_id" : "9496015:11126645" }
{ "age" : 8, "name" : "Name8", "first_name" : "Yes", "_id" : "9496015:11519861" }
.
.
{ "age" : 1, "name" : "Name1", "first_name" : "Yes", "_id" : "9496015:11061109" }
{ "age" : 7, "name" : "Name7", "first_name" : "Yes", "_id" : "9496015:11454325" }
...more results...
arango> it;
{ "age" : 5, "name" : "Name5", "first_name" : "Yes", "_id" : "9496015:11323253" }
{ "age" : 26, "name" : "Name26", "first_name" : "Yes", "_id" : "9496015:12699509" }
.
.
{ "age" : 13, "name" : "Name13", "first_name" : "Yes", "_id" : "9496015:11847541" }
{ "age" : 4, "name" : "Name4", "first_name" : "Yes", "_id" : "9496015:11257717" }

View File

@ -1,5 +0,0 @@
arango> id = db.examples.save({ Hallo : "World" });
"148759:5437094"
arango> db.examples.document(id);
{ "Hallo" : "World", "_id" : "148759:5437094" }

View File

@ -1,6 +0,0 @@
avoado> var cursor = db.examples.limit(3);
avoado> for (var i = 0; cursor.hasNext(); ++i) { print(i + ": " + toJson(cursor.next())); }
0: { "age" : 2, "name" : "Name2", "first_name" : "Yes", "_id" : "9496015:11126645" }
1: { "age" : 8, "name" : "Name8", "first_name" : "Yes", "_id" : "9496015:11519861" }
2: { "age" : 6, "name" : "Name6", "first_name" : "Yes", "_id" : "9496015:11388789" }

View File

@ -1,2 +0,0 @@
arango> db;
[vocbase at "/var/lib/arango"]

View File

@ -1,2 +0,0 @@
arango> db.names;
[new born collection "names"]

View File

@ -1,5 +0,0 @@
arango> db.names.count();
0
arango> db.names;
[collection "names"]

View File

@ -1,8 +0,0 @@
arango> db.names;
[unloaded collection "names"]
arango> db.names.count();
0
arango> db.names;
[collection "names"]

View File

@ -1,8 +0,0 @@
arango> db.names.save( { name : "Meier", first_name : "Hugo", age : 30 } );
"144723:1935857"
arango> db.names.save( { name : "Meier", first_name : "Egon", age : 29 } );
"144723:2001393"
arango> db.names.save( { name : "Meier", first_name : "Meier", age : 51 } );
"144723:2066929"

View File

@ -1,4 +0,0 @@
arango> db.names.all();
{ "age" : 29, "name" : "Meier", "first_name" : "Egon", "_id" : "144723:2001393" }
{ "age" : 51, "name" : "Meier", "first_name" : "Meier", "_id" : "144723:2066929" }
{ "age" : 30, "name" : "Meier", "first_name" : "Hugo", "_id" : "144723:1935857" }

View File

@ -1,5 +0,0 @@
arango> id = db.examples.save({ Hallo : "World" });
"148759:5437094"
arango> doc = db.examples.document(id);
{ "Hallo" : "World", "_id" : "148759:5437094", "_rev" : 5437095 }

View File

@ -1,2 +0,0 @@
arango> edges.edges-collection.edges("195189:1702517");
[ { _id : 2030197:3537525, _rev : 3537525, _from : 195189:1702517, _to : 195189:1833589, label : knows } ]

View File

@ -1,2 +0,0 @@
arango> edges.edges-collection.inEdges("195189:1833589");
[ { _id : 2030197:3537525, _rev : 3537525, _from : 195189:1702517, _to : 195189:1833589, label : knows } ]

View File

@ -1,2 +0,0 @@
arango> edges.edges-collection.inEdges("195189:1702517");
[ { _id : 2030197:3537525, _rev : 3537525, _from : 195189:1702517, _to : 195189:1833589, label : knows } ]

View File

@ -1,14 +0,0 @@
arango> db.geo.ensureGeoIndex("loc");
162534834
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.geo.save({ name : "Name/" + i + "/" + j,
.......> loc: [ i, j ] }); } }
arango> db.geo.count();
703
arango> db.geo.near(0,0).limit(2).toArray();
[ { _id : 131840:24773376, _rev : 24773376, name : Name/0/0, loc : [ 0, 0 ] },
{ _id : 131840:22348544, _rev : 22348544, name : Name/-10/0, loc : [ -10, 0 ] } ]

View File

@ -1,3 +0,0 @@
arango> db.geo.near(0,0).distance().limit(2).toArray();
[ { _id : 131840:24773376, _rev : 24773376, distance : 0, name : Name/0/0, loc : [ 0, 0 ] },
{ _id : 131840:22348544, _rev : 22348544, distance : 1111949.3, name : Name/-10/0, loc : [ -10, 0 ] } ]

View File

@ -1,29 +0,0 @@
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.complex.save({ name : "Name/" + i + "/" + j,
.......> home : [ i, j ],
.......> work : [ -i, -j ] });
.......> }
.......> }
arango> db.complex.near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: an geo-index must be known
arango> db.complex.ensureGeoIndex("home");
arango> db.complex.near(0, 170).limit(5).toArray();
[ { _id : 48834092:74655276, _rev : 74655276, name : Name/0/170, home : [ 0, 170 ], work : [ 0, -170 ] },
{ _id : 48834092:74720812, _rev : 74720812, name : Name/0/180, home : [ 0, 180 ], work : [ 0, -180 ] },
{ _id : 48834092:77080108, _rev : 77080108, name : Name/10/170, home : [ 10, 170 ], work : [ -10, -170 ] },
{ _id : 48834092:72230444, _rev : 72230444, name : Name/-10/170, home : [ -10, 170 ], work : [ 10, -170 ] },
{ _id : 48834092:72361516, _rev : 72361516, name : Name/0/-180, home : [ 0, -180 ], work : [ 0, 180 ] } ]
arango> db.complex.geo("work").near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: an geo-index must be known
arango> db.complex.ensureGeoIndex("work");
arango> db.complex.geo("work").near(0, 170).limit(5).toArray();
[ { _id : 48834092:72427052, _rev : 72427052, name : Name/0/-170, home : [ 0, -170 ], work : [ 0, 170 ] },
{ _id : 48834092:72361516, _rev : 72361516, name : Name/0/-180, home : [ 0, -180 ], work : [ 0, 180 ] },
{ _id : 48834092:70002220, _rev : 70002220, name : Name/-10/-170, home : [ -10, -170 ], work : [ 10, 170 ] },
{ _id : 48834092:74851884, _rev : 74851884, name : Name/10/-170, home : [ 10, -170 ], work : [ -10, 170 ] },
{ _id : 48834092:74720812, _rev : 74720812, name : Name/0/180, home : [ 0, 180 ], work : [ 0, -180 ] } ]

View File

@ -1,10 +0,0 @@
arango> db.geo.within(0, 0, 2000 * 1000).distance().toArray();
[ { _id : 131840:24773376, _rev : 24773376, distance : 0, name : Name/0/0, loc : [ 0, 0 ] },
{ _id : 131840:24707840, _rev : 24707840, distance : 1111949.3, name : Name/0/-10, loc : [ 0, -10 ] },
{ _id : 131840:24838912, _rev : 24838912, distance : 1111949.3, name : Name/0/10, loc : [ 0, 10 ] },
{ _id : 131840:22348544, _rev : 22348544, distance : 1111949.3, name : Name/-10/0, loc : [ -10, 0 ] },
{ _id : 131840:27198208, _rev : 27198208, distance : 1111949.3, name : Name/10/0, loc : [ 10, 0 ] },
{ _id : 131840:22414080, _rev : 22414080, distance : 1568520.6, name : Name/-10/10, loc : [ -10, 10 ] },
{ _id : 131840:27263744, _rev : 27263744, distance : 1568520.6, name : Name/10/10, loc : [ 10, 10 ] },
{ _id : 131840:22283008, _rev : 22283008, distance : 1568520.6, name : Name/-10/-10, loc : [ -10, -10 ] },
{ _id : 131840:27132672, _rev : 27132672, distance : 1568520.6, name : Name/10/-10, loc : [ 10, -10 ] } ]

View File

@ -1,2 +0,0 @@
arango> db.five.all().nextRef();
159896:1798296

View File

@ -4,8 +4,9 @@ find . \
\( -name 3rdParty -o -name .svn \) -prune \
-o \
\( -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.dox" \) \
-exec "grep" "^/// @verbinclude" "{}" ";" \
\
-exec "grep" '^/// @\(verbinclude \|EXAMPLE{\|TINYEXAMPLE{\)' "{}" ";" \
| tr "{" " " \
| tr "," " " \
| awk '{print $3}' | sort | uniq > /tmp/verbinclude.used
for file in Durham Fyn ArangoDB; do