1
0
Fork 0

Rename codeblocks so they deliver a uniq match.

This commit is contained in:
Wilfried Goesgens 2016-01-12 18:22:11 +01:00
parent 7524c21f3a
commit 8ae47f5efe
10 changed files with 83 additions and 83 deletions

View File

@ -367,14 +367,14 @@ the graph and *m* the average amount of connected edges;
Return all paths of the graph "social": Return all paths of the graph "social":
@startDocuBlockInline generalGraphPaths @startDocuBlockInline generalGraphPaths1
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphPaths} @EXAMPLE_ARANGOSH_OUTPUT{generalGraphPaths1}
var examples = require("@arangodb/graph-examples/example-graph.js"); var examples = require("@arangodb/graph-examples/example-graph.js");
var g = examples.loadGraph("social"); var g = examples.loadGraph("social");
db._query("RETURN GRAPH_PATHS('social')").toArray(); db._query("RETURN GRAPH_PATHS('social')").toArray();
~ examples.dropGraph("social"); ~ examples.dropGraph("social");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphPaths @endDocuBlock generalGraphPaths1
Return all inbound paths of the graph "social" with a maximal Return all inbound paths of the graph "social" with a maximal
length of 1 and a minimal length of 2: length of 1 and a minimal length of 2:

View File

@ -20,11 +20,11 @@ end users. End users should access collections using the collection name.
Get a collection by name: Get a collection by name:
@startDocuBlockInline collectionDatabaseName @startDocuBlockInline collectionDatabaseNameKnown
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseName} @EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseNameKnown}
db._collection("demo"); db._collection("demo");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock collectionDatabaseName @endDocuBlock collectionDatabaseNameKnown
Get a collection by id: 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: With defaults:
@startDocuBlockInline collectionDatabaseCreate @startDocuBlockInline collectionDatabaseCreateSuccess
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseCreate} @EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseCreateSuccess}
c = db._create("users"); c = db._create("users");
c.properties(); c.properties();
~ db._drop("users"); ~ db._drop("users");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock collectionDatabaseCreate @endDocuBlock collectionDatabaseCreateSuccess
With properties: With properties:
@ -278,15 +278,15 @@ is thrown if there is no such collection.
Drops a collection: Drops a collection:
@startDocuBlockInline collectionDatabaseDrop @startDocuBlockInline collectionDatabaseDropByObject
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseDrop} @EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseDropByObject}
~ db._create("example"); ~ db._create("example");
col = db.example; col = db.example;
db._drop(col); db._drop(col);
col; col;
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock collectionDatabaseDrop @endDocuBlock collectionDatabaseDropByObject
Drops a collection identified by name: Drops a collection identified by name:
@ -325,8 +325,8 @@ there is no such collection.
Truncates a collection: Truncates a collection:
@startDocuBlockInline collectionDatabaseTruncate @startDocuBlockInline collectionDatabaseTruncateByObject
@EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseTruncate} @EXAMPLE_ARANGOSH_OUTPUT{collectionDatabaseTruncateByObject}
~ db._create("example"); ~ db._create("example");
col = db.example; col = db.example;
col.save({ "Hello" : "World" }); col.save({ "Hello" : "World" });
@ -335,7 +335,7 @@ Truncates a collection:
col.count(); col.count();
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock collectionDatabaseTruncate @endDocuBlock collectionDatabaseTruncateByObject
Truncates a collection identified by name: Truncates a collection identified by name:

View File

@ -219,8 +219,8 @@ argument.
Remove a document: Remove a document:
@startDocuBlockInline documentsCollectionRemove @startDocuBlockInline documentsCollectionRemoveSuccess
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionRemove} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionRemoveSuccess}
~ db._create("example"); ~ db._create("example");
a1 = db.example.insert({ a : 1 }); a1 = db.example.insert({ a : 1 });
db._remove(a1); db._remove(a1);
@ -228,7 +228,7 @@ Remove a document:
db._remove(a1, true); db._remove(a1, true);
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionRemove @endDocuBlock documentsCollectionRemoveSuccess
Remove a document with a conflict: Remove a document with a conflict:

