1
0
Fork 0

fixed code of some examples

This commit is contained in:
jsteemann 2017-02-13 08:21:28 +01:00
parent 392e8233eb
commit 238070b477
4 changed files with 6 additions and 2 deletions

View File

@ -30,6 +30,7 @@ You may use it like this: (we disable syntax highlighting here)
@startDocuBlockInline AQLEXP_01_axplainer
@EXAMPLE_ARANGOSH_OUTPUT{AQLEXP_01_axplainer}
~addIgnoreCollection("test")
~db._drop("test");
db._create("test");
for (i = 0; i < 100; ++i) { db.test.save({ value: i }); }
db.test.ensureIndex({ type: "skiplist", fields: [ "value" ] });

View File

@ -78,6 +78,7 @@ Create a geo index for a hash array attribute:
@startDocuBlockInline geoIndexCreateForArrayAttribute2
@EXAMPLE_ARANGOSH_OUTPUT{geoIndexCreateForArrayAttribute2}
~db._drop("geo2")
~db._create("geo2")
db.geo2.ensureIndex({ type: "geo", fields: [ "location.latitude", "location.longitude" ] });
| for (i = -90; i <= 90; i += 10) {

View File

@ -49,6 +49,7 @@ FOR doc IN NEAR(@@collection, @latitude, @longitude, @limit)
To get the nearest two locations:
@EXAMPLE_ARANGOSH_OUTPUT{007_collectionNear}
~ db._drop("geo");
~ db._create("geo");
db.geo.ensureIndex({ type: "geo", fields: [ "loc" ] });
|for (var i = -90; i <= 90; i += 10) {

View File

@ -40,11 +40,12 @@ const ArangoError = arangodb.ArangoError;
// converts a user document to the legacy format
const convertToLegacyFormat = function (doc) {
let ad = doc.authData || {};
return {
user: doc.user,
active: doc.authData.active,
active: ad.active,
extra: doc.userData || {},
changePassword: doc.authData.changePassword
changePassword: ad.changePassword
};
};