llms.txt: machine-readable documentation index. Markdown version of this page is also available.

DORKAG Help

QueryFlag: Run a query on selected text

Select a value in the editor, for example a feature flag key or a customer e-mail in your code, and run a saved query with it without typing the query yourself.

Before you begin

Run a query

Run a template on selected text

  1. In the editor, select the value you want to search for.

  2. Right-click the selection and select Query Flag in DB | <template name>.

The IDE shows the results as for any query that you run from a query console, for example in the Services tool window. If no results appear, see The query results do not appear.

What happens when you run a template

  1. QueryFlag replaces each <QUERY_FLAG_TOKEN> token in the template with the selected text, without double quotes (see How QueryFlag reads the selection).

  2. It creates a new query console for the template's data source and writes the query into it.

  3. It runs the query with the IDE's default query execution settings.

The query console does not open in the editor by default. To see and edit the query that ran, select Open console editor in the QueryFlag settings.

How QueryFlag reads the selection

  • Double quotes are removed, so selecting "dark-mode" with or without its quotes gives dark-mode. Put the quotes the query needs in the template; see Write the template query.

  • Everything else is kept as it is, including spaces, line breaks, and single quotes.

  • QueryFlag reads the selection in editor tabs that show a file, including query consoles. In other editors, such as the diff viewer, the selection counts as empty.

Run a template without a selection

The Query Flag in DB menu is available even when nothing is selected. By default, QueryFlag does not run a template when the selection is empty or contains only spaces. It shows the warning "Query with blank text is disable, skipping execution. Check QueryFlag preference to enable it."

To run templates with an empty value, select Allow blank Text in the QueryFlag settings. A partial-match template such as LIKE '%<QUERY_FLAG_TOKEN>%' then matches every row that has a value in that column.

02 October 2026