View File

@ -338,14 +338,14 @@ first argument.
Returns the document for a document-handle: Returns the document for a document-handle:
@startDocuBlockInline documentsCollectionName @startDocuBlockInline documentsCollectionNameValid
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionName} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionNameValid}
~ db._create("example"); ~ db._create("example");
~ var myid = db.example.insert({_key: "2873916"}); ~ var myid = db.example.insert({_key: "2873916"});
db.example.document("example/2873916"); db.example.document("example/2873916");
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionName @endDocuBlock documentsCollectionNameValid
An error is raised if the document is unknown: An error is raised if the document is unknown:
@ -522,15 +522,15 @@ first argument.
Create and update a document: Create and update a document:
@startDocuBlockInline documentsCollectionReplace @startDocuBlockInline documentsCollectionReplace1
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionReplace} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionReplace1}
~ db._create("example"); ~ db._create("example");
a1 = db.example.insert({ a : 1 }); a1 = db.example.insert({ a : 1 });
a2 = db.example.replace(a1, { a : 2 }); a2 = db.example.replace(a1, { a : 2 });
a3 = db.example.replace(a1, { a : 3 }); // xpError(ERROR_ARANGO_CONFLICT); a3 = db.example.replace(a1, { a : 3 }); // xpError(ERROR_ARANGO_CONFLICT);
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionReplace @endDocuBlock documentsCollectionReplace1
Use a document handle: Use a document handle:
@ -599,8 +599,8 @@ first argument.
Create and update a document: Create and update a document:
@startDocuBlockInline documentsCollectionUpdate @startDocuBlockInline documentsCollection_UpdateDocument
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionUpdate} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollection_UpdateDocument}
~ db._create("example"); ~ db._create("example");
a1 = db.example.insert({"a" : 1}); a1 = db.example.insert({"a" : 1});
a2 = db.example.update(a1, {"b" : 2, "c" : 3}); a2 = db.example.update(a1, {"b" : 2, "c" : 3});
@ -611,24 +611,24 @@ Create and update a document:
db.example.document(a5); db.example.document(a5);
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionUpdate @endDocuBlock documentsCollection_UpdateDocument
Use a document handle: Use a document handle:
@startDocuBlockInline documentsCollectionUpdateHandle @startDocuBlockInline documentsCollection_UpdateHandleSingle
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionUpdateHandle} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollection_UpdateHandleSingle}
~ db._create("example"); ~ db._create("example");
~ var myid = db.example.insert({_key: "18612115"}); ~ var myid = db.example.insert({_key: "18612115"});
a1 = db.example.insert({"a" : 1}); a1 = db.example.insert({"a" : 1});
a2 = db.example.update("example/18612115", { "x" : 1, "y" : 2 }); a2 = db.example.update("example/18612115", { "x" : 1, "y" : 2 });
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionUpdateHandle @endDocuBlock documentsCollection_UpdateHandleSingle
Use the keepNull parameter to remove attributes with null values: Use the keepNull parameter to remove attributes with null values:
@startDocuBlockInline documentsCollectionUpdateHandleKeepNull @startDocuBlockInline documentsCollection_UpdateHandleKeepNull
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionUpdateHandleKeepNull} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollection_UpdateHandleKeepNull}
~ db._create("example"); ~ db._create("example");
~ var myid = db.example.insert({_key: "19988371"}); ~ var myid = db.example.insert({_key: "19988371"});
db.example.insert({"a" : 1}); 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.example.document("example/19988371");
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionUpdateHandleKeepNull @endDocuBlock documentsCollection_UpdateHandleKeepNull
Patching array values: Patching array values:
@startDocuBlockInline documentsCollectionUpdateHandleArray @startDocuBlockInline documentsCollection_UpdateHandleArray
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionUpdateHandleArray} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollection_UpdateHandleArray}
~ db._create("example"); ~ db._create("example");
~ var myid = db.example.insert({_key: "20774803"}); ~ var myid = db.example.insert({_key: "20774803"});
| db.example.insert({"a" : { "one" : 1, "two" : 2, "three" : 3 }, | db.example.insert({"a" : { "one" : 1, "two" : 2, "three" : 3 },
@ -661,7 +661,7 @@ Patching array values:
db.example.document("example/20774803"); db.example.document("example/20774803");
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionUpdateHandleArray @endDocuBlock documentsCollection_UpdateHandleArray
@ -703,8 +703,8 @@ first argument.
Remove a document: Remove a document:
@startDocuBlockInline documentDocumentRemove @startDocuBlockInline documentDocumentRemoveSimple
@EXAMPLE_ARANGOSH_OUTPUT{documentDocumentRemove} @EXAMPLE_ARANGOSH_OUTPUT{documentDocumentRemoveSimple}
~ db._create("example"); ~ db._create("example");
a1 = db.example.insert({ a : 1 }); a1 = db.example.insert({ a : 1 });
db.example.document(a1); db.example.document(a1);
@ -712,7 +712,7 @@ Remove a document:
db.example.document(a1); // xpError(ERROR_ARANGO_DOCUMENT_NOT_FOUND); db.example.document(a1); // xpError(ERROR_ARANGO_DOCUMENT_NOT_FOUND);
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentDocumentRemove @endDocuBlock documentDocumentRemoveSimple
Remove a document with a conflict: Remove a document with a conflict:
@ -939,15 +939,15 @@ one shard.
@EXAMPLES @EXAMPLES
@startDocuBlockInline documentsCollectionFirst @startDocuBlockInline documentsCollectionFirstSuccess
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionFirst} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionFirstSuccess}
~ db._create("example"); ~ db._create("example");
~ db.example.save({ Hello : "world" }); ~ db.example.save({ Hello : "world" });
~ db.example.save({ Foo : "bar" }); ~ db.example.save({ Foo : "bar" });
db.example.first(1); db.example.first(1);
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionFirst @endDocuBlock documentsCollectionFirstSuccess
@startDocuBlockInline documentsCollectionFirstNull @startDocuBlockInline documentsCollectionFirstNull
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionFirstNull} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionFirstNull}
@ -985,15 +985,15 @@ one shard.
@EXAMPLES @EXAMPLES
@startDocuBlockInline documentsCollectionLast @startDocuBlockInline documentsCollectionLastFound
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionLast} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionLastFound}
~ db._create("example"); ~ db._create("example");
~ db.example.save({ Hello : "world" }); ~ db.example.save({ Hello : "world" });
~ db.example.save({ Foo : "bar" }); ~ db.example.save({ Foo : "bar" });
db.example.last(2); db.example.last(2);
~ db._drop("example"); ~ db._drop("example");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock documentsCollectionLast @endDocuBlock documentsCollectionLastFound
@startDocuBlockInline documentsCollectionLastNull @startDocuBlockInline documentsCollectionLastNull
@EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionLastNull} @EXAMPLE_ARANGOSH_OUTPUT{documentsCollectionLastNull}

