1
0
Fork 0

removed unused examples

This commit is contained in:
Jan Steemann 2012-05-16 17:14:54 +02:00
parent 247bba8ecd
commit 0b48ac31cf
59 changed files with 0 additions and 362 deletions

View File

@ -1,20 +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(3).toArray();
[ { "_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]}]
arango> db.geo.near(0,0).count();
100

View File

@ -1,30 +0,0 @@
arango> db.geo2.ensureGeoIndex("location.latitude", "location.longitude");
23735273
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.geo2.save({ name : "Name/" + i + "/" + j,
.......> location: { latitude : i,
.......> longitude : j } });
.......> }
.......> }
arango> db.geo2.near(0,0).limit(3).toArray();
[{
"_id" : "48126444:72964588",
"_rev" : 72964588,
"location" : { "latitude" : 0, "longitude" : 0},
"name" : "Name/0/0"
},
{
"_id" : "48126444:73030124",
"_rev" : 73030124,
"location" : { "latitude" : 0, "longitude" : 10},
"name" : "Name/0/10"
},
{
"_id" : "48126444:70539756",
"_rev" : 70539756,
"location" : { "latitude" : -10, "longitude" : 0},
"name" : "Name/-10/0"
}]

View File

@ -1,2 +0,0 @@
arango> db.five.ensureHashIndex("a")
2170279

View File

@ -1,7 +0,0 @@
1 + 1
33 - 99
12.4 * 4.5
13.0 / 0.1
23 % 7
-15
+9.99

View File

@ -1,5 +0,0 @@
u.name
u.age
locs.longitude
v.when
u.name.first

View File

@ -1,3 +0,0 @@
name
username
firstname

View File

@ -1 +0,0 @@
users u

View File

@ -1 +0,0 @@
collection-name collection-alias

View File

@ -1,5 +0,0 @@
users u
locations locs
visitors v
`select` s
`select` `select`

View File

@ -1,41 +0,0 @@
null < false
null < true
null < 0
null < ''
null < ' '
null < '0'
null < 'abc'
null < [ ]
null < { }
false < true
false < 0
false < ''
false < ' '
false < '0'
false < 'abc'
false < [ ]
false < { }
true < 0
true < ''
true < ' '
true < '0'
true < 'abc'
true < [ ]
true < { }
0 < ''
0 < ' '
0 < '0'
0 < 'abc'
0 < [ ]
0 < { }
'' < ' '
'' < '0'
'' < 'abc'
'' < [ ]
'' < { }
[ ] < { }

View File

@ -1,6 +0,0 @@
[ ] < [ 0 ]
[ 1 ] < [ 2 ]
[ 1, 2 ] < [ 2 ]
[ 99, 99 ] < [ 100 ]
[ false ] < [ true ]
[ false, 1 ] < [ false, '' ]

View File

@ -1,8 +0,0 @@
{ } < { 'a' : 1 }
{ } < { 'a' : null }
{ 'a' : 1 } < { 'a' : 2 }
{ 'b' : 1 } < { 'a' : 0 }
{ 'a' : { 'c' : true } } < { 'a' : { 'c' : 0 } }
{ 'a' : { 'c' : true, 'a' : 0 } } < { 'a' : { 'c' : false, 'a' : 1 } }
{ 'a' : 1, 'b' : 2 } == { 'b' : 2, 'a' : 1 }

View File

@ -1,7 +0,0 @@
1 > 0
true != null
45 <= "yikes!"
65 != "65"
65 == 65
1.23 < 1.32
1.5 IN [ 2, 3, 1.5 ]

View File

@ -1,2 +0,0 @@
concat('a', 'b')
concat('Mr ', concat('Foxx', concat(' goes', ' fishing')))

View File

@ -1 +0,0 @@
{ }

View File

@ -1,3 +0,0 @@
{ name : "Fox" }
{ name : "Fox", age : 15 }
{ name : "Fox", age : 15, is15: true, likes: { name : "Bird", type : "Robin" } }

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,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,11 +0,0 @@
FROM users u
WITHIN d = ( [ users.x, users.y ], [ 10.3, 40.5 ], 10000 )
FROM users u
WITHIN d = ( users.x, users.y , 10.3, 40.5 , 10000 )
FROM users u
WITHIN d = ( [ users.x, users.y ], [ 10.3, 40.5 ], 25 )
FROM users u
WITHIN d = ( users.x, users.y, 10.3, 40.5, 25 )

View File

