mirror of https://gitee.com/bigwinds/arangodb
Rename codeblocks so they deliver a uniq match.
This commit is contained in:
parent
7524c21f3a
commit
8ae47f5efe
|
@ -367,14 +367,14 @@ the graph and *m* the average amount of connected edges;
|
|||
|
||||
Return all paths of the graph "social":
|
||||
|
||||
@startDocuBlockInline generalGraphPaths
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphPaths}
|
||||
@startDocuBlockInline generalGraphPaths1
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphPaths1}
|
||||
var examples = require("@arangodb/graph-examples/example-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
db._query("RETURN GRAPH_PATHS('social')").toArray();
|
||||
~ examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphPaths
|
||||
@endDocuBlock generalGraphPaths1
|
||||
|
||||
Return all inbound paths of the graph "social" with a maximal
|
||||
length of 1 and a minimal length of 2:
|
||||
|
|
|
@ -20,11 +20,11 @@ end users. End users should access collections using the collection name.
|
|||
|
||||
Get a collection by name:
|
||||
|
||||
@startDocuBlockInline collectionDatabaseName
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseName}
|
||||
@startDocuBlockInline collectionDatabaseNameKnown
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseNameKnown}
|
||||
db._collection("demo");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock collectionDatabaseName
|
||||
@endDocuBlock collectionDatabaseNameKnown
|
||||
|
||||
Get a collection by id:
|
||||
|
||||
|
@ -133,13 +133,13 @@ or *edge*. On default it is document. Instead of giving a type you can also use
|
|||
|
||||
With defaults:
|
||||
|
||||
@startDocuBlockInline collectionDatabaseCreate
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseCreate}
|
||||
@startDocuBlockInline collectionDatabaseCreateSuccess
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseCreateSuccess}
|
||||
c = db._create("users");
|
||||
c.properties();
|
||||
~ db._drop("users");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock collectionDatabaseCreate
|
||||
@endDocuBlock collectionDatabaseCreateSuccess
|
||||
|
||||
With properties:
|
||||
|
||||
|
@ -278,15 +278,15 @@ is thrown if there is no such collection.
|
|||
|
||||
Drops a collection:
|
||||
|
||||
@startDocuBlockInline collectionDatabaseDrop
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseDrop}
|
||||
@startDocuBlockInline collectionDatabaseDropByObject
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseDropByObject}
|
||||
~ db._create("example");
|
||||
col = db.example;
|
||||
db._drop(col);
|
||||
col;
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock collectionDatabaseDrop
|
||||
@endDocuBlock collectionDatabaseDropByObject
|
||||
|
||||
Drops a collection identified by name:
|
||||
|
||||
|
@ -325,8 +325,8 @@ there is no such collection.
|
|||
|
||||
Truncates a collection:
|
||||
|
||||
@startDocuBlockInline collectionDatabaseTruncate
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseTruncate}
|
||||
@startDocuBlockInline collectionDatabaseTruncateByObject
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseTruncateByObject}
|
||||
~ db._create("example");
|
||||
col = db.example;
|
||||
col.save({ "Hello" : "World" });
|
||||
|
@ -335,7 +335,7 @@ Truncates a collection:
|
|||
col.count();
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock collectionDatabaseTruncate
|
||||
@endDocuBlock collectionDatabaseTruncateByObject
|
||||
|
||||
Truncates a collection identified by name:
|
||||
|
||||
|
|
|
@ -219,8 +219,8 @@ argument.
|
|||
|
||||
Remove a document:
|
||||
|
||||
@startDocuBlockInline documentsCollectionRemove
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionRemove}
|
||||
@startDocuBlockInline documentsCollectionRemoveSuccess
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionRemoveSuccess}
|
||||
~ db._create("example");
|
||||
a1 = db.example.insert({ a : 1 });
|
||||
db._remove(a1);
|
||||
|
@ -228,7 +228,7 @@ Remove a document:
|
|||
db._remove(a1, true);
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionRemove
|
||||
@endDocuBlock documentsCollectionRemoveSuccess
|
||||
|
||||
Remove a document with a conflict:
|
||||
|
||||
|
|
|
@ -338,14 +338,14 @@ first argument.
|
|||
|
||||
Returns the document for a document-handle:
|
||||
|
||||
@startDocuBlockInline documentsCollectionName
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionName}
|
||||
@startDocuBlockInline documentsCollectionNameValid
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionNameValid}
|
||||
~ db._create("example");
|
||||
~ var myid = db.example.insert({_key: "2873916"});
|
||||
db.example.document("example/2873916");
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionName
|
||||
@endDocuBlock documentsCollectionNameValid
|
||||
|
||||
An error is raised if the document is unknown:
|
||||
|
||||
|
@ -522,15 +522,15 @@ first argument.
|
|||
|
||||
Create and update a document:
|
||||
|
||||
@startDocuBlockInline documentsCollectionReplace
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionReplace}
|
||||
@startDocuBlockInline documentsCollectionReplace1
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionReplace1}
|
||||
~ db._create("example");
|
||||
a1 = db.example.insert({ a : 1 });
|
||||
a2 = db.example.replace(a1, { a : 2 });
|
||||
a3 = db.example.replace(a1, { a : 3 }); // xpError(ERROR_ARANGO_CONFLICT);
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionReplace
|
||||
@endDocuBlock documentsCollectionReplace1
|
||||
|
||||
Use a document handle:
|
||||
|
||||
|
@ -599,8 +599,8 @@ first argument.
|
|||
|
||||
Create and update a document:
|
||||
|
||||
@startDocuBlockInline documentsCollectionUpdate
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionUpdate}
|
||||
@startDocuBlockInline documentsCollection_UpdateDocument
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollection_UpdateDocument}
|
||||
~ db._create("example");
|
||||
a1 = db.example.insert({"a" : 1});
|
||||
a2 = db.example.update(a1, {"b" : 2, "c" : 3});
|
||||
|
@ -611,24 +611,24 @@ Create and update a document:
|
|||
db.example.document(a5);
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionUpdate
|
||||
@endDocuBlock documentsCollection_UpdateDocument
|
||||
|
||||
Use a document handle:
|
||||
|
||||
@startDocuBlockInline documentsCollectionUpdateHandle
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionUpdateHandle}
|
||||
@startDocuBlockInline documentsCollection_UpdateHandleSingle
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollection_UpdateHandleSingle}
|
||||
~ db._create("example");
|
||||
~ var myid = db.example.insert({_key: "18612115"});
|
||||
a1 = db.example.insert({"a" : 1});
|
||||
a2 = db.example.update("example/18612115", { "x" : 1, "y" : 2 });
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionUpdateHandle
|
||||
@endDocuBlock documentsCollection_UpdateHandleSingle
|
||||
|
||||
Use the keepNull parameter to remove attributes with null values:
|
||||
|
||||
@startDocuBlockInline documentsCollectionUpdateHandleKeepNull
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionUpdateHandleKeepNull}
|
||||
@startDocuBlockInline documentsCollection_UpdateHandleKeepNull
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollection_UpdateHandleKeepNull}
|
||||
~ db._create("example");
|
||||
~ var myid = db.example.insert({_key: "19988371"});
|
||||
db.example.insert({"a" : 1});
|
||||
|
@ -642,12 +642,12 @@ Use the keepNull parameter to remove attributes with null values:
|
|||
db.example.document("example/19988371");
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionUpdateHandleKeepNull
|
||||
@endDocuBlock documentsCollection_UpdateHandleKeepNull
|
||||
|
||||
Patching array values:
|
||||
|
||||
@startDocuBlockInline documentsCollectionUpdateHandleArray
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionUpdateHandleArray}
|
||||
@startDocuBlockInline documentsCollection_UpdateHandleArray
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollection_UpdateHandleArray}
|
||||
~ db._create("example");
|
||||
~ var myid = db.example.insert({_key: "20774803"});
|
||||
| db.example.insert({"a" : { "one" : 1, "two" : 2, "three" : 3 },
|
||||
|
@ -661,7 +661,7 @@ Patching array values:
|
|||
db.example.document("example/20774803");
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionUpdateHandleArray
|
||||
@endDocuBlock documentsCollection_UpdateHandleArray
|
||||
|
||||
|
||||
|
||||
|
@ -703,8 +703,8 @@ first argument.
|
|||
|
||||
Remove a document:
|
||||
|
||||
@startDocuBlockInline documentDocumentRemove
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentDocumentRemove}
|
||||
@startDocuBlockInline documentDocumentRemoveSimple
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentDocumentRemoveSimple}
|
||||
~ db._create("example");
|
||||
a1 = db.example.insert({ a : 1 });
|
||||
db.example.document(a1);
|
||||
|
@ -712,7 +712,7 @@ Remove a document:
|
|||
db.example.document(a1); // xpError(ERROR_ARANGO_DOCUMENT_NOT_FOUND);
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentDocumentRemove
|
||||
@endDocuBlock documentDocumentRemoveSimple
|
||||
|
||||
Remove a document with a conflict:
|
||||
|
||||
|
@ -939,15 +939,15 @@ one shard.
|
|||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlockInline documentsCollectionFirst
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionFirst}
|
||||
@startDocuBlockInline documentsCollectionFirstSuccess
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionFirstSuccess}
|
||||
~ db._create("example");
|
||||
~ db.example.save({ Hello : "world" });
|
||||
~ db.example.save({ Foo : "bar" });
|
||||
db.example.first(1);
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionFirst
|
||||
@endDocuBlock documentsCollectionFirstSuccess
|
||||
|
||||
@startDocuBlockInline documentsCollectionFirstNull
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionFirstNull}
|
||||
|
@ -985,15 +985,15 @@ one shard.
|
|||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlockInline documentsCollectionLast
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionLast}
|
||||
@startDocuBlockInline documentsCollectionLastFound
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionLastFound}
|
||||
~ db._create("example");
|
||||
~ db.example.save({ Hello : "world" });
|
||||
~ db.example.save({ Foo : "bar" });
|
||||
db.example.last(2);
|
||||
~ db._drop("example");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock documentsCollectionLast
|
||||
@endDocuBlock documentsCollectionLastFound
|
||||
|
||||
@startDocuBlockInline documentsCollectionLastNull
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionLastNull}
|
||||
|
|
|
@ -175,15 +175,15 @@ will execute it and create the cursor for you.
|
|||
|
||||
Start query execution with hasNext:
|
||||
|
||||
@startDocuBlockInline generalGraphFluentAQLHasNext
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLHasNext}
|
||||
@startDocuBlockInline generalGraphFluentAQLHasNextFirst
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLHasNextFirst}
|
||||
var examples = require("@arangodb/graph-examples/example-graph.js");
|
||||
var graph = examples.loadGraph("social");
|
||||
var query = graph._vertices();
|
||||
query.hasNext();
|
||||
~ examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphFluentAQLHasNext
|
||||
@endDocuBlock generalGraphFluentAQLHasNextFirst
|
||||
|
||||
Iterate over the result as long as it has more elements:
|
||||
|
||||
|
@ -236,8 +236,8 @@ Request some elements with next:
|
|||
|
||||
The cursor is recreated if the query is changed:
|
||||
|
||||
@startDocuBlockInline generalGraphFluentAQLNextRecreate
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLNextRecreate}
|
||||
@startDocuBlockInline generalGraphFluentAQLRecreateNext
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLRecreateNext}
|
||||
var examples = require("@arangodb/graph-examples/example-graph.js");
|
||||
var graph = examples.loadGraph("social");
|
||||
var query = graph._vertices();
|
||||
|
@ -246,7 +246,7 @@ The cursor is recreated if the query is changed:
|
|||
query.next();
|
||||
~ examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphFluentAQLNextRecreate
|
||||
@endDocuBlock generalGraphFluentAQLRecreateNext
|
||||
|
||||
|
||||
!SUBSECTION Count
|
||||
|
@ -670,7 +670,7 @@ To request unfiltered neighbors:
|
|||
query.neighbors().toArray();
|
||||
~ examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphFluentAQLToVerticesFilteredMultiple
|
||||
@endDocuBlock generalGraphFluentAQLNeighborsUnfiltered
|
||||
|
||||
To request filtered neighbors by a single example:
|
||||
|
||||
|
@ -735,15 +735,15 @@ Request all directly connected vertices unrestricted:
|
|||
|
||||
Apply a restriction to the directly connected vertices:
|
||||
|
||||
@startDocuBlockInline generalGraphFluentAQLRestricted
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLRestricted}
|
||||
@startDocuBlockInline generalGraphFluentAQLRestrictedVertices
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLRestrictedVertices}
|
||||
var examples = require("@arangodb/graph-examples/example-graph.js");
|
||||
var graph = examples.loadGraph("social");
|
||||
var query = graph._vertices({name: "Alice"});
|
||||
query.edges().vertices().restrict("female").toArray();
|
||||
~ examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphFluentAQLRestricted
|
||||
@endDocuBlock generalGraphFluentAQLRestrictedVertices
|
||||
|
||||
Restriction of a query is only valid for collections known to the graph:
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ Returns the vertex defined with the attribute *_to* of the edge with *edgeId* as
|
|||
graph._toVertex("relation/aliceAndBob")
|
||||
~ examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphGetFromVertex
|
||||
@endDocuBlock generalGraphGetToVertex
|
||||
|
||||
|
||||
|
||||
|
@ -339,14 +339,14 @@ An object containing options, see below:
|
|||
|
||||
Return all paths of the graph "social":
|
||||
|
||||
@startDocuBlockInline generalGraphModulePaths
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphModulePaths}
|
||||
@startDocuBlockInline generalGraphModulePaths1
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphModulePaths1}
|
||||
var examples = require("@arangodb/graph-examples/example-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
g._paths();
|
||||
~ examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphModulePaths
|
||||
@endDocuBlock generalGraphModulePaths1
|
||||
|
||||
Return all inbound paths of the graph "social" with a maximal
|
||||
length of 1 and a minimal length of 2:
|
||||
|
|
|
@ -25,14 +25,14 @@ An object representing a definition of one relation in the graph
|
|||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlockInline generalGraphEdgeDefinitions
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitions}
|
||||
@startDocuBlockInline generalGraphEdgeDefinitionsSimple
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitionsSimple}
|
||||
var graph_module = require("@arangodb/general-graph");
|
||||
directed_relation = graph_module._relation("lives_in", "user", "city");
|
||||
undirected_relation = graph_module._relation("knows", "user", "user");
|
||||
edgedefinitions = graph_module._edgeDefinitions(directed_relation, undirected_relation);
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphEdgeDefinitions
|
||||
@endDocuBlock generalGraphEdgeDefinitionsSimple
|
||||
|
||||
|
||||
|
||||
|
@ -99,12 +99,12 @@ to any collection in *toVertexCollections*.
|
|||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlockInline generalGraphRelationDefinition
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphRelationDefinition}
|
||||
@startDocuBlockInline generalGraphRelationDefinitionSave
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphRelationDefinitionSave}
|
||||
var graph_module = require("@arangodb/general-graph");
|
||||
graph_module._relation("has_bought", ["Customer", "Company"], ["Groceries", "Electronics"]);
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphRelationDefinition
|
||||
@endDocuBlock generalGraphRelationDefinitionSave
|
||||
|
||||
@startDocuBlockInline generalGraphRelationDefinitionSingle
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphRelationDefinitionSingle}
|
||||
|
@ -240,13 +240,13 @@ List of additional vertex collection names
|
|||
|
||||
Create an empty graph, edge definitions can be added at runtime:
|
||||
|
||||
@startDocuBlockInline generalGraphCreateGraph
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphCreateGraph}
|
||||
@startDocuBlockInline generalGraphCreateGraphNoData
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphCreateGraphNoData}
|
||||
var graph_module = require("@arangodb/general-graph");
|
||||
graph = graph_module._create("myGraph");
|
||||
~ graph_module._drop("myGraph", true);
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock generalGraphCreateGraph
|
||||
@endDocuBlock generalGraphCreateGraphNoData
|
||||
|
||||
Create a graph using an edge collection `edges` and a single vertex collection `vertices`
|
||||
|
||||
|
@ -529,8 +529,8 @@ Define if the edge collection should be dropped. Default false.
|
|||
|
||||
Remove an edge definition but keep the edge collection:
|
||||
|
||||
@startDocuBlockInline general_graph__deleteEdgeDefinition
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{general_graph__deleteEdgeDefinition}
|
||||
@startDocuBlockInline general_graph__deleteEdgeDefinitionNoDrop
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{general_graph__deleteEdgeDefinitionNoDrop}
|
||||
var graph_module = require("@arangodb/general-graph")
|
||||
~ if (graph_module._exists("myGraph")){var blub = graph_module._drop("myGraph", true);}
|
||||
var ed1 = graph_module._relation("myEC1", ["myVC1"], ["myVC2"]);
|
||||
|
@ -541,7 +541,7 @@ Remove an edge definition but keep the edge collection:
|
|||
~ db._drop("myEC1");
|
||||
~ var blub = graph_module._drop("myGraph", true);
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock general_graph__deleteEdgeDefinition
|
||||
@endDocuBlock general_graph__deleteEdgeDefinitionNoDrop
|
||||
|
||||
Remove an edge definition and drop the edge collection:
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ details, including the index-identifier, is returned.
|
|||
|
||||
Create a geo index for an array attribute:
|
||||
|
||||
@startDocuBlockInline geoIndexCreateForArrayAttribute
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{geoIndexCreateForArrayAttribute}
|
||||
@startDocuBlockInline geoIndexCreateForArrayAttribute1
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{geoIndexCreateForArrayAttribute1}
|
||||
~db._create("geo")
|
||||
db.geo.ensureIndex({ type: "geo", fields: [ "loc" ] });
|
||||
| for (i = -90; i <= 90; i += 10) {
|
||||
|
@ -66,7 +66,7 @@ Create a geo index for an array attribute:
|
|||
db.geo.near(0, 0).count();
|
||||
~db._drop("geo")
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock geoIndexCreateForArrayAttribute
|
||||
@endDocuBlock geoIndexCreateForArrayAttribute1
|
||||
|
||||
Create a geo index for a hash array attribute:
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ account for uniqueness checks.
|
|||
In case that the index was successfully created, an object with the index
|
||||
details, including the index-identifier, is returned.
|
||||
|
||||
@startDocuBlockInline ensureUniqueSkiplist
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{ensureUniqueSkiplist}
|
||||
@startDocuBlockInline ensureUniqueSkiplistSingle
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{ensureUniqueSkiplistSingle}
|
||||
~db._create("ids");
|
||||
db.ids.ensureIndex({ type: "skiplist", fields: [ "myId" ], unique: true });
|
||||
db.ids.save({ "myId": 123 });
|
||||
|
@ -57,7 +57,7 @@ details, including the index-identifier, is returned.
|
|||
db.ids.save({ "myId": 123 }); // xpError(ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED)
|
||||
~db._drop("ids");
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock ensureUniqueSkiplist
|
||||
@endDocuBlock ensureUniqueSkiplistSingle
|
||||
|
||||
@startDocuBlockInline ensureUniqueSkiplistMultiColmun
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{ensureUniqueSkiplistMultiColmun}
|
||||
|
|
|
@ -112,8 +112,8 @@ The batchSize cannot be adjusted after the query is first executed.
|
|||
means of fetching the query results is chosen. The following two approaches
|
||||
lead to the same result:
|
||||
|
||||
@startDocuBlockInline executeQuery
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{executeQuery}
|
||||
@startDocuBlockInline executeQueryNoBatchSize
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{executeQueryNoBatchSize}
|
||||
~ db._create("users");
|
||||
~ db.users.save({ name: "Gerhard" });
|
||||
~ db.users.save({ name: "Helmut" });
|
||||
|
@ -122,7 +122,7 @@ lead to the same result:
|
|||
q = db.users.all(); q.execute(); result = [ ]; while (q.hasNext()) { result.push(q.next()); }
|
||||
~ db._drop("users")
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock executeQuery
|
||||
@endDocuBlock executeQueryNoBatchSize
|
||||
|
||||
The following two alternatives both use a batchSize and return the same
|
||||
result:
|
||||
|
@ -181,8 +181,8 @@ returned.
|
|||
|
||||
Ignore any limit:
|
||||
|
||||
@startDocuBlockInline cursorCount
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{cursorCount}
|
||||
@startDocuBlockInline cursorCountUnLimited
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{cursorCountUnLimited}
|
||||
~ db._create("five");
|
||||
~ db.five.save({ name : "one" });
|
||||
~ db.five.save({ name : "two" });
|
||||
|
@ -192,7 +192,7 @@ Ignore any limit:
|
|||
db.five.all().limit(2).count();
|
||||
~ db._drop("five")
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
@endDocuBlock cursorCount
|
||||
@endDocuBlock cursorCountUnLimited
|
||||
|
||||
Counting any limit or skip:
|
||||
|
||||
|
|
Loading…
Reference in New Issue