View File

@ -175,15 +175,15 @@ will execute it and create the cursor for you.
Start query execution with hasNext: Start query execution with hasNext:
@startDocuBlockInline generalGraphFluentAQLHasNext @startDocuBlockInline generalGraphFluentAQLHasNextFirst
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLHasNext} @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLHasNextFirst}
var examples = require("@arangodb/graph-examples/example-graph.js"); var examples = require("@arangodb/graph-examples/example-graph.js");
var graph = examples.loadGraph("social"); var graph = examples.loadGraph("social");
var query = graph._vertices(); var query = graph._vertices();
query.hasNext(); query.hasNext();
~ examples.dropGraph("social"); ~ examples.dropGraph("social");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphFluentAQLHasNext @endDocuBlock generalGraphFluentAQLHasNextFirst
Iterate over the result as long as it has more elements: 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: The cursor is recreated if the query is changed:
@startDocuBlockInline generalGraphFluentAQLNextRecreate @startDocuBlockInline generalGraphFluentAQLRecreateNext
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLNextRecreate} @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLRecreateNext}
var examples = require("@arangodb/graph-examples/example-graph.js"); var examples = require("@arangodb/graph-examples/example-graph.js");
var graph = examples.loadGraph("social"); var graph = examples.loadGraph("social");
var query = graph._vertices(); var query = graph._vertices();
@ -246,7 +246,7 @@ The cursor is recreated if the query is changed:
query.next(); query.next();
~ examples.dropGraph("social"); ~ examples.dropGraph("social");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphFluentAQLNextRecreate @endDocuBlock generalGraphFluentAQLRecreateNext
!SUBSECTION Count !SUBSECTION Count
@ -670,7 +670,7 @@ To request unfiltered neighbors:
query.neighbors().toArray(); query.neighbors().toArray();
~ examples.dropGraph("social"); ~ examples.dropGraph("social");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphFluentAQLToVerticesFilteredMultiple @endDocuBlock generalGraphFluentAQLNeighborsUnfiltered
To request filtered neighbors by a single example: 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: Apply a restriction to the directly connected vertices:
@startDocuBlockInline generalGraphFluentAQLRestricted @startDocuBlockInline generalGraphFluentAQLRestrictedVertices
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLRestricted} @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLRestrictedVertices}
var examples = require("@arangodb/graph-examples/example-graph.js"); var examples = require("@arangodb/graph-examples/example-graph.js");
var graph = examples.loadGraph("social"); var graph = examples.loadGraph("social");
var query = graph._vertices({name: "Alice"}); var query = graph._vertices({name: "Alice"});
query.edges().vertices().restrict("female").toArray(); query.edges().vertices().restrict("female").toArray();
~ examples.dropGraph("social"); ~ examples.dropGraph("social");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphFluentAQLRestricted @endDocuBlock generalGraphFluentAQLRestrictedVertices
Restriction of a query is only valid for collections known to the graph: Restriction of a query is only valid for collections known to the graph:

