RQL Code Assistance
- All queries addressed to the RavenDB server use RQL, RavenDB's rich query language.
- The query structure exposes the order of the query operations handled by the RavenDB server when serving a query.
- RQL Code Assistance is available when writing any query in the Studio.
The code auto-completion allows you to see the various paths your query can take as data entities, functions, keywords, and operators are presented for you to select, speeding up the writing process and making the creation of intelligent queries an enjoyable task.
- In addition, the query syntax is checked and potential errors are highlighted.
Code Assistance is available in the Query, Patch, and Subscription Task Definition views.
In this page:
- RQL code assistance is available in the following views:
- To invoke auto-completion, click CTRL+Space while writing RQL.
- The relevant options for the current cursor location will be listed.
- Clicking a list item will add it to the query.
At the very beginning of a query, the suggested options will be the most basic ones:
- from - to select a collection to query on
from index- to select an index to query on
Click CTRL+Space To See Available Options
- List of available options
- An available option
Option type, which can be -
- A Collection
- A Document Field
- A Function
- A Keyword
- An Operator
As the query evolves, new options that are are relevant to the current code are suggested.
For the collection query shown above, auto-completion presents:
- The list of collections that can be queried
- The list of keywords that can be used with the selected collection
- The list of document fields that can be queried
- The list of operators and keywords that can be used
- As you write your query, its syntax is continuously verified and errors are detected.
- When an error is detected, a warning sign is displayed on the left side of the editor.
- Hovering over the warning sign shows the error details.
- Syntax error (this symbol cannot be used here)
- Warning Sign
- Error details
Hover over the warning sign to see the error details.