Skip to content

Add support for GRAPH.EXPLAIN #11

Open
@DenisCarriere

Description

@DenisCarriere
/**
 * GRAPH.EXPLAIN
 *
 * Constructs a query execution plan but does not run it.
 *
 * Inspect this execution plan to better understand how your query will get executed.
 *
 * https://oss.redislabs.com/redisgraph/commands/#graphexplain
 *
 * @param {string} [query] cypher query
 * @return String representation of a query execution plan
 * @example
 *
 * graph.explain("MATCH (p:president)-[:born]->(h:state {name:'Hawaii'}) RETURN p");
 */
explain(query: string) {
	return this._sendCommand("GRAPH.EXPLAIN", [this._graphId, query]).then(res => {
		return new ResultSet(res);
	});
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions