Working with the Query Editor

The figure below shows the Proximity Query Editor interface.

The Query Editor provides a large display area where you graphically create the query structure of vertices, edges, and subqueries. The Query Editor includes two properties panes at the bottom of the window for displaying and editing query properties such as conditions, annotations, and constraints. The query properties pane displays properties of the query as a whole. The element properties pane displays the properties of the selected query element. The element properties pane is blank when no query element is selected. The status list at the bottom of the window indicates whether the query is valid, and if invalid, provides a drop-down list of errors.

The Query Editor is mode based. Each toolbar button selects a tool, which in turn determines the current mode for the Query Editor. For example, clicking the vertex tool places the Query Editor in vertex mode. All subsequent clicks in the Query Editor display area place a new vertex at the indicated location. Selecting a new tool by clicking the corresponding toolbar button changes the mode and changes how clicks in the display area are interpreted.

Selection mode—clicking selects existing query elements for editing or deletion
Vertex mode—clicking creates a new vertex at the indicated location
Edge mode—clicking and dragging creates a new edge
Subquery mode—dragging a surrounding box indicates which vertices belong to a subquery

The sections below provide instructions for creating queries and working with the Query Editor.

To start the Query Editor:

You can start the Query Editor with no specified query (to create a new query), or specify an existing query to edit that query in the Query Editor.

Proximity allows you to open multiple Query Editor windows. All Query Editor windows are closed when you close the Proximity Database Browser.

To close the Query Editor:

Proximity asks whether to save any unsaved queries before closing the Query Editor.

To change zoom level:

Changing the zoom level can be helpful when working with large queries. Zooming out lets you see the entire query structure at once while zooming in lets you easily work with individual query elements.

Keyboard shortcuts:

Many Query Editor commands can be invoked using keyboard shortcuts instead of using the mouse. You can open, close, save, and run queries, select tools, and change the Query Editor’s mode (select tools) using keyboard shortcuts. Keyboard shortcuts are shown next to the corresponding command in the Query Editor’s menus. The table below summarizes these shortcuts.

Command Keyboard shortcut Command Keyboard shortcut
New query Ctrl-N Selection tool Ctrl-1
Open query file Ctrl-O Vertex tool Ctrl-2
Close query Ctrl-W Edge tool Ctrl-3
Save query Ctrl-S Subquery tool Ctrl-4
Run query Ctrl-R Flip edge direction Ctrl-F
Select next item Ctrl- Select previous item Ctrl-
Zoom in Ctrl-= Zoom to fit Ctrl-0 (zero)
Zoom out Ctrl-Minus Reset zoom Ctrl-Backspace