Cypher and Results

The Cypher and Results panel appears both under Cypher Suite and Cypher Builder. The panel has two tabs:

  • Cypher: In Cypher Suite, this shows the Cypher within the currently selected Cypher block. In Cypher Builder, it shows the Cypher statement syntax corresponding to all Cypher clause blocks. This box is read-only.

  • Results: This tab lets you run and debug the Cypher statement.

  • Validation: This tab is present in Cypher Builder only. It only flags issues that are present when using Cypher Builder to build Keymaker queries.

Results Tab

You must be connected to a Neo4j database to run or debug queries. Click here to see how to connect to a Neo4j database. There is a button bar that has several buttons on it and some additional information:

  • Play button: Click on the Play button on the left to run the query.

  • Debug button: Click on the Debug button to start debugging the query.

  • Step backward a line: Comment out the current line and run.

  • Step forward a line: Uncomment the next line and run.

  • Step backward inside a line: Comment out the current step and run.

  • Step forward inside a line: Uncomment out the next step and run.

  • Num records returned: The number of records returned from running the query.

  • Limit: The maximum number of records to return. Will be ignored if the query has a limit.

Running a Cypher Query

Click on the Play button to execute the current query. In Cypher Suite, you can select the active query by selecting the Cypher block. Modifying the Cypher in the current block will update the Cypher in the Cypher panel. After updating Cypher, click Play to re-run the query. The results will be shown in a table below the buttons.

Debugging a Cypher Query

Click on the Debug button to start debugging the query. The current Cypher query is shown in a code panel on the right. If you change the Cypher in the active Cypher block, you will need to click on the Debug button again to update the changes.

Use the Step backward/forward a line or Step backward/forward a step buttons to debug the query. Each time you click a Step button, the debug version of the query is constructed and the query is re-run. Stepping is useful for finding out when a query returns 0 items.

How Steps are Computed

The debugging parser computes steps within Match clauses by progressively building the Match path. Where clauses are stepped one word token at a time. Return clauses are stepped one return item at a time. For most other Cypher clauses, the entire line is a step.