mirror of https://gitee.com/bigwinds/arangodb
fixed code of some examples
This commit is contained in:
parent
392e8233eb
commit
238070b477
|
@ -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" ] });
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue