All versions of this manual
X
 

Queries: Running and managing queries

Running and Managing Queries

In this section we will learn how to manage, run and optimise the usage of queries in order to save as much time as possible with the use of this feature!

Accessing Queries

All queries which users have access to can be reached from the right toolbar on the workspace. Upon clicking on the {} button, users can view the list of all their queries sorted by name in alphabetical order. If a node is selected before opening the query panel, suggested queries will be displayed. Changing that to "All" will show all queries accessible to the user.

Accessing Queries

From the query panel, users can do several things with the queries accessible to them. They can run, view details and add their queries to Favorites.

Searching for Queries

Using the search bar on top of the query panel, the user can search for words in the query's name or description. The query list can also be filtered by using query tags or by selecting favorite or suggested queries.

Searching for Queries

Editing and Viewing Details of Queries

From the query panel users can edit, delete and view details of queries they created. They can do that by clicking on "More options" (...) on each query.

Manage Queries

Only the creator of a query can edit and delete it.

Editing Queries

When clicking on edit query, users are redirected to the query editor where they can perform changes to their query.

Deleting Queries

When deleting a query, the system will ask for a confirmation from the user to delete the query. Deleted queries will no longer be accessible to any of the users who had access to them and the action is irreversible.

Viewing Details of Queries

When users view the details of a query, they can view the query's ID, name, description, creation information, edition information, tags, share settings as well as the raw graph query code. Moreover, users can load the query in the editor from the dedicated button which will redirect them to the query editor.

Viewing details of query

Favorite Queries

Users can set queries as their favorite. They can do that by clicking on the three dots on a query's card and adding them to favorites. The benefit of having favorite queries is that they can be accessed much quicker.

Adding queries to favorite

All the user's favorite queries can be accessed at once via clicking on the Favorites tab at the bottom of the query panel.

Favorite queries are individual to each user.

Hidden queries

Hidden queries help you declutter the user interface by concealing technical queries that are essential for running custom actions but unnecessary for end-user interaction. Those queries are usually referenced by ID in custom action and plugins, their visibility in the UI can lead to user confusion and unintended misuse.

Key Features

  • Technical queries can be marked as "hidden" making them invisible to users while still accessible by custom actions.
  • Hidden queries are only visible to authorized users or systems, reducing the risk of accidental execution. See Access rights.
  • Custom actions can reference hidden queries by ID without affecting user experience. How to set hidden queries

    Running Queries

    All queries can be accessed and run from the query panel in the workspace. Depending on whether a query requires graph or user input, a form is displayed for the user to input the relevant information. Users can also search for a query to run by name or description.

Alt text

Depending on the nodes or edges that users have selected, the suggested queries tab of the queries panel will show queries that can be run with the current graph selection as input.

Query Results and Edges

A query can return nodes and edges. When running a query, Linkurious Enterprise will have a different behavior depending on whether the query returns some edges or node.

If the query does not return any edges, the system will add all mutual edges between the nodes in the result to the query result. For example, if the query returns nodes A and B but no edges, then running the query will actually return A, B and all edges between A and B.

Example:

MATCH (a:Person)--(b:Person)
WHERE a.name = 'John'
RETURN a, b

The system will add all edges between a and b to the result automatically.

If a query does return some edges, the system will not try to add any edges to the result automatically.

Example:

MATCH (a:Person)-[edge]-(b:Person)
WHERE a.name = 'John'
RETURN a, edge, b

The system will only return the edges explicitly returned by the query.

In addition to the automatically added edges, when adding the results of a query to a visualization, the system will always also add to the visualization the mutual edges between the nodes in the result and the nodes that were already in the visualization.

Example:

  • The user is in a visualization containing node A
  • The user runs a query that return node B
  • The visualization will now contain nodes A and B, and all edges between A and B