Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ To remove queries from the Query History view, select all the queries you want t
Viewing query results
-----------------------

#. Click a query in the Query History view to display its results in the Results view. Alternatively, right-click the result to select a different view:
#. Click a query in the Query History view to display its results in the Results view.

- To view the results in :ref:`SARIF format <sarif-output>`, right-click and select **View SARIF**.
- To view the results in :ref:`DIL format <dil>`, right-click and select **View DIL**.
.. pull-quote:: Note

#. Use the dropdown menu in the Results view to choose which results to display, and in what form to display them, such as a formatted alert message or a table of raw results. The available output forms are specified by the format of the query and the metadata. For more information, see ":ref:`CodeQL queries <codeql-queries>`."
Depending on the query, you can also choose different views such as CSV, :ref:`SARIF <sarif-output>`, or :ref:`DIL format <dil>`. For example, to view the DIL format, right-click a result and select **View DIL**.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a logic in the order in which the formats are listed (Is it how they appear when you right-click a result?) or should we mention them alphabetically?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! I've roughly listed them in order of "usefulness" 😀 People are probably most likely to want CSV, then SARIF, and (rarely) DIL. I think this also corresponds to the UI, but it depends on what's available, given the format of the query.

The available output views are determined by the format and the metadata of the query. For more information, see ":ref:`CodeQL queries <codeql-queries>`."

#. Use the dropdown menu in the Results view to choose which results to display, and in what form to display them, such as a formatted alert message or a table of raw results.

#. To sort the results by the entries in a particular column, click the column header.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ Changing the labels of query history items

The query history **Format** setting controls how the extension lists queries in the query history. By default, each item has a label with the following format::

[%t] %q on %d - %s

- ``%t`` is the time the query was run
%q on %d - %s, %r result count [%t]

- ``%q`` is the query name
- ``%d`` is the database name
- ``%s`` is a status string
- ``%r`` is the number of results
- ``%t`` is the time the query was run

To override the default label, you can specify a different format for the query history items.

Expand Down