mirror of https://gitee.com/bigwinds/arangodb
103 lines
2.9 KiB
Plaintext
103 lines
2.9 KiB
Plaintext
!CHAPTER Fluent AQL Interface
|
|
|
|
This chapter describes a fluent interface to query your graph.
|
|
The philosophy of this interface is to select a group of starting elements (vertices or edges) at first and from there on explore the graph with your query by selecting connected elements.
|
|
|
|
As an example you can start with a set of vertices, select their direct neighbors and finally their outgoing edges.
|
|
|
|
The result of this query will be the set of outgoing edges.
|
|
For each part of the query it is possible to further refine the resulting set of elements by giving examples for them.
|
|
|
|
!SECTION Definition of examples
|
|
|
|
@startDocuBlock JSF_general_graph_example_description
|
|
|
|
!SECTION Starting Points
|
|
|
|
This section describes the entry points for the fluent interface.
|
|
The philosophy of this module is to start with a specific subset of vertices or edges and from there on iterate over the graph.
|
|
|
|
Therefore you get exactly this two entry points:
|
|
|
|
* Select a set of edges
|
|
* Select a set of vertices
|
|
|
|
!SUBSECTION Edges
|
|
|
|
@startDocuBlock JSF_general_graph_edges
|
|
|
|
!SUBSECTION Vertices
|
|
|
|
@startDocuBlock JSF_general_graph_vertices
|
|
|
|
!SECTION Working with the query cursor
|
|
|
|
The fluent query object handles cursor creation and maintenance for you.
|
|
A cursor will be created as soon as you request the first result.
|
|
If you are unhappy with the current result and want to refine it further you can execute a further step in the query which cleans up the cursor for you.
|
|
In this interface you get the complete functionality available for general AQL cursors directly on your query.
|
|
The cursor functionality is described in this section.
|
|
|
|
!SUBSECTION ToArray
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_toArray
|
|
|
|
!SUBSECTION HasNext
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_hasNext
|
|
|
|
!SUBSECTION Next
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_next
|
|
|
|
!SUBSECTION Count
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_count
|
|
|
|
!SECTION Fluent queries
|
|
|
|
After the selection of the entry point you can now query your graph in
|
|
a fluent way, meaning each of the functions on your query returns the query again.
|
|
Hence it is possible to chain arbitrary many executions one after the other.
|
|
In this section all available query statements are described.
|
|
|
|
!SUBSECTION Edges
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_edges
|
|
|
|
!SUBSECTION OutEdges
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_outEdges
|
|
|
|
!SUBSECTION InEdges
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_inEdges
|
|
|
|
!SUBSECTION Vertices
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_vertices
|
|
|
|
!SUBSECTION FromVertices
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_fromVertices
|
|
|
|
!SUBSECTION ToVertices
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_toVertices
|
|
|
|
!SUBSECTION Neighbors
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_neighbors
|
|
|
|
!SUBSECTION Restrict
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_restrict
|
|
|
|
!SUBSECTION Filter
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_filter
|
|
|
|
!SUBSECTION Path
|
|
|
|
@startDocuBlock JSF_general_graph_fluent_aql_path
|