diff --git a/docs/studio/database/assets/database-actions-1.png b/docs/studio/database/assets/database-actions-1.png deleted file mode 100644 index a404e9a939..0000000000 Binary files a/docs/studio/database/assets/database-actions-1.png and /dev/null differ diff --git a/docs/studio/database/assets/database-actions-2.png b/docs/studio/database/assets/database-actions-2.png deleted file mode 100644 index bb94f61278..0000000000 Binary files a/docs/studio/database/assets/database-actions-2.png and /dev/null differ diff --git a/docs/studio/database/assets/database-actions-3.png b/docs/studio/database/assets/database-actions-3.png deleted file mode 100644 index 75eec986ad..0000000000 Binary files a/docs/studio/database/assets/database-actions-3.png and /dev/null differ diff --git a/docs/studio/database/assets/database-actions-4.png b/docs/studio/database/assets/database-actions-4.png deleted file mode 100644 index 8d266bb23d..0000000000 Binary files a/docs/studio/database/assets/database-actions-4.png and /dev/null differ diff --git a/docs/studio/database/assets/database-stats.png b/docs/studio/database/assets/database-stats.png deleted file mode 100644 index 035e8352bc..0000000000 Binary files a/docs/studio/database/assets/database-stats.png and /dev/null differ diff --git a/docs/studio/database/assets/databases-list-view.png b/docs/studio/database/assets/databases-list-view.png new file mode 100644 index 0000000000..9eddbf3237 Binary files /dev/null and b/docs/studio/database/assets/databases-list-view.png differ diff --git a/docs/studio/database/assets/databases-list-view_database-actions.png b/docs/studio/database/assets/databases-list-view_database-actions.png new file mode 100644 index 0000000000..35fb4e0c5b Binary files /dev/null and b/docs/studio/database/assets/databases-list-view_database-actions.png differ diff --git a/docs/studio/database/assets/databases-list-view_database-stats.png b/docs/studio/database/assets/databases-list-view_database-stats.png new file mode 100644 index 0000000000..68753ce99c Binary files /dev/null and b/docs/studio/database/assets/databases-list-view_database-stats.png differ diff --git a/docs/studio/database/assets/databases-list-view_delete-lock-mode.png b/docs/studio/database/assets/databases-list-view_delete-lock-mode.png new file mode 100644 index 0000000000..1ff52568f8 Binary files /dev/null and b/docs/studio/database/assets/databases-list-view_delete-lock-mode.png differ diff --git a/docs/studio/database/assets/databases-list-view_distribution-details.png b/docs/studio/database/assets/databases-list-view_distribution-details.png new file mode 100644 index 0000000000..46e424e831 Binary files /dev/null and b/docs/studio/database/assets/databases-list-view_distribution-details.png differ diff --git a/docs/studio/database/assets/databases-list-view_indexing-paused.png b/docs/studio/database/assets/databases-list-view_indexing-paused.png new file mode 100644 index 0000000000..5ade2e7b7b Binary files /dev/null and b/docs/studio/database/assets/databases-list-view_indexing-paused.png differ diff --git a/docs/studio/database/assets/databases-list-view_more-actions.png b/docs/studio/database/assets/databases-list-view_more-actions.png new file mode 100644 index 0000000000..4a6e0067a4 Binary files /dev/null and b/docs/studio/database/assets/databases-list-view_more-actions.png differ diff --git a/docs/studio/database/assets/databases-list-view_pause-indexing.png b/docs/studio/database/assets/databases-list-view_pause-indexing.png new file mode 100644 index 0000000000..4f439f68da Binary files /dev/null and b/docs/studio/database/assets/databases-list-view_pause-indexing.png differ diff --git a/docs/studio/database/assets/databases-list-view_selection-actions.png b/docs/studio/database/assets/databases-list-view_selection-actions.png new file mode 100644 index 0000000000..a9ba3fa453 Binary files /dev/null and b/docs/studio/database/assets/databases-list-view_selection-actions.png differ diff --git a/docs/studio/database/assets/snagit/databases-list-view.snagx b/docs/studio/database/assets/snagit/databases-list-view.snagx new file mode 100644 index 0000000000..dbf571075f Binary files /dev/null and b/docs/studio/database/assets/snagit/databases-list-view.snagx differ diff --git a/docs/studio/database/assets/snagit/databases-list-view_database-actions.snagx b/docs/studio/database/assets/snagit/databases-list-view_database-actions.snagx new file mode 100644 index 0000000000..23f9475232 Binary files /dev/null and b/docs/studio/database/assets/snagit/databases-list-view_database-actions.snagx differ diff --git a/docs/studio/database/assets/snagit/databases-list-view_database-stats.snagx b/docs/studio/database/assets/snagit/databases-list-view_database-stats.snagx new file mode 100644 index 0000000000..ef235e7db3 Binary files /dev/null and b/docs/studio/database/assets/snagit/databases-list-view_database-stats.snagx differ diff --git a/docs/studio/database/assets/snagit/databases-list-view_delete-lock-mode.snagx b/docs/studio/database/assets/snagit/databases-list-view_delete-lock-mode.snagx new file mode 100644 index 0000000000..10e635db0e Binary files /dev/null and b/docs/studio/database/assets/snagit/databases-list-view_delete-lock-mode.snagx differ diff --git a/docs/studio/database/assets/snagit/databases-list-view_distribution-details.snagx b/docs/studio/database/assets/snagit/databases-list-view_distribution-details.snagx new file mode 100644 index 0000000000..5e4f68c137 Binary files /dev/null and b/docs/studio/database/assets/snagit/databases-list-view_distribution-details.snagx differ diff --git a/docs/studio/database/assets/snagit/databases-list-view_indexing-paused.snagx b/docs/studio/database/assets/snagit/databases-list-view_indexing-paused.snagx new file mode 100644 index 0000000000..7e6ae0716c Binary files /dev/null and b/docs/studio/database/assets/snagit/databases-list-view_indexing-paused.snagx differ diff --git a/docs/studio/database/assets/snagit/databases-list-view_more-actions.snagx b/docs/studio/database/assets/snagit/databases-list-view_more-actions.snagx new file mode 100644 index 0000000000..6d50a69bfc Binary files /dev/null and b/docs/studio/database/assets/snagit/databases-list-view_more-actions.snagx differ diff --git a/docs/studio/database/assets/snagit/databases-list-view_selection-actions.snagx b/docs/studio/database/assets/snagit/databases-list-view_selection-actions.snagx new file mode 100644 index 0000000000..8944386be7 Binary files /dev/null and b/docs/studio/database/assets/snagit/databases-list-view_selection-actions.snagx differ diff --git a/docs/studio/database/databases-list-view.mdx b/docs/studio/database/databases-list-view.mdx index feabfee44d..5925bd2ce9 100644 --- a/docs/studio/database/databases-list-view.mdx +++ b/docs/studio/database/databases-list-view.mdx @@ -1,143 +1,301 @@ --- -title: "Database List View" +title: "Studio: Database List View" sidebar_label: Database List View -description: "Browse all RavenDB databases in Studio with status indicators, document counts, storage sizes, and quick access to database operations." +description: "See the databases of your cluster in Studio's Database List view, examine each database's state and statistics, and create, manage, and delete databases." sidebar_position: 0 --- import Admonition from '@theme/Admonition'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import CodeBlock from '@theme/CodeBlock'; -import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; -import LanguageContent from "@site/src/components/LanguageContent"; +import Panel from "@site/src/components/Panel"; -# Database List View +# Studio: Database List View -* All your databases are listed in this view - * Database stats can be viewed - * Actions can be performed on each database +* Use Studio's **Database List view** to see the databases in your cluster, examine the state and statistics of each database, + and manage the databases, e.g., disable a database or pause its indexing. + You can also select multiple databases and enable, disable, or delete them at once. -* In this page: - * [Database Stats](../../studio/database/databases-list-view.mdx#database-stats) - * [Database Actions](../../studio/database/databases-list-view.mdx#database-actions) - * [Creating New Database Options](../../studio/database/databases-list-view.mdx#creating-new-database-options) - * [More Actions](../../studio/database/databases-list-view.mdx#more-actions) - * [Remote Database](../../studio/database/databases-list-view.mdx#remote-database) - -## Database Stats - -![Figure 1. Database Stats](./assets/database-stats.png) - -1. **Database state** - A database can be: _Online_ , _Offline_ or _Disabled_ - - * ***Online*** - the database is active and ready to use. Read and write actions can be performed. - * ***Offline*** - the database has not been used recently, and will become online upon access. - * ***Disabled*** - the database has been disabled. - - * Note: - If the database is contained in a cluster's node that is different than the node that is currently viewed in this Studio instance, then 'Remote' will be indicated - see more [below](../../studio/database/databases-list-view.mdx#remote-database). - -2. **Containing nodes** - These are the nodes that contain a copy of the database. - -3. **Database size** - The total size of the database, including both documents and indexes. - -4. **Up time** - The time that has passed since database last came online. - -5. **Number of documents** - The number of documents in the database. - -6. **Latest backup time** - The time of the latest database backup. - -7. **Number of indexes** - The number of index errors will show if relevant. - -8. **Alerts** - The number of alerts on this database if there are any. - -9. **Performance hints** - The number of performance hints on this database if there are any. - - - -## Database Actions - -![Figure 2. Database Actions](./assets/database-actions-1.png) +* The database list includes databases that are not hosted by the node that Studio is connected to. + You can filter the list by database name, by database state, and by location (this node or other cluster nodes). -1. **Create new database** - A new database can be created from scratch, from a backup copy, or from existing 3.x data - see more [below](../../studio/database/databases-list-view.mdx#creating-new-database-options). +* You can create new databases in this view, from scratch or by restoring a backup. + Creating a database from scratch is described in + [Create a Database: General Flow](../../studio/database/create-new-database/general-flow.mdx), + and restoring a database from a backup in + [Restoring from backup using Studio](../../backup/restore.mdx#restoring-from-backup-using-studio). -2. **Manage group** - Click to manage the nodes that contain this database - see more about [The Database Group](../../studio/database/settings/manage-database-group.mdx). +* In this article: + * [Database list view](../../studio/database/databases-list-view.mdx#database-list-view) + * [Database actions](../../studio/database/databases-list-view.mdx#database-actions) + * [Database stats](../../studio/database/databases-list-view.mdx#database-stats) + * [Actions on selected databases](../../studio/database/databases-list-view.mdx#actions-on-selected-databases) -3. **Disable/Enable the database** - A disabled database cannot be accessed. - -4. **More actions** - Pause indexing, Disable indexing, Compact database - see more [below](../../studio/database/databases-list-view.mdx#more-actions). - -5. **Refresh data** - Refresh the database stats data in this view from the server. - -6. **Delete the database** - - -## Creating New Database Options - -![Figure 3. Creating New Database](./assets/database-actions-2.png) - -1. **Create new database from scratch** - See detailed flow [here](../../studio/database/create-new-database/general-flow.mdx) - -2. **Create new database from an existing backup copy** - See detailed flow [here](../../backup/restore#restoring-from-backup-using-studio) - -3. **Create new database from legacy data files** - Create a new database from a 3.x RavenDB version database - See detailed flow [here](../../studio/database/create-new-database/from-legacy-files.mdx) + + -## More Actions +The Database List view shows the databases in your cluster, with the state, statistics, and available actions of each database. -![Figure 4. More Actions](./assets/database-actions-3.png) +![Database list view](./assets/databases-list-view.png) -1. **Pause indexing** - All indexes on this database will pause indexing. - Indexing will be paused only on the __local node__ the browser is opened on. - Indexing will __resume__ with either of the following: - * Click this button again ("Resume indexing") - * Restart the server. - * Reload the database (by disabling and then enabling the database state). - * Resume indexing from the client code. See [resume indexing](../../client-api/operations/maintenance/indexes/start-indexing.mdx). +1. **Databases** + Click **Databases**, in the **Server** section of Studio's main menu, to open the Database List view. -2. **Disable indexing** - * Click 'Disable indexing' to disable all indexes on this database, on all nodes. - * After clicking, __for the change to be in effect__, the database must be re-loaded by either: - * Restart the server, or - * Disable/enable the database - * Indexing will remain __disabled__ after restarting the server or after disabling/enabling the database. - * To __enable__ indexing back click this button again ("Enable indexing"). - And again, the database must be reloaded for the change to be in effect. +2. **New database** + Open a dialog to create a new database. + Learn more in [Create a Database: General Flow](../../studio/database/create-new-database/general-flow.mdx) + and [Restoring from backup using Studio](../../backup/restore.mdx#restoring-from-backup-using-studio). + * To restore a database from a backup, click **Restore from backup** at the bottom of the dialog's first step. + * This button is available only to users with `Operator` or `Cluster Admin` + [security clearance](../../server/security/authorization/security-clearance-and-permissions.mdx). -3. **Compact database** - Physically compact the database on disk. +3. **Filter by name** + Enter text to list only the databases whose names contain the text. +4. **Filter by state** + Select one or more states to list only the databases in the selected states. + Select **Local (Node A)** to list the databases hosted by the node that Studio is connected to (node A in this image), + or **Remote** to list the databases hosted by other cluster nodes. + * The number next to each option counts the databases that match the option. + * A database that is online on only some of its nodes is counted as both **Online** and **Offline**. -## Remote Database +5. **Select All** + Select all the databases displayed in the view (that match the filters you set). + If any displayed databases are already selected, clicking **Select All** deselects them instead of selecting all displayed databases. + See [Actions on selected databases](../../studio/database/databases-list-view.mdx#actions-on-selected-databases) + * To select a single database, select the checkbox next to the database's name. + * The checkboxes are available only to users with `Operator` or `Cluster Admin` security clearance. -![Figure 5. Remote Database](./assets/database-actions-4.png) +6. **A database** + Each listed database is displayed with its state, statistics, and the actions you can perform on it. + See [Database actions](../../studio/database/databases-list-view.mdx#database-actions) + and [Database stats](../../studio/database/databases-list-view.mdx#database-stats) -* If the database is contained in one of the cluster's other nodes, but not in the node you are currently viewing in this instance of the studio, - the database state will be ***'Remote'*** + +In a browser window narrower than 1400 pixels, the name and state filters are hidden. +To display the filters, click **Show Filtering Options** next to **New database**. + -* For example, in the above figure, DB2 is contained in nodes A & B. - DB2 is labeled ***'Remote'*** because we are currently viewing node C. + + + + +The top line of each listed database shows the database's state and name, and buttons you can use to act on the database. + +![Database actions](./assets/databases-list-view_database-actions.png) + +1. **Database state** + The state of the database on the nodes of its [database group](../../server/clustering/distribution/distributed-database.mdx): + * **Online**: the database is loaded by all the nodes of the database group. + * **Online (x/y)**: the database is loaded by only some of the nodes of the database group (x of y nodes). + * **Offline**: the database is not loaded by any of the nodes of the database group. + RavenDB unloads a database that has not been accessed for a + [set time](../../server/configuration/database-configuration.mdx#databasesmaxidletimeinsec) (15 minutes by default), + and loads the database again when the database is accessed. + * **Disabled**: the database was disabled (see **Disable** below), and cannot be accessed. + * **Error**: at least one node of the database group failed to load the database. + * **Loading...**: Studio has not retrieved the database's state from the nodes yet. + +2. **Checkbox** + Select the database, to perform an action on this database and on other selected databases at once. + See [Actions on selected databases](../../studio/database/databases-list-view.mdx#actions-on-selected-databases) + +3. **Database name** + Click the name to open the database's [Documents view](../../studio/database/documents/documents-and-collections.mdx#the-documents-view). + * A house symbol on the database icon marks a database hosted by the node that Studio is connected to. + * For a database that this node does not host, the Documents view opens in a new browser tab, on a node that hosts the database. + * The name of a disabled database cannot be clicked. + +4. **Manage group** + Open the [Manage Database Group](../../studio/database/settings/manage-database-group.mdx) view, to manage the database group + (the nodes that host the database). + +5. **Disable** + Disable the database. + You will be asked to confirm. + A disabled database cannot be accessed, and its data is kept. + To enable a disabled database, click **Enable** (the label this button shows while the database is disabled). + +6. **More actions** + Open a menu of additional actions. + + ![More actions](./assets/databases-list-view_more-actions.png) + + * A. **Pause indexing until restart** + Pause the indexing of all the database's indexes, including indexes created while indexing is paused. + In the dialog that opens, click **Pause**. + When the database is hosted by more than one node or is [sharded](../../sharding/overview.mdx), the dialog also displays + a **Select context** area, where you can select the nodes (and shards) to pause indexing on. + + ![Pause indexing](./assets/databases-list-view_pause-indexing.png) + + Indexing resumes when the server restarts, when the database is restarted (see **Restart database** below), + or when you resume indexing. + While indexing is paused, an **Indexing paused** badge is displayed, and **Resume indexing** appears at the top of the menu. + + ![Indexing paused](./assets/databases-list-view_indexing-paused.png) + + To resume indexing, select **Resume indexing** and click **Resume** in the dialog that opens. + * When the database is hosted by more than one node or is sharded, the Resume dialog also displays a **Select context** + area, where you can select the nodes (and shards) to resume indexing on. + * Indexing can also be paused and resumed using the client API. + See [Pause Indexing Operation](../../client-api/operations/maintenance/indexes/stop-indexing.mdx) + and [Resume Indexing Operation](../../client-api/operations/maintenance/indexes/start-indexing.mdx) + * B. **Disable indexing** + Disable the indexing of all the database's indexes, on all the nodes that host the database. + You will be asked to confirm. + * The change takes effect only after the database is reloaded. + To reload the database, restart it (see **Restart database** below), disable and enable it, or restart the server. + * Indexing stays disabled after the database is reloaded and after the server restarts, until you select **Enable indexing** + (shown in place of **Disable indexing**) and reload the database. + * C. **Restart database** + Restart the database. + In the dialog that opens, click **Restart**. + When the database is hosted by more than one node or is sharded, the dialog also displays a **Select restart context** + area, where you can select the nodes (and shards) to restart the database on. + * D. **Compact database** + Open a dialog to compact the database's documents and indexes, reducing the disk space the database uses. + The database is offline during compaction. + Learn more in [Compact Database Operation](../../client-api/operations/server-wide/compact-database.mdx). + +7. **Delete** + Delete the database. + In the dialog that opens, click **Delete & Keep Files** to delete the database from all the cluster nodes and keep the + database's files on disk, or **Delete All Data** to delete the files as well. + * To delete the database from specific nodes only, use the + [Manage Database Group](../../studio/database/settings/manage-database-group.mdx) view. + * The **Delete** button is disabled when the database's delete lock mode prevents deletion (see **Delete lock mode** below). + +8. **Delete lock mode** + Set the database's delete lock mode, to allow or prevent the deletion of the database. + You will be asked to confirm the change. + + ![Delete lock mode](./assets/databases-list-view_delete-lock-mode.png) + + * A. **Allow database delete** + The database can be deleted. + This is the default mode. + * B. **Prevent database delete** + Requests to delete the database are ignored, and no error is returned. + * C. **Prevent database delete (Error)** + Requests to delete the database fail with an error. + + + + + +The lower part of each listed database shows the database's statistics, and the nodes of its database group. + +![Database stats](./assets/databases-list-view_database-stats.png) + +1. **Expand distribution details** + Display the statistics of the database on each node of the database group, in place of the **Nodes** list. + Click the button again to collapse the distribution details. + + ![Distribution details](./assets/databases-list-view_distribution-details.png) + + * A. **Database state** + A striped label marks a database that is loaded by only some of the nodes of its database group + (in this image, by one of three nodes). + * B. **Nodes** + The details include a column for each node of the database group. + The node icon is grayed out when the node has not loaded the database. + * C. **Documents** + The number of documents in the database on each node. + * D. **Task Errors** + The number of errors raised by the database's [ongoing tasks](../../monitoring/task-errors/studio-views.mdx) on each node. + * E. **Indexing Errors** + The number of indexing errors on each node. + * F. **Indexing Status** + The indexing status on each node (e.g., `Running`, `Paused`, or `Disabled`). + * G. **Alerts** + The number of alerts raised for the database on each node. + * H. **Performance Hints** + The number of performance hints raised for the database on each node. + * I. **Size on disk** + The disk space the database uses on each node. + * J. **Uptime** + The time that has passed since each node loaded the database, or `Offline` for a node that has not loaded the database. + +2. **Encryption** + An icon that shows whether the database is [encrypted](../../server/security/encryption/database-encryption.mdx). + Hovering over the icon displays `This database is encrypted` or `This database is not encrypted`. + +3. **Size** + The disk space the database uses, including temporary buffers. + Click the size to open the + [Database Storage Report](../../monitoring/performance-views/storage-reports.mdx#database-storage-report) view. + +4. **Documents** + The number of documents in the database. + Click the number to open the database's + [Documents view](../../studio/database/documents/documents-and-collections.mdx#the-documents-view). + +5. **Indexes** + The number of indexes in the database. + Click the number to open the [Indexes List view](../../studio/database/indexes/indexes-list-view.mdx). + +6. **Backup status** + The time of the database's latest backup, or `Never backed up` if the database has never been backed up. + The text is green when the latest backup was taken within the last 24 hours, yellow when the latest backup is older + than 24 hours, and red when the database has never been backed up. + Click the text to open the database's **Backups** view. + +7. **Badges** + Badges call attention to issues requiring it, and are displayed only when there is an issue to report. + * **Indexing errors**: the number of indexing errors on all the nodes of the database group. + Click the badge to open the **Index Errors** view. + Learn about indexing errors in [Debugging Index Errors](../../indexes/troubleshooting/debugging-index-errors.mdx). + * **Task errors**: the number of errors raised by the database's ongoing tasks on all the nodes of the database group. + Click the badge to open the [Task Errors view](../../monitoring/task-errors/studio-views.mdx#task-errors-view). + * **Indexing paused** or **Indexing disabled**: indexing is paused or disabled on at least one node of the database group. + Click the badge to open the Indexes List view. + * **Alerts** or **Performance hints**: the number of alerts or performance hints raised for the database on the node that + Studio is connected to. + When other nodes of the database group hold alerts or hints as well, a globe icon is added, with the total number + reported by all the nodes of the database group. + Click the badge to open the [notification center](../../monitoring/alerts-and-notifications/notification-center.mdx). + * **Database has load errors!**: at least one node of the database group failed to load the database. + +8. **Nodes** + The nodes of the database group. + The icon next to each node tag shows the node's + [state in the database group](../../server/clustering/distribution/distributed-database.mdx#database-topology) + (Member, Promotable, or Rehab). + Hovering over the icon displays the state. -* **Note:** Clicking on a remote database will navigate to the documents view for this database on one of its containing nodes. + +The database's size, number of documents, and backup status are read from the node that Studio is connected to. +If this node does not host the database, the values are read from one of the nodes that do host it. + + + + + +To perform an action on several databases at once, select the databases +(see **Select All** in [Database list view](../../studio/database/databases-list-view.mdx#database-list-view)). +When one or more databases are selected, a selection bar appears at the right end of the **Select All** line. + +![Selection actions](./assets/databases-list-view_selection-actions.png) + +* A. **Selected databases** + The number of selected databases. +* B. **Set state** + Select **Enable** or **Disable** to enable or disable all the selected databases. + You will be asked to confirm. +* C. **Set delete lock mode** + Set the delete lock mode of all the selected databases + (see **Delete lock mode** in [Database actions](../../studio/database/databases-list-view.mdx#database-actions)). + You will be asked to confirm. +* D. **Delete** + Delete the selected databases. + * Only the selected databases whose delete lock mode allows deletion are deleted. + The **Delete** button is disabled when the delete lock mode of every selected database prevents deletion. + * In the dialog that opens, click **Delete & Keep Files** or **Delete All Data** + (see **Delete** in [Database actions](../../studio/database/databases-list-view.mdx#database-actions)). + The option you select applies to all the deleted databases. +* E. **Cancel** + Deselect all the databases. + + diff --git a/docs/studio/database/queries/assets/query-view-ID-column.png b/docs/studio/database/queries/assets/query-view-ID-column.png index 68c403ce60..14e4d86b7d 100644 Binary files a/docs/studio/database/queries/assets/query-view-ID-column.png and b/docs/studio/database/queries/assets/query-view-ID-column.png differ diff --git a/docs/studio/database/queries/assets/query-view-add-custom-column.png b/docs/studio/database/queries/assets/query-view-add-custom-column.png index 80c1d52c49..86b473443b 100644 Binary files a/docs/studio/database/queries/assets/query-view-add-custom-column.png and b/docs/studio/database/queries/assets/query-view-add-custom-column.png differ diff --git a/docs/studio/database/queries/assets/query-view-display-dialog-actions.png b/docs/studio/database/queries/assets/query-view-display-dialog-actions.png index 623886e573..6d832a3538 100644 Binary files a/docs/studio/database/queries/assets/query-view-display-dialog-actions.png and b/docs/studio/database/queries/assets/query-view-display-dialog-actions.png differ diff --git a/docs/studio/database/queries/assets/query-view-display-dialog.png b/docs/studio/database/queries/assets/query-view-display-dialog.png deleted file mode 100644 index daef4ec3eb..0000000000 Binary files a/docs/studio/database/queries/assets/query-view-display-dialog.png and /dev/null differ diff --git a/docs/studio/database/queries/assets/query-view-export-to-csv-file.png b/docs/studio/database/queries/assets/query-view-export-to-csv-file.png deleted file mode 100644 index 389701760d..0000000000 Binary files a/docs/studio/database/queries/assets/query-view-export-to-csv-file.png and /dev/null differ diff --git a/docs/studio/database/queries/assets/query-view-export-to-file.png b/docs/studio/database/queries/assets/query-view-export-to-file.png new file mode 100644 index 0000000000..f46aba8728 Binary files /dev/null and b/docs/studio/database/queries/assets/query-view-export-to-file.png differ diff --git a/docs/studio/database/queries/assets/query-view-export-visible-columns-only.png b/docs/studio/database/queries/assets/query-view-export-visible-columns-only.png deleted file mode 100644 index 9184029323..0000000000 Binary files a/docs/studio/database/queries/assets/query-view-export-visible-columns-only.png and /dev/null differ diff --git a/docs/studio/database/queries/assets/query-view-index-dropdown.png b/docs/studio/database/queries/assets/query-view-index-dropdown.png new file mode 100644 index 0000000000..2162a8737b Binary files /dev/null and b/docs/studio/database/queries/assets/query-view-index-dropdown.png differ diff --git a/docs/studio/database/queries/assets/query-view-load-query.png b/docs/studio/database/queries/assets/query-view-load-query.png index 71951f2d47..793735636f 100644 Binary files a/docs/studio/database/queries/assets/query-view-load-query.png and b/docs/studio/database/queries/assets/query-view-load-query.png differ diff --git a/docs/studio/database/queries/assets/query-view-multiple-records-result.png b/docs/studio/database/queries/assets/query-view-multiple-records-result.png index c82d20e469..304b6509bf 100644 Binary files a/docs/studio/database/queries/assets/query-view-multiple-records-result.png and b/docs/studio/database/queries/assets/query-view-multiple-records-result.png differ diff --git a/docs/studio/database/queries/assets/query-view-query-results.png b/docs/studio/database/queries/assets/query-view-query-results.png index 61e51be57b..f366456fb3 100644 Binary files a/docs/studio/database/queries/assets/query-view-query-results.png and b/docs/studio/database/queries/assets/query-view-query-results.png differ diff --git a/docs/studio/database/queries/assets/query-view-result-columns.png b/docs/studio/database/queries/assets/query-view-result-columns.png index 43ce24277b..7e10a6ed5f 100644 Binary files a/docs/studio/database/queries/assets/query-view-result-columns.png and b/docs/studio/database/queries/assets/query-view-result-columns.png differ diff --git a/docs/studio/database/queries/assets/query-view-save-query.png b/docs/studio/database/queries/assets/query-view-save-query.png index 873dfcee7d..5e15d8198c 100644 Binary files a/docs/studio/database/queries/assets/query-view-save-query.png and b/docs/studio/database/queries/assets/query-view-save-query.png differ diff --git a/docs/studio/database/queries/assets/query-view-settings.png b/docs/studio/database/queries/assets/query-view-settings.png index 66c0f3fcee..68d47d246f 100644 Binary files a/docs/studio/database/queries/assets/query-view-settings.png and b/docs/studio/database/queries/assets/query-view-settings.png differ diff --git a/docs/studio/database/queries/assets/query-view-text-string-result.png b/docs/studio/database/queries/assets/query-view-text-string-result.png index a71746dcb3..9395612e21 100644 Binary files a/docs/studio/database/queries/assets/query-view-text-string-result.png and b/docs/studio/database/queries/assets/query-view-text-string-result.png differ diff --git a/docs/studio/database/queries/assets/query-view.png b/docs/studio/database/queries/assets/query-view.png index ed451ed541..6a4241737c 100644 Binary files a/docs/studio/database/queries/assets/query-view.png and b/docs/studio/database/queries/assets/query-view.png differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-ID-column.snagx b/docs/studio/database/queries/assets/snagit/query-view-ID-column.snagx new file mode 100644 index 0000000000..4aa75b039a Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-ID-column.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-add-custom-column.snagx b/docs/studio/database/queries/assets/snagit/query-view-add-custom-column.snagx new file mode 100644 index 0000000000..5dffdeddee Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-add-custom-column.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-display-dialog-actions.snagx b/docs/studio/database/queries/assets/snagit/query-view-display-dialog-actions.snagx new file mode 100644 index 0000000000..2a1d16f330 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-display-dialog-actions.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-export-to-file.snagx b/docs/studio/database/queries/assets/snagit/query-view-export-to-file.snagx new file mode 100644 index 0000000000..c6e13935d3 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-export-to-file.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-index-dropdown.snagx b/docs/studio/database/queries/assets/snagit/query-view-index-dropdown.snagx new file mode 100644 index 0000000000..02cd89d071 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-index-dropdown.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-load-query.snagx b/docs/studio/database/queries/assets/snagit/query-view-load-query.snagx new file mode 100644 index 0000000000..1fbcf10ff7 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-load-query.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-multiple-records-result.snagx b/docs/studio/database/queries/assets/snagit/query-view-multiple-records-result.snagx new file mode 100644 index 0000000000..86bdbf9439 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-multiple-records-result.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-query-results.snagx b/docs/studio/database/queries/assets/snagit/query-view-query-results.snagx new file mode 100644 index 0000000000..f97a07e5bb Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-query-results.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-result-columns.snagx b/docs/studio/database/queries/assets/snagit/query-view-result-columns.snagx new file mode 100644 index 0000000000..a559169735 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-result-columns.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-save-query.snagx b/docs/studio/database/queries/assets/snagit/query-view-save-query.snagx new file mode 100644 index 0000000000..b974ddeb45 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-save-query.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-settings.snagx b/docs/studio/database/queries/assets/snagit/query-view-settings.snagx new file mode 100644 index 0000000000..58e3ffbb94 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-settings.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view-text-string-result.snagx b/docs/studio/database/queries/assets/snagit/query-view-text-string-result.snagx new file mode 100644 index 0000000000..c587556519 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view-text-string-result.snagx differ diff --git a/docs/studio/database/queries/assets/snagit/query-view.snagx b/docs/studio/database/queries/assets/snagit/query-view.snagx new file mode 100644 index 0000000000..16ae1095d8 Binary files /dev/null and b/docs/studio/database/queries/assets/snagit/query-view.snagx differ diff --git a/docs/studio/database/queries/query-view.mdx b/docs/studio/database/queries/query-view.mdx index 1b47d67bf6..7498578cfd 100644 --- a/docs/studio/database/queries/query-view.mdx +++ b/docs/studio/database/queries/query-view.mdx @@ -1,186 +1,317 @@ --- title: "Studio: Query View" sidebar_label: Query View -description: "Write and execute RQL queries in RavenDB Studio with syntax highlighting, auto-complete, result pagination, and query plan inspection." +description: "Write, save, and run RQL queries in Studio's Query view, set query options, and examine, customize, and export the query results." sidebar_position: 0 --- import Admonition from '@theme/Admonition'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import CodeBlock from '@theme/CodeBlock'; -import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; -import LanguageContent from "@site/src/components/LanguageContent"; +import Panel from "@site/src/components/Panel"; # Studio: Query View -* Use the **Query View** to run [RQL](../../../querying/rql/what-is-rql.mdx) queries and view their results. -* Queries can be executed either on a **Collection** or on an existing **Static-Index**. -* RavenDB always uses an index to fetch the query results. - When a query is executed over a Collection (without any filtering condition), - RavenDB uses an internal index that is kept in its internal storage. -* A query on a collection with some filtering condition will create an **Auto-Index** (Dynamic Query). - See [Index Types](../../../studio/database/indexes/indexes-overview.mdx#index-types) for details. -* Query results can be saved/exported to a CSV file. - -* In this page: - * [Query View](../../../studio/database/queries/query-view.mdx#query-view) - * [Query Results](../../../studio/database/queries/query-view.mdx#query-results) - * [Select Visible Columns](../../../studio/database/queries/query-view.mdx#select-visible-columns) - * [Result Columns](../../../studio/database/queries/query-view.mdx#result-columns) - * [Additional Query Options](../../../studio/database/queries/query-view.mdx#additional-query-options) +* Use Studio's **Query view** to write and run [RQL](../../../querying/rql/what-is-rql.mdx) queries on a database, + and to examine the query results. + +* Queries you save are kept in your browser's local storage, and can be loaded only in this browser. + +* You can set query options for the view, e.g., to prevent queries from creating + [auto indexes](../../../studio/database/indexes/indexes-overview.mdx#index-types), or to display the index entries that match + a query rather than the matching documents. + +* In the query results area, you can examine the index that served the query, view the query statistics, + delete the documents that match the query, and export the results to a CSV or a JSON file. + The result columns can also be customized, and each result can be previewed and its values copied. + +* Time series query results can be displayed as a graph over time, and spatial query results on a world map. + These displays are described in [Querying Time Series](../../../studio/database/document-extensions/time-series.mdx#querying-time-series) + and [Spatial Queries Map View](../../../studio/database/queries/spatial-queries-map-view.mdx). + +* In this article: + * [Query view](../../../studio/database/queries/query-view.mdx#query-view) + * [Query results](../../../studio/database/queries/query-view.mdx#query-results) + * [Customizing the result columns](../../../studio/database/queries/query-view.mdx#customizing-the-result-columns) + * [Inspecting result values](../../../studio/database/queries/query-view.mdx#inspecting-result-values) + * [Additional query types](../../../studio/database/queries/query-view.mdx#additional-query-types) -## Query View - -![Query View](./assets/query-view.png) - -1. **Query View** - Click to open the query view. -2. **Database** - Click to select the database you want to query. -3. **Syntax Samples** - Click to display [RQL](../../../querying/rql/what-is-rql.mdx) syntax samples. -4. **Query Box** - Enter your RQL query in the query box. -5. **Save Query** - Click to save the currently displayed query in the local browser storage. - ![Save Query](./assets/query-view-save-query.png) - Enter a name, and click the **Save** button again to save the query. + + + +Use the Query view to write, save, and load queries, and to run queries with the options you set. + +**`Indexes` > `Query`** + +![Query view](./assets/query-view.png) + +1. **Query** + Open the Query view. + +2. **Database selector** + Select the database to query. + +3. **Syntax** + Open a dialog with sample RQL queries. + +4. **Query editor** + Write your RQL query. + The editor offers auto-complete suggestions as you type. + +5. **Save...** + Save the query in your browser's local storage. + Click **Save...**, enter a name for the query, and click **Save**. + If a query with this name was already saved, you will be asked whether to overwrite the saved query. + + ![Save query](./assets/query-view-save-query.png) + 6. **Load Query** - Click to load a stored query. - Recent (unsaved) queries will also be listed here. - ![Load Query](./assets/query-view-load-query.png) - Hover over a query name to display its preview. - Click the query name or the preview **Load** button to load the query. -7. **Query Settings** - Click to set query settings. - ![Query Settings](./assets/query-view-settings.png) - * a. **Cache enabled** - Toggle to enable or disable caching of query results. - * b. **Disable creating new Auto-Indexes** - Toggle to disable Auto-Index creation for this query. - If no index exists to satisfy this query, an exception will be thrown. - * Toggling this ON will not affect Auto-Index creation in future Studio queries. - To disable all future Auto-Index creation from Studio queries, change the default setting in [Studio Configuration](../../../studio/database/settings/studio-configuration.mdx#disabling-auto-index-creation-on-studio-queries-or-patches) - * c. **Show stored index fields only** - Toggle to show the query results or only the stored index fields. - (Relevant only when querying an index) - * d. **Show raw index entries instead of index results** - Toggle to display **raw index entries** or **matching documents** in the query results. - (Relevant only when querying an index) -8. **Run Query** - Click to run the query. -9. **Query Results** - The results area displays selected columns of results retrieved by your query (see [below](../../../studio/database/queries/query-view.mdx#query-results)). - - -## Query Results - -![Query Results](./assets/query-view-query-results.png) - -1. **Index or Collection Used** - The index or the collection that was used by the query. -2. **Results Retrieval Time** - The time it took to retrieve the results. + Open the list of saved queries. + In addition to queries you saved explicitly, the list holds the queries you recently ran, each named `Recent Query` + and the name of the queried collection or index. + + ![Load query](./assets/query-view-load-query.png) + + * A. **Load** + Load the query displayed in the **Query preview** area into the editor, and run it. + * B. **A saved query** + Hovering over a query name displays the query in the **Query preview** area. + Click the query name to load the query into the editor and run it. + * C. **Delete** + Delete the query. + You will be asked to confirm the deletion. + +7. **Settings** + Set query options for this view. + + ![Query settings](./assets/query-view-settings.png) + + * A. **Cache enabled** + Enable or disable caching of query results. + * B. **Don't create a new Auto-Index** + Enable to prevent queries from creating auto indexes. + When this option is enabled and no existing auto index fits a query, the query will fail. + * The option's initial state is set in + [Studio configuration](../../../studio/database/settings/studio-configuration.mdx#disabling-auto-index-creation-on-studio-queries-or-patches). + * C. **Show stored index fields only** + Enable to display only the fields stored in the queried index. + This option is disabled for queries executed over a collection (e.g., `from "Orders"`). + * D. **Show raw index entries instead of matching documents** + Enable to display the index entries that match the query, rather than the matching documents. + * This option is disabled for queries executed over a collection (e.g., `from "Orders"`). + * For [map-reduce indexes](../../../indexes/map-reduce-indexes.mdx) and for indexes of + [counters](../../../indexes/indexing-counters.mdx) or [time series](../../../indexes/indexing-time-series.mdx), + the option is named **Show raw index entries instead of index results**, since the results of these indexes are not documents. + * E. **Ignore the index query size limit** + Enable to read the raw entries regardless of the index size. + * This option appears while **Show raw index entries** is enabled. + * Each index uses one of RavenDB's two [search engines](../../../indexes/search-engine/corax.mdx), Lucene or Corax. + By default, a request to display the raw entries of a Lucene index that holds more than 524,288 entries will fail, + since reading so many entries can take a long time and use a lot of memory. + Corax indexes have no such limit. + * F. **Projection Behavior** + Select the projection behavior, which determines whether the values of projected fields are retrieved from + the index or from the documents. + Learn more in the "Projection behavior with a static-index" section of + [Project Index Query Results](../../../indexes/querying/projections.mdx). + +8. **Run query** + Run the query (or press **Ctrl+Enter**). + If the query runs for longer than 5 seconds, an **Abort query** button appears below the run button. + +9. **Results** + The results of the query you ran. + See [Query results](../../../studio/database/queries/query-view.mdx#query-results) + + + + + +The results area displays the items the query returned, along with information about the query and controls you can +use to work with these items. + +![Query results](./assets/query-view-query-results.png) + +1. **Show raw output** + Open the query's raw JSON response in a new browser tab. + +2. **Index** + The name of the index that served the query. + Click the index name to open a menu of actions related to the index. + For a query that retrieves a collection's documents without an auto index (e.g., `from "Orders"`), the collection's + name is displayed, with no menu. + Learn about the index used by each query type in [Query overview](../../../querying/overview.mdx). + + ![Index menu](./assets/query-view-index-dropdown.png) + + * A. **View index** + Open the index definition in the [Edit Index view](../../../studio/database/indexes/create-map-index.mdx#edit-index-view). + For a static index, the entry is named **Edit index**, and you can edit the index definition. + * B. **Explain why this index was used** + For a query executed over a collection, RavenDB selects the auto index that serves the query. + Open a dialog that shows the selected auto index, and the other auto indexes RavenDB considered with the reason + each index was rejected. + This entry is disabled for queries that specify an index (e.g., `from index "Orders/Totals"`), since RavenDB uses + the specified index and makes no selection. + * C. **View index terms** + Open the [Terms view](../../../studio/database/indexes/create-map-index.mdx#index-fields--terms), + which lists the index fields and the terms the index stores for each field. + * D. **Index performance** + Open the [Indexing Performance view](../../../studio/database/indexes/indexing-performance.mdx). + * E. **MapReduce Visualizer** + Open the [Map-Reduce Visualizer](../../../studio/database/indexes/map-reduce-visualizer.mdx) view. + This entry is available only for [map-reduce indexes](../../../indexes/map-reduce-indexes.mdx). + +3. **Query duration** + The time it took to retrieve the query results. + - Add `include timings()` to your RQL to display additional timing details in the results. + To see a breakdown of the query duration, add `include timings()` to the query. Learn more in [Include Query Timings](../../../client-api/session/querying/debugging/query-timings.mdx). -3. **Delete Documents** - Click to delete all documents that match the query. -4. **Statistics** - Click to view query statistics, including - - * Number of results - * Results status - * Query duration - * The index used by this query. - Either the index that was explicitly used by the query, or the internal RavenDB index that is - used [for collection queries](../../../client-api/faq/what-is-a-collection.mdx#collection-usages). - * An ETag representing the current state of the index used by the query. - (The ETag value changes with every change made to the documents) -5. **Export Results as CSV File** - * Click to store **all query results columns** in a CSV file. - ![Export to CSV File](./assets/query-view-export-to-csv-file.png) - * Click the drop-down and select "Export visible columns only" - to store **only the columns that are currently displayed**. - ![Export Visible Columns Only](./assets/query-view-export-visible-columns-only.png) -6. **Display** - Click to open the Display drop-down dialog, where you can select which columns - to display and add custom columns. (See **Select Visible Columns** below). -7. **Toggle Expanded/Collapsed View** - Click to expand or collapse the results view. -### Select Visible Columns - -To modify the displayed result columns, open the Display drop-down dialog from the [Query Results](../../../studio/database/queries/query-view.mdx#query-results) view. -Custom result columns can be added, edited and removed. - -![Display Dialog](./assets/query-view-display-dialog.png) - -1. **A query results column** -2. **A custom results column** -![Display Dialog - Actions](./assets/query-view-display-dialog-actions.png) - - -Changes made in the Display dialog will take effect only when the **Apply** button is clicked. - -1. **Display/Hide all columns** - Check or uncheck to display or hide all columns. -2. **Display/Hide column** - Check or uncheck to display or hide this column. -3. **Relocate Column** - Click and drag to relocate the column. -4. **Edit Custom Column** - Click to edit the custom column's **field** and **alias** (see **Add Custom Column** below). -5. **Remove Custom Column** - Click to remove the custom column. -6. **Add Custom Column** - ![Add Custom Column](./assets/query-view-add-custom-column.png) - * a. Identify a results field that will be displayed in the custom column. - E.g. `this.Address.Country` - * b. Give the custom column an alias that will be displayed as the column's title. - E.g. `Country` - * c. Click to add the new column and close the custom column dialog. - * d. Click to close the custom column dialog without adding the new column. +4. **Delete documents** + Delete all the documents that match the query. + You will be asked to confirm the deletion. + This button is disabled when the query results are not documents (e.g., the results of a map-reduce index). + +5. **Statistics** + Open a dialog with the query statistics: + * **Total Results**: the number of results the query returned. + * **Status**: `Stale` if the index was [stale](../../../indexes/stale-indexes.mdx) when the query ran (some documents were + not processed by the index yet), `Up to date` otherwise. + * **Duration**: the time, in milliseconds, it took to run the query. + * **Index**: the name of the index that served the query. + * **ETag**: the ETag of the query results, which RavenDB uses to tell whether the results have changed since + the last retrieval. + +6. **Export to file** + Export the query results to a file. + + ![Export to file](./assets/query-view-export-to-file.png) + + * A. **Format** + Select the file format: **CSV** or **JSON**. + * B. **Columns** + Select **All** to export all the result columns, or **Visible** to export only the columns currently displayed. + Custom columns are not exported. + * C. **Export** + Download the exported file. + +7. **Display** + Select the result columns to display, and add columns of your own. + See [Customizing the result columns](../../../studio/database/queries/query-view.mdx#customizing-the-result-columns) + +8. **Expand results** + Hide the query editor, so the results take up the whole view. + Click **Collapse results** to display the query editor again. + + + + + +Use the **Display** dialog to select the result columns to display, set the order of the columns, and add columns of your own. +To open the dialog, click **Display** in the [results area](../../../studio/database/queries/query-view.mdx#query-results). + +![Display dialog](./assets/query-view-display-dialog-actions.png) + +1. **Select All** + Clear all the column checkboxes, or select all the checkboxes when none is selected. + When only some of the columns are selected, the **Select All** checkbox is partially checked. + +2. **Column checkbox** + Select or clear the checkbox to display or hide the column. + +3. **Drag handle** + Drag the handle up or down to move the column to another position among the result columns. + +4. **Edit** + Edit the binding and alias of a custom column, using the custom column form (see **Add a custom column** below). + This icon appears only on custom columns. + +5. **Remove** + Remove a custom column. + This icon appears only on custom columns. + +6. **Add a custom column** + Open the custom column form, to add a column whose values are returned by a JavaScript expression you define. + + ![Add custom column](./assets/query-view-add-custom-column.png) + + * A. **Binding** + Enter a JavaScript expression that returns the column's value for each result, using `this` to refer + to the result. e.g.: `this.ShipTo.Country` + * B. **Alias** + Enter the column's title. + * C. **Add** + Add the column to the results. + The column is displayed right away, without clicking **Apply**. + * D. **Cancel** + Close the form without adding the column. + 7. **Reset to default** - Reset result columns to their original state (determined by the query). + Restore the default result columns and their default order. + + + Resetting the result columns to their default will remove any custom columns. + + 8. **Close** - Close the Display dialog without applying your changes. + Close the dialog without applying your changes. + 9. **Apply** - Apply your changes and close the Display dialog. -### Result Columns + Apply your changes and close the dialog. + This button is enabled only when at least one column is selected. -![Result Columns](./assets/query-view-result-columns.png) + +When you run a query, the default result columns will be restored and any custom columns will be removed. + + + + + + +Use the results table to preview results, open result documents, and examine or copy the values in the table cells. + +![Result columns](./assets/query-view-result-columns.png) 1. **Preview** - Click for a preview of the retrieved item. + Open a dialog that displays the result in JSON format. + 2. **Document ID** - Click the ID to open this document in the [Document View](../../../studio/database/documents/document-view.mdx), - -or- - Hover over the ID to display it in text format and optionally copy it to the clipboard. - ![Hover ID](./assets/query-view-ID-column.png) -3. **Multiple Records Result** - Hover over the brackets to display the retrieved records and optionally copy them to the clipboard. - ![Multiple Records Result](./assets/query-view-multiple-records-result.png) -4. **Text Result** - Hover over the text to display and optionally copy it to the clipboard. - ![Text String Result](./assets/query-view-text-string-result.png) + Click the document ID to open the document in the [Document view](../../../studio/database/documents/document-view.mdx). + Hovering over the ID displays the ID in a popup, with a **Copy to clipboard** button. + + ![ID popup](./assets/query-view-ID-column.png) + +3. **Array value** + An array is displayed as `[...]`, with the number of the array's items next to the brackets. + An object is displayed in a similar way, as `{...}` with the number of the object's properties. + Hovering over an array or an object displays the full value in a popup, with a **Copy to clipboard** button. + ![Array popup](./assets/query-view-multiple-records-result.png) +4. **Text value** + Hovering over a value displays the full value in a popup, with a **Copy to clipboard** button. -## Additional Query Options + ![Value popup](./assets/query-view-text-string-result.png) -Some RavenDB features enhance the queries options. + -* [Time Series Query](../../../document-extensions/timeseries/overview.mdx) results provide insight - into your time-series data, including a graph view over time. - Learn more about it [here](../../../studio/database/document-extensions/time-series.mdx#querying-time-series). -* [Spatial Query](../../../studio/database/queries/spatial-queries-map-view.mdx) results include - a Spatial Map Tab that [displays geographical locations](../../../studio/database/queries/spatial-queries-map-view.mdx#spatial-map-view) - on the world map. -* [Counter Query](../../../document-extensions/counters/counters-and-other-features.mdx#counters-and-queries) can be used to get counters data. + +The Query view also displays the results of these query types: +* **Time series queries** + The results of a [time series](../../../document-extensions/timeseries/overview.mdx) query can be viewed as a + table or as a graph over time. + See [Querying Time Series](../../../studio/database/document-extensions/time-series.mdx#querying-time-series) +* **Spatial queries** + The results of a [spatial query](../../../studio/database/queries/spatial-queries-map-view.mdx) can be displayed + on a world map, in the **Spatial Map** tab. + See [Spatial map view](../../../studio/database/queries/spatial-queries-map-view.mdx#spatial-map-view) +* **Counter queries** + A query can select [counter](../../../document-extensions/counters/counters-and-other-features.mdx) values, which are + then displayed in the query results. + diff --git a/docs/studio/database/settings/studio-configuration.mdx b/docs/studio/database/settings/studio-configuration.mdx index e2ab02d934..3f6774f263 100644 --- a/docs/studio/database/settings/studio-configuration.mdx +++ b/docs/studio/database/settings/studio-configuration.mdx @@ -58,7 +58,7 @@ In this page: * If set to `true`, **Disable auto-index-creation** will prevent future queries or patches from creating Auto-Indexes. * If there is no index to satisfy a query or patch, an exeption will be thrown stating that `Creation of Auto Indexes was disabled and no Auto Index matching the given query was found.` - * You can temporarily allow auto-index creation as a result of a query or patch in the Studio [query settings](../../../studio/database/queries/query-view.mdx#query-view) + * You can temporarily allow auto-index creation as a result of a query or patch in the Studio [query settings](../../../studio/database/queries/query-view.mdx#query-settings) and [patch settings](../../../documents/patching-documents/patch-multiple-documents/patch-view.mdx#patch-configuration)