@ -1,5 +0,0 @@
FROM collection-name collection-alias
WITHIN geo-alias = ( document-coordinate, reference-coordinate, radius )
FROM collection-name collection-alias
NEAR geo-alias = ( document-coordinate, reference-coordinate, number-of-documents )

View File

@ -1 +0,0 @@
left-collection join-type right-collection on-expression

View File

@ -1,3 +0,0 @@
SELECT u
FROM users u
INNER JOIN locations locs ON (u.id == locs.uid)

View File

@ -1,7 +0,0 @@
SELECT { name : u.name, latitude : locs.latitude ? locs.latitude : null, longitude : locs.longitude ? locs.longitude : null }
FROM users u
LEFT JOIN locations locs ON (u.id == locs.uid)
SELECT { name : u.name, latitude : locs.latitude ? locs.latitude : null, longitude : locs.longitude ? locs.longitude : null }
FROM locations locs
RIGHT JOIN users u ON (u.id == locs.uid)

View File

@ -1,3 +0,0 @@
SELECT { person: u, locations: locs }
FROM users u
LIST JOIN locations locs ON (u.id == locs.uid)

View File

@ -1,7 +0,0 @@
arango> var a = { "hallo" : "you" };
arango> a.toJson = function() { return { "World" : this.hallo }; };
function () { return { "World" : this.hallo }; }
arango> toJson(a);
"{\"World\":\"you\"}"
arango> toJson({ a : a, b : 1 });
"{\"a\":{\"World\":\"you\"},\"b\":1}"

View File

@ -1 +0,0 @@
[ ]

View File

@ -1,3 +0,0 @@
[ 1, 2, 3 ]
[ -99, "yikes!", [ true, [ "no"], [ ] ], 1 ]
[ { "name" : "fox" }, { "name" : "marshal" } ]

View File

@ -1,4 +0,0 @@
1 && 0
true || false
!u.isInvalid
u.age in [0, 1, 2]

View File

@ -1 +0,0 @@
attribute-name : attribute-value

View File

@ -1,9 +0,0 @@
1
42
-1
-42
1.23
-99.99
0.1
-4.87e103

View File

@ -1 +0,0 @@
SELECT { name: u.name } FROM users u WHERE u.name == 'Fox'

View File

@ -1,4 +0,0 @@
select u
from User u
where u.age < 10
limit 10

View File

@ -1,4 +0,0 @@
select u
from Users u
where distance( u.location, [ 10.0, 20 ] ) < 10000

View File

@ -1,5 +0,0 @@
select u
from Users u
order by distance( u.location, [ 10.0, 20 ] )
limit 10

View File

@ -1,2 +0,0 @@
select u
from User u

View File

@ -1,2 +0,0 @@
select { name : u.name, email : u.address }
from User u

View File

@ -1,2 +0,0 @@
select u
from Users u

View File

@ -1,2 +0,0 @@
select { name : u.name }
from Users u

View File

@ -1,2 +0,0 @@
select { name : nvl(u.name, "unknown") }
from Users u

View File

@ -1,2 +0,0 @@
select u
from Users u

View File

@ -1,3 +0,0 @@
select { user : u, locations : l }
from Users u
list join Locations l on u._id == l.user_id

View File

@ -1,3 +0,0 @@
select { user : u, locations : l }
from Users u
list join Locations l on u == l.user

View File

@ -1,5 +0,0 @@
SELECT select-expression
FROM from-expression
[ WHERE where-expression ]
[ ORDER BY order-by-expression ]
[ LIMIT limit-expression ]

View File

@ -1,2 +0,0 @@
SELECT collection-alias
FROM collection-name collection-alias

View File

@ -1,2 +0,0 @@
SELECT u
FROM users u

View File

@ -1,17 +0,0 @@
SELECT { }
FROM users u
SELECT { name: "yikes!" }
FROM users u
SELECT { age: 15, likes: [ "fishing", "swimming"] }
FROM users u
SELECT { name: u.name, age: u.age }
FROM users u
SELECT { name: u.name, nextAge : u.age + 1 }
FROM users u
SELECT { person: { name: u.name, age: u.u_age }, likes: [ "fishing", "swimming"] }
FROM users u

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

@ -1,4 +0,0 @@
true
false
null
undefined

View File

@ -1,9 +0,0 @@
"yikes!"
"don't know"
"this is a longer string."
"the path separator on Windows is \\"
'yikes!'
'don\'t know'
'this is a longer string."
'the path separator on Windows is \\'

View File

@ -1 +0,0 @@
condition-expression ? true-expression : false-expression