mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel
This commit is contained in:
commit
801cc84ce2
|
@ -22,88 +22,10 @@ Therefore you get exactly this two entry points:
|
|||
|
||||
<!-- @startDocuBlock JSF_general_graph_edges -->
|
||||
|
||||
Select some edges from the graph.
|
||||
<br />
|
||||
Creates an AQL statement to select a subset of the edges stored in the graph.
|
||||
This is one of the entry points for the fluent AQL interface.
|
||||
It will return a mutable AQL statement which can be further refined, using the
|
||||
functions described below.
|
||||
The resulting set of edges can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* Empty, there is no matching executed all edges are valid.
|
||||
* A string, only the edge having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only edges having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All edges matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
In the examples the `toArray` function is used to print the result.
|
||||
The description of this module can be found below.
|
||||
<br />
|
||||
To request unfiltered edges:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
g._edges().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered edges:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
g._edges({type: "married"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION Vertices
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_vertices -->
|
||||
|
||||
Select some vertices from the graph.
|
||||
<br />
|
||||
Creates an AQL statement to select a subset of the vertices stored in the graph.
|
||||
This is one of the entry points for the fluent AQL interface.
|
||||
It will return a mutable AQL statement which can be further refined, using the
|
||||
functions described below.
|
||||
The resulting set of edges can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* Empty, there is no matching executed all vertices are valid.
|
||||
* A string, only the vertex having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only vertices having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All vertices matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
In the examples the `toArray` function is used to print the result.
|
||||
The description of this module can be found below.
|
||||
<br />
|
||||
To request unfiltered vertices:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphVerticesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
g._vertices().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered vertices:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphVerticesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
g._vertices([{name: "Alice"}, {name: "Bob"}]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SECTION Working with the query cursor
|
||||
|
||||
The fluent query object handles cursor creation and maintenance for you.
|
||||
|
@ -116,127 +38,18 @@ The cursor functionality is described in this section.
|
|||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_toArray -->
|
||||
|
||||
Returns an array containing the complete result.
|
||||
<br />
|
||||
This function executes the generated query and returns the
|
||||
entire result as one array.
|
||||
ToArray does not return the generated query anymore and
|
||||
hence can only be the endpoint of a query.
|
||||
However keeping a reference to the query before
|
||||
executing allows to chain further statements to it.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
To collect the entire result of a query toArray can be used:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices();
|
||||
query.toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION HasNext
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_hasNext -->
|
||||
|
||||
Checks if the query has further results.
|
||||
<br />
|
||||
The generated statement maintains a cursor for you.
|
||||
If this cursor is already present `hasNext()` will
|
||||
use this cursors position to determine if there are
|
||||
further results available.
|
||||
If the query has not yet been executed `hasNext()`
|
||||
will execute it and create the cursor for you.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
Start query execution with hasNext:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices();
|
||||
query.hasNext();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
Iterate over the result as long as it has more elements:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices();
|
||||
while(query.hasNext()) {
|
||||
query.next();
|
||||
}
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION Next
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_next -->
|
||||
|
||||
Request the next element in the result
|
||||
<br />
|
||||
The generated statement maintains a cursor for you.
|
||||
If this cursor is already present `next()` will
|
||||
use this cursors position to deliver the next result.
|
||||
Also the cursor position will be moved by one.
|
||||
If the query has not yet been executed `next()`
|
||||
will execute it and create the cursor for you.
|
||||
It will throw an error of your query has no further results.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
Request some elements with next:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices();
|
||||
query.next();
|
||||
query.next();
|
||||
query.next();
|
||||
query.next();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
The cursor is recreated if the query is changed.
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices();
|
||||
query.next();
|
||||
query.edges();
|
||||
query.next();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION Count
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_count -->
|
||||
|
||||
Returns the number of returned elements if the query is executed.
|
||||
<br />
|
||||
This function determines the amount of elements to be expected within the result of the query.
|
||||
It can be used at the beginning of execution of the query
|
||||
before using `next()` or in between `next()` calls.
|
||||
The query object maintains a cursor of the query for you.
|
||||
`count()` does not change the cursor position.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
To count the number of matched elements:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices();
|
||||
query.count();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SECTION Fluent queries
|
||||
|
||||
After the selection of the entry point you can now query your graph in
|
||||
|
@ -248,496 +61,180 @@ In this section all available query statements are described.
|
|||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_edges -->
|
||||
|
||||
Select all edges for the vertices selected before
|
||||
<br />
|
||||
`graph-query.edges(examples)`
|
||||
*Select all edges for the vertices selected before.*
|
||||
|
||||
Creates an AQL statement to select all edges for each of the vertices selected
|
||||
in the step before.
|
||||
This will include `inbound` as well as `outbound` edges.
|
||||
The resulting set of edges can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
This will include *inbound* as well as *outbound* edges.
|
||||
The resulting set of edges can be filtered by defining one or more *examples*.
|
||||
<br />
|
||||
*examples* can have the following values:
|
||||
|
||||
* Empty, there is no matching executed all edges are valid.
|
||||
* A string, only the edge having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only edges having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All edges matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
|
||||
@EXAMPLES
|
||||
<br />
|
||||
|
||||
To request unfiltered edges:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLEdgesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.edges().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
|
||||
|
||||
```
|
||||
arangosh> var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
arangosh> var g = examples.loadGraph("social");
|
||||
arangosh> var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
arangosh> query.edges().toArray();
|
||||
[
|
||||
{
|
||||
"_id" : "relation/31670695",
|
||||
"_rev" : "31670695",
|
||||
"_key" : "31670695",
|
||||
"_from" : "female/30491047",
|
||||
"_to" : "male/30884263",
|
||||
"type" : "married"
|
||||
},
|
||||
{
|
||||
"_id" : "relation/31932839",
|
||||
"_rev" : "31932839",
|
||||
"_key" : "31932839",
|
||||
"_from" : "female/30491047",
|
||||
"_to" : "male/31080871",
|
||||
"type" : "friend"
|
||||
},
|
||||
{
|
||||
"_id" : "relation/31670695",
|
||||
"_rev" : "31670695",
|
||||
"_key" : "31670695",
|
||||
"_from" : "female/30491047",
|
||||
"_to" : "male/30884263",
|
||||
"type" : "married"
|
||||
},
|
||||
{
|
||||
"_id" : "relation/32326055",
|
||||
"_rev" : "32326055",
|
||||
"_key" : "32326055",
|
||||
"_from" : "male/30884263",
|
||||
"_to" : "female/31277479",
|
||||
"type" : "friend"
|
||||
}
|
||||
]
|
||||
arangosh> examples.dropGraph("social");
|
||||
undefined
|
||||
```
|
||||
<br />
|
||||
To request filtered edges by a single example:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLEdgesFilteredSingle}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.edges({type: "married"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
|
||||
```
|
||||
arangosh> var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
arangosh> var g = examples.loadGraph("social");
|
||||
arangosh> var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
arangosh> query.edges({type: "married"}).toArray();
|
||||
[
|
||||
{
|
||||
"_id" : "relation/31670695",
|
||||
"_rev" : "31670695",
|
||||
"_key" : "31670695",
|
||||
"_from" : "female/30491047",
|
||||
"_to" : "male/30884263",
|
||||
"type" : "married"
|
||||
},
|
||||
{
|
||||
"_id" : "relation/31670695",
|
||||
"_rev" : "31670695",
|
||||
"_key" : "31670695",
|
||||
"_from" : "female/30491047",
|
||||
"_to" : "male/30884263",
|
||||
"type" : "married"
|
||||
}
|
||||
]
|
||||
arangosh> examples.dropGraph("social");
|
||||
undefined
|
||||
```
|
||||
<br />
|
||||
To request filtered edges by multiple examples:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLEdgesFilteredMultiple}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.edges([{type: "married"}, {type: "friend"}]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
|
||||
```
|
||||
arangosh> var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
arangosh> var g = examples.loadGraph("social");
|
||||
arangosh> var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
arangosh> query.edges([{type: "married"}, {type: "friend"}]).toArray();
|
||||
[
|
||||
{
|
||||
"_id" : "relation/31670695",
|
||||
"_rev" : "31670695",
|
||||
"_key" : "31670695",
|
||||
"_from" : "female/30491047",
|
||||
"_to" : "male/30884263",
|
||||
"type" : "married"
|
||||
},
|
||||
{
|
||||
"_id" : "relation/31932839",
|
||||
"_rev" : "31932839",
|
||||
"_key" : "31932839",
|
||||
"_from" : "female/30491047",
|
||||
"_to" : "male/31080871",
|
||||
"type" : "friend"
|
||||
},
|
||||
{
|
||||
"_id" : "relation/31670695",
|
||||
"_rev" : "31670695",
|
||||
"_key" : "31670695",
|
||||
"_from" : "female/30491047",
|
||||
"_to" : "male/30884263",
|
||||
"type" : "married"
|
||||
},
|
||||
{
|
||||
"_id" : "relation/32326055",
|
||||
"_rev" : "32326055",
|
||||
"_key" : "32326055",
|
||||
"_from" : "male/30884263",
|
||||
"_to" : "female/31277479",
|
||||
"type" : "friend"
|
||||
}
|
||||
]
|
||||
arangosh> examples.dropGraph("social");
|
||||
undefined
|
||||
```
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION OutEdges
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_outEdges -->
|
||||
|
||||
Select all outbound edges for the vertices selected before
|
||||
<br />
|
||||
`graph-query.outEdges(examples)`
|
||||
<br />
|
||||
Creates an AQL statement to select all `outbound` edges for each of the vertices selected
|
||||
in the step before.
|
||||
The resulting set of edges can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* Empty, there is no matching executed all edges are valid.
|
||||
* A string, only the edge having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only edges having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All edges matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
To request unfiltered outbound edges:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLOutEdgesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.outEdges().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered outbound edges by a single example:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLOutEdgesFilteredSingle}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.outEdges({type: "married"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered outbound edges by multiple examples:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLOutEdgesFilteredMultiple}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.outEdges([{type: "married"}, {type: "friend"}]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION InEdges
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_inEdges -->
|
||||
|
||||
Select all inbound edges for the vertices selected before
|
||||
<br />
|
||||
`graph-query.inEdges(examples)`
|
||||
<br />
|
||||
Creates an AQL statement to select all `inbound` edges for each of the vertices selected
|
||||
in the step before.
|
||||
The resulting set of edges can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* Empty, there is no matching executed all edges are valid.
|
||||
* A string, only the edge having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only edges having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All edges matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
To request unfiltered inbound edges:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLInEdgesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.inEdges().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered inbound edges by a single example:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLInEdgesFilteredSingle}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.inEdges({type: "married"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered inbound edges by multiple examples:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLInEdgesFilteredMultiple}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices([{name: "Alice"}, {name: "Bob"}]);
|
||||
query.inEdges([{type: "married"}, {type: "friend"}]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION Vertices
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_vertices -->
|
||||
|
||||
Select all vertices connected to the edges selected before
|
||||
<br />
|
||||
`graph-query.vertices(examples)`
|
||||
<br />
|
||||
Creates an AQL statement to select all vertices for each of the edges selected
|
||||
in the step before.
|
||||
This includes all vertices contained in `_from` as well as `_to` attribute of the edges.
|
||||
The resulting set of vertices can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* Empty, there is no matching executed all vertices are valid.
|
||||
* A string, only the vertex having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only vertices having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All vertices matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
To request unfiltered vertices:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLVerticesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.vertices().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered vertices by a single example:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLVerticesFilteredSingle}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.vertices({name: "Alice"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered vertices by multiple examples:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLVerticesFilteredMultiple}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.vertices([{name: "Alice"}, {name: "Charly"}]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION FromVertices
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_fromVertices -->
|
||||
|
||||
Select all vertices where the edges selected before start
|
||||
<br />
|
||||
`graph-query.vertices(examples)`}
|
||||
<br />
|
||||
Creates an AQL statement to select the set of vertices where the edges selected
|
||||
in the step before start at.
|
||||
This includes all vertices contained in `_from` attribute of the edges.
|
||||
The resulting set of vertices can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* Empty, there is no matching executed all vertices are valid.
|
||||
* A string, only the vertex having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only vertices having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All vertices matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
To request unfiltered starting vertices:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLFromVerticesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.fromVertices().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered starting vertices by a single example:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLFromVerticesFilteredSingle}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.fromVertices({name: "Alice"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered starting vertices by multiple examples:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLFromVerticesFilteredMultiple}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.fromVertices([{name: "Alice"}, {name: "Charly"}]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION ToVertices
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_toVertices -->
|
||||
|
||||
Select all vertices targeted by the edges selected before
|
||||
<br />
|
||||
`graph-query.vertices(examples)`
|
||||
<br />
|
||||
Creates an AQL statement to select the set of vertices where the edges selected
|
||||
in the step before end in.
|
||||
This includes all vertices contained in `_to` attribute of the edges.
|
||||
The resulting set of vertices can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* Empty, there is no matching executed all vertices are valid.
|
||||
* A string, only the vertex having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only vertices having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All vertices matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
To request unfiltered starting vertices:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToVerticesUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.toVertices().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered starting vertices by a single example:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToVerticesFilteredSingle}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.toVertices({name: "Alice"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered starting vertices by multiple examples:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToVerticesFilteredMultiple}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.toVertices([{name: "Alice"}, {name: "Charly"}]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION Neighbors
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_neighbors -->
|
||||
|
||||
Select all neighbors of the vertices selected in the step before.
|
||||
<br />
|
||||
`graph-query.neighbors(examples)`
|
||||
<br />
|
||||
Creates an AQL statement to select all neighbors for each of the vertices selected
|
||||
in the step before.
|
||||
The resulting set of vertices can be filtered by defining one or more `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* Empty, there is no matching executed all vertices are valid.
|
||||
* A string, only the vertex having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only vertices having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All vertices matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
To request unfiltered neighbors:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLNeighborsUnfiltered}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices({name: "Alice"});
|
||||
query.neighbors().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered neighbors by a single example:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLNeighborsFilteredSingle}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices({name: "Alice"});
|
||||
query.neighbors({name: "Bob"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
To request filtered neighbors by multiple examples:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLNeighborsFilteredMultiple}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.vertices([{name: "Bob"}, {name: "Charly"}]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION Restrict
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_restrict -->
|
||||
|
||||
Restricts the last statement in the chain to return
|
||||
only elements of a specified set of collections
|
||||
<br />
|
||||
By default all collections in the graph are searched for matching elements
|
||||
whenever vertices and edges are requested.
|
||||
Using `restrict` after such a statement allows to restrict the search
|
||||
to a specific set of collections within the graph.
|
||||
Restriction is only applied to this one part of the query.
|
||||
It does not effect earlier or later statements.
|
||||
<br />
|
||||
`restrictions` can have the following values:
|
||||
<br />
|
||||
* A string defining the name of one specific collection in the graph.
|
||||
Only elements from this collection are used for matching
|
||||
* A list of strings defining a set of collection names.
|
||||
Elements from all collections in this set are used for matching
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
Request all directly connected vertices unrestricted:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLUnrestricted}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices({name: "Alice"});
|
||||
query.edges().vertices().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
Apply a restriction to the directly connected vertices:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLRestricted}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices({name: "Alice"});
|
||||
query.edges().vertices().restrict("female").toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
Restriction of a query is only valid for collections known to the graph:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLRestricted}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices({name: "Alice"});
|
||||
query.edges().vertices().restrict(["female", "male", "products"]).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION Filter
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_filter -->
|
||||
|
||||
Filter the result of the query
|
||||
<br />
|
||||
This can be used to further specfiy the expected result of the query.
|
||||
The result set is reduced to the set of elements that matches the given `examples`.
|
||||
<br />
|
||||
`examples` can have the following values:
|
||||
<br />
|
||||
* A string, only the elements having this value as it's id is returned.
|
||||
* An example object, defining a set of attributes.
|
||||
Only elements having these attributes are matched.
|
||||
* A list containing example objects and/or strings.
|
||||
All elements matching at least one of the elements in the list are returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
Request vertices unfiltered:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLUnfilteredVertices}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.toVertices().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
Request vertices filtered:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLFilteredVertices}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.toVertices().filter({name: "Alice"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
Request edges unfiltered:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLUnfilteredEdges}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.toVertices().outEdges().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
Request edges filtered:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLFilteredEdges}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._edges({type: "married"});
|
||||
query.toVertices().outEdges().filter({type: "married"}).toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
||||
!SUBSECTION Path
|
||||
|
||||
<!-- @startDocuBlock JSF_general_graph_fluent_aql_path -->
|
||||
|
||||
The result of the query is the path to all elements.
|
||||
<br />
|
||||
By defaut the result of the generated AQL query is the set of elements passing the last matches.
|
||||
So having a `vertices()` query as the last step the result will be set of vertices.
|
||||
Using `path()` as the last action before requesting the result
|
||||
will modify the result such that the path required to find the set vertices is returned.
|
||||
<br />
|
||||
@EXAMPLES
|
||||
<br />
|
||||
Request the iteratively explored path using vertices and edges:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLPathSimple}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices({name: "Alice"});
|
||||
query.outEdges().toVertices().path().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<br />
|
||||
When requesting neighbors the path to these neighbors is expanded:
|
||||
<br />
|
||||
@EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLPathNeighbors}
|
||||
var examples = require("orgarangodbgraph-examplesexample-graph.js");
|
||||
var g = examples.loadGraph("social");
|
||||
var query = g._vertices({name: "Alice"});
|
||||
query.neighbors().path().toArray();
|
||||
@END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
<!-- @endDocuBlock -->
|
||||
|
|
|
@ -67,26 +67,15 @@
|
|||
* [Joins](AqlExamples/Join.md)
|
||||
* [Grouping](AqlExamples/Grouping.md)
|
||||
<!-- 13 -->
|
||||
* [Blueprint-Graphs](Blueprint-Graphs/README.md)
|
||||
* [Graphs](Blueprint-Graphs/README.md)
|
||||
* [Graph Constructor](Blueprint-Graphs/GraphConstructor.md)
|
||||
* [Vertex Methods](Blueprint-Graphs/VertexMethods.md)
|
||||
* [Edge Methods](Blueprint-Graphs/EdgeMethods.md)
|
||||
<!-- 14 -->
|
||||
* [General-Graphs](General-Graphs/README.md)
|
||||
* [Graph Functions](General-Graphs/GeneralGraphFunctions.md)
|
||||
* [Fluent AQL Interface](General-Graphs/FluentAQLInterface.md)
|
||||
* [Edge Methods](Blueprint-Graphs/EdgeMethods.md)
|
||||
<!-- 15 -->
|
||||
* [Traversals](Traversals/README.md)
|
||||
* [Starting from Scratch](Traversals/StartingFromScratch.md)
|
||||
* [Using Traversal Objects](Traversals/UsingTraversalObjects.md)
|
||||
* [Example Data](Traversals/ExampleData.md)
|
||||
<!-- 16 -->
|
||||
* [Transactions](Transactions/README.md)
|
||||
* [Transaction invocation](Transactions/TransactionInvocation.md)
|
||||
* [Passing parameters](Transactions/Passing.md)
|
||||
* [Locking and isolation](Transactions/LockingAndIsolation.md)
|
||||
* [Durability](Transactions/Durability.md)
|
||||
* [Limitations](Transactions/Limitations.md)
|
||||
<!-- 17 -->
|
||||
* [Foxx](Foxx/README.md)
|
||||
* [Handling Request](Foxx/HandlingRequest.md)
|
||||
|
|
|
@ -44,4 +44,27 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(".summary>li").each(function(){
|
||||
var flag = true;
|
||||
var x = window.location.href;
|
||||
x = x.split("/");
|
||||
x = x[x.length - 2] + '/' + x[x.length - 1];
|
||||
jQuery('a',this).each(function(){
|
||||
var str = jQuery(this).attr('href');
|
||||
if(str.search(x) != -1){
|
||||
console.log(x);
|
||||
console.log(str);
|
||||
flag = false;
|
||||
}
|
||||
});
|
||||
if(flag){
|
||||
jQuery('ul',this).hide();
|
||||
}
|
||||
});
|
||||
jQuery(".summary>li").on("click",function(){
|
||||
jQuery(".summary>li>ul").hide();
|
||||
jQuery("ul",this).slideDown();
|
||||
});
|
||||
</script>
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import re
|
||||
import inspect
|
||||
|
||||
|
||||
|
@ -23,6 +24,17 @@ def file_content(filepath):
|
|||
|
||||
return comments
|
||||
|
||||
def example_content(filepath, fh):
|
||||
""" Fetches an example file and inserts it using code
|
||||
"""
|
||||
|
||||
fh.write("\n```\n")
|
||||
|
||||
filelines = tuple(open(filepath, 'r'))
|
||||
for line in enumerate(filelines):
|
||||
fh.write("%s" % line[1])
|
||||
|
||||
fh.write("```\n")
|
||||
|
||||
def fetch_comments(dirpath):
|
||||
""" Fetches comments from files and writes to a file in required format.
|
||||
|
@ -30,6 +42,7 @@ def fetch_comments(dirpath):
|
|||
|
||||
comments_filename = "allComments.txt"
|
||||
fh = open(comments_filename, "a")
|
||||
shouldIgnoreLine = False;
|
||||
|
||||
for root, directories, files in os.walk(dirpath):
|
||||
for filename in files:
|
||||
|
@ -43,11 +56,22 @@ def fetch_comments(dirpath):
|
|||
_text = _text.replace("\n", "<br />")
|
||||
_text = _text.strip()
|
||||
if _text:
|
||||
if not shouldIgnoreLine:
|
||||
if ("@startDocuBlock" in _text) or \
|
||||
("@endDocuBlock" in _text):
|
||||
fh.write("<!-- %s -->\n" % _text)
|
||||
fh.write("<!-- %s -->\n\n" % _text)
|
||||
elif ("@EXAMPLE_ARANGOSH_OUTPUT" in _text):
|
||||
shouldIgnoreLine = True
|
||||
_filename = re.search("{(.*)}", _text).group(1)
|
||||
dirpath = os.path.abspath(os.path.join(os.path.dirname( __file__ ), os.pardir, "Examples", _filename + ".generated"))
|
||||
if os.path.isfile(dirpath):
|
||||
example_content(dirpath, fh)
|
||||
else:
|
||||
print "Could not find code for " + _filename
|
||||
else:
|
||||
fh.write("%s\n" % _text)
|
||||
elif ("@END_EXAMPLE_ARANGOSH_OUTPUT" in _text):
|
||||
shouldIgnoreLine = False
|
||||
|
||||
fh.close()
|
||||
|
||||
|
@ -63,4 +87,4 @@ if __name__ == "__main__":
|
|||
|
||||
|
||||
os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'templates'))
|
||||
|
||||
|
||||
|
|
|
@ -1177,7 +1177,7 @@ AQLGenerator.prototype.toArray = function() {
|
|||
///
|
||||
/// To count the number of matched elements:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLCount}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// var g = examples.loadGraph("social");
|
||||
/// var query = g._vertices();
|
||||
|
@ -1209,7 +1209,7 @@ AQLGenerator.prototype.count = function() {
|
|||
///
|
||||
/// Start query execution with hasNext:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLHasNext}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// var g = examples.loadGraph("social");
|
||||
/// var query = g._vertices();
|
||||
|
@ -1218,13 +1218,10 @@ AQLGenerator.prototype.count = function() {
|
|||
///
|
||||
/// Iterate over the result as long as it has more elements:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLHasNextIteration}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// var g = examples.loadGraph("social");
|
||||
/// var query = g._vertices();
|
||||
/// while(query.hasNext()) {
|
||||
/// query.next();
|
||||
/// }
|
||||
/// @END_EXAMPLE_ARANGOSH_OUTPUT
|
||||
/// @endDocuBlock
|
||||
///
|
||||
|
@ -1253,7 +1250,7 @@ AQLGenerator.prototype.hasNext = function() {
|
|||
///
|
||||
/// Request some elements with next:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLNext}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// var g = examples.loadGraph("social");
|
||||
/// var query = g._vertices();
|
||||
|
@ -1265,7 +1262,7 @@ AQLGenerator.prototype.hasNext = function() {
|
|||
///
|
||||
/// The cursor is recreated if the query is changed:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLToArray}
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphFluentAQLNextRecreate}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// var g = examples.loadGraph("social");
|
||||
/// var query = g._vertices();
|
||||
|
@ -2111,7 +2108,7 @@ Graph.prototype._OUTEDGES = function(vertexId) {
|
|||
///
|
||||
/// To request filtered edges:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgesUnfiltered}
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgesFiltered}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// var g = examples.loadGraph("social");
|
||||
/// g._edges({type: "married"}).toArray();
|
||||
|
@ -2163,7 +2160,7 @@ Graph.prototype._edges = function(edgeExample) {
|
|||
///
|
||||
/// To request filtered vertices:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVerticesUnfiltered}
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVerticesFiltered}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// var g = examples.loadGraph("social");
|
||||
/// g._vertices([{name: "Alice"}, {name: "Bob"}]).toArray();
|
||||
|
|
Loading…
Reference in New Issue