View File

@ -67,7 +67,7 @@ Returns the vertex defined with the attribute *_to* of the edge with *edgeId* as
graph._toVertex("relation/aliceAndBob") graph._toVertex("relation/aliceAndBob")
~ examples.dropGraph("social"); ~ examples.dropGraph("social");
@END_EXAMPLE_ARANGOSH_OUTPUT @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": Return all paths of the graph "social":
@startDocuBlockInline generalGraphModulePaths @startDocuBlockInline generalGraphModulePaths1
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphModulePaths} @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModulePaths1}
var examples = require("@arangodb/graph-examples/example-graph.js"); var examples = require("@arangodb/graph-examples/example-graph.js");
var g = examples.loadGraph("social"); var g = examples.loadGraph("social");
g._paths(); g._paths();
~ examples.dropGraph("social"); ~ examples.dropGraph("social");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphModulePaths @endDocuBlock generalGraphModulePaths1
Return all inbound paths of the graph "social" with a maximal Return all inbound paths of the graph "social" with a maximal
length of 1 and a minimal length of 2: length of 1 and a minimal length of 2:

View File

@ -25,14 +25,14 @@ An object representing a definition of one relation in the graph
@EXAMPLES @EXAMPLES
@startDocuBlockInline generalGraphEdgeDefinitions @startDocuBlockInline generalGraphEdgeDefinitionsSimple
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitions} @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitionsSimple}
var graph_module = require("@arangodb/general-graph"); var graph_module = require("@arangodb/general-graph");
directed_relation = graph_module._relation("lives_in", "user", "city"); directed_relation = graph_module._relation("lives_in", "user", "city");
undirected_relation = graph_module._relation("knows", "user", "user"); undirected_relation = graph_module._relation("knows", "user", "user");
edgedefinitions = graph_module._edgeDefinitions(directed_relation, undirected_relation); edgedefinitions = graph_module._edgeDefinitions(directed_relation, undirected_relation);
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphEdgeDefinitions @endDocuBlock generalGraphEdgeDefinitionsSimple
@ -99,12 +99,12 @@ to any collection in *toVertexCollections*.
@EXAMPLES @EXAMPLES
@startDocuBlockInline generalGraphRelationDefinition @startDocuBlockInline generalGraphRelationDefinitionSave
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphRelationDefinition} @EXAMPLE_ARANGOSH_OUTPUT{generalGraphRelationDefinitionSave}
var graph_module = require("@arangodb/general-graph"); var graph_module = require("@arangodb/general-graph");
graph_module._relation("has_bought", ["Customer", "Company"], ["Groceries", "Electronics"]); graph_module._relation("has_bought", ["Customer", "Company"], ["Groceries", "Electronics"]);
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphRelationDefinition @endDocuBlock generalGraphRelationDefinitionSave
@startDocuBlockInline generalGraphRelationDefinitionSingle @startDocuBlockInline generalGraphRelationDefinitionSingle
@EXAMPLE_ARANGOSH_OUTPUT{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: Create an empty graph, edge definitions can be added at runtime:
@startDocuBlockInline generalGraphCreateGraph @startDocuBlockInline generalGraphCreateGraphNoData
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphCreateGraph} @EXAMPLE_ARANGOSH_OUTPUT{generalGraphCreateGraphNoData}
var graph_module = require("@arangodb/general-graph"); var graph_module = require("@arangodb/general-graph");
graph = graph_module._create("myGraph"); graph = graph_module._create("myGraph");
~ graph_module._drop("myGraph", true); ~ graph_module._drop("myGraph", true);
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock generalGraphCreateGraph @endDocuBlock generalGraphCreateGraphNoData
Create a graph using an edge collection `edges` and a single vertex collection `vertices` 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: Remove an edge definition but keep the edge collection:
@startDocuBlockInline general_graph__deleteEdgeDefinition @startDocuBlockInline general_graph__deleteEdgeDefinitionNoDrop
@EXAMPLE_ARANGOSH_OUTPUT{general_graph__deleteEdgeDefinition} @EXAMPLE_ARANGOSH_OUTPUT{general_graph__deleteEdgeDefinitionNoDrop}
var graph_module = require("@arangodb/general-graph") var graph_module = require("@arangodb/general-graph")
~ if (graph_module._exists("myGraph")){var blub = graph_module._drop("myGraph", true);} ~ if (graph_module._exists("myGraph")){var blub = graph_module._drop("myGraph", true);}
var ed1 = graph_module._relation("myEC1", ["myVC1"], ["myVC2"]); var ed1 = graph_module._relation("myEC1", ["myVC1"], ["myVC2"]);
@ -541,7 +541,7 @@ Remove an edge definition but keep the edge collection:
~ db._drop("myEC1"); ~ db._drop("myEC1");
~ var blub = graph_module._drop("myGraph", true); ~ var blub = graph_module._drop("myGraph", true);
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock general_graph__deleteEdgeDefinition @endDocuBlock general_graph__deleteEdgeDefinitionNoDrop
Remove an edge definition and drop the edge collection: Remove an edge definition and drop the edge collection:

