Queries allow you to query a graph using the Thinkmap Graph Query Language You can obtain a Query object by calling the graph.query() method.
Sets or gets the direction for the query when traversing related edges. The default is thinkmap.graph.Edge.OUT (all outgoing edges). Other options are thinkmap.graph.Edge.IN for incoming edges, and thinkmap.graph.Edge.BOTH for both incoming and outgoing edges.
either the constant thinkmap.graph.Edge.OUT, IN, or BOTH
returns this query or the direction if zero arguments were passed
Executes this query, starting from the (optional) given set of entities. If no starting set is given, then the entire graph is considered.
Sets the "fetch" parameter for this query. If set to false, this query will only be executed locally, and will not fetch new data from any remote data sources.
If called with zero arguments, this method returns the last set value for "fetch".
returns this query, (or the value of fetch if zero arguments are passed)
Sets the maximum number of results returned by this query. If called with zero arguments, this method returns the last set value for "limit".
returns this query, (or the value of skip if zero arguments are passed)
Gets the top level QueryComponent parsed by the query parser.
the parsed top level query
Returns a selection of all the initial candidates that satisfy a particular query. Unlike queries, selecting remains client side and will not issue requests to any datasource. Also, this methods returns entities that satisfy only the initial part of the query but not necessarily the entire query.
the selection representing all the candidates for a query
Performs exactly like the select method but rather than returning a selection of all candidates, this method just returns the first entity that is a candidate for the query.
the first candidate of the query.
Sets the number of results to skip before returning results. If called with zero arguments, this method returns the last set value for "skip".
returns this query, (or the value of skip if zero arguments are passed)
graph.query({$search:'star wars'}).skip(10).limit(10).execute();