View File

@ -52,8 +52,8 @@ details, including the index-identifier, is returned.
Create a geo index for an array attribute: Create a geo index for an array attribute:
@startDocuBlockInline geoIndexCreateForArrayAttribute @startDocuBlockInline geoIndexCreateForArrayAttribute1
@EXAMPLE_ARANGOSH_OUTPUT{geoIndexCreateForArrayAttribute} @EXAMPLE_ARANGOSH_OUTPUT{geoIndexCreateForArrayAttribute1}
~db._create("geo") ~db._create("geo")
db.geo.ensureIndex({ type: "geo", fields: [ "loc" ] }); db.geo.ensureIndex({ type: "geo", fields: [ "loc" ] });
| for (i = -90; i <= 90; i += 10) { | 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.geo.near(0, 0).count();
~db._drop("geo") ~db._drop("geo")
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock geoIndexCreateForArrayAttribute @endDocuBlock geoIndexCreateForArrayAttribute1
Create a geo index for a hash array attribute: Create a geo index for a hash array attribute:

View File

@ -47,8 +47,8 @@ account for uniqueness checks.
In case that the index was successfully created, an object with the index In case that the index was successfully created, an object with the index
details, including the index-identifier, is returned. details, including the index-identifier, is returned.
@startDocuBlockInline ensureUniqueSkiplist @startDocuBlockInline ensureUniqueSkiplistSingle
@EXAMPLE_ARANGOSH_OUTPUT{ensureUniqueSkiplist} @EXAMPLE_ARANGOSH_OUTPUT{ensureUniqueSkiplistSingle}
~db._create("ids"); ~db._create("ids");
db.ids.ensureIndex({ type: "skiplist", fields: [ "myId" ], unique: true }); db.ids.ensureIndex({ type: "skiplist", fields: [ "myId" ], unique: true });
db.ids.save({ "myId": 123 }); 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.ids.save({ "myId": 123 }); // xpError(ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED)
~db._drop("ids"); ~db._drop("ids");
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock ensureUniqueSkiplist @endDocuBlock ensureUniqueSkiplistSingle
@startDocuBlockInline ensureUniqueSkiplistMultiColmun @startDocuBlockInline ensureUniqueSkiplistMultiColmun
@EXAMPLE_ARANGOSH_OUTPUT{ensureUniqueSkiplistMultiColmun} @EXAMPLE_ARANGOSH_OUTPUT{ensureUniqueSkiplistMultiColmun}

View File

@ -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 means of fetching the query results is chosen. The following two approaches
lead to the same result: lead to the same result:
@startDocuBlockInline executeQuery @startDocuBlockInline executeQueryNoBatchSize
@EXAMPLE_ARANGOSH_OUTPUT{executeQuery} @EXAMPLE_ARANGOSH_OUTPUT{executeQueryNoBatchSize}
~ db._create("users"); ~ db._create("users");
~ db.users.save({ name: "Gerhard" }); ~ db.users.save({ name: "Gerhard" });
~ db.users.save({ name: "Helmut" }); ~ 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()); } q = db.users.all(); q.execute(); result = [ ]; while (q.hasNext()) { result.push(q.next()); }
~ db._drop("users") ~ db._drop("users")
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock executeQuery @endDocuBlock executeQueryNoBatchSize
The following two alternatives both use a batchSize and return the same The following two alternatives both use a batchSize and return the same
result: result:
@ -181,8 +181,8 @@ returned.
Ignore any limit: Ignore any limit:
@startDocuBlockInline cursorCount @startDocuBlockInline cursorCountUnLimited
@EXAMPLE_ARANGOSH_OUTPUT{cursorCount} @EXAMPLE_ARANGOSH_OUTPUT{cursorCountUnLimited}
~ db._create("five"); ~ db._create("five");
~ db.five.save({ name : "one" }); ~ db.five.save({ name : "one" });
~ db.five.save({ name : "two" }); ~ db.five.save({ name : "two" });
@ -192,7 +192,7 @@ Ignore any limit:
db.five.all().limit(2).count(); db.five.all().limit(2).count();
~ db._drop("five") ~ db._drop("five")
@END_EXAMPLE_ARANGOSH_OUTPUT @END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock cursorCount @endDocuBlock cursorCountUnLimited
Counting any limit or skip: Counting any limit or skip: