From 932a8b20a1cdcd809946260297a2c3d4343f3066 Mon Sep 17 00:00:00 2001 From: lana-k Date: Sat, 10 Jun 2023 18:42:06 +0200 Subject: [PATCH] Docs: Loading remote database and inquiries #109 --- Sharing.md | 25 +++++++++++++++++++++++++ sidebar.json | 1 + 2 files changed, 26 insertions(+) create mode 100644 Sharing.md diff --git a/Sharing.md b/Sharing.md new file mode 100644 index 0000000..911545b --- /dev/null +++ b/Sharing.md @@ -0,0 +1,25 @@ +# Sharing + +You can generate a share link. That allows to share not only inquiries but also +a database and inquiry display settings. Sqliteviz will automatically load +database and inquiries, open them and run the query for the first inquiry. + +The share link can have the following query parameters: + +| Parameter | Values | Description | +|--------------|----------------------------------|-------------| +| `data_url` | | A URL to an SQLite database file. If not provided sqliteviz will run inquiries agains an empty database.| +| `data_format`|`sqlite` | Currently share links support only "sqlite" data format. +| `inquiry_url`| | A URL to an inquiry JSON file (you can make that file with inquiry export – see [Manage inquiries][3]).| +| `inquiry_id` | | If `inquiry_id` is provided (can occure multiple times) sqliteviz will load only inquiries with provided IDs. If not provided it will get them all.| +| `maximize` | `table`, `sqlEditor`, `dataView` | Specify which panel should be maximised for each inquiry. If not provided the inquiries will be opened in the default state: SQL editor on top and result set at the bottom.| + +> **Note:** the server where you host your database or inquiry files must allow +cross-origin access. For example you can place your files on [GitHub Gist][1]. +You can check your URLs with [CORS tester][2]. + +Use the following form to generate a share link: + +[1]: https://gist.github.com/ +[2]: https://cors-test.codehappy.dev/?origin=https%3A%2F%2Fsqliteviz.com%2F&method=get +[3]: Manage-inquiries \ No newline at end of file diff --git a/sidebar.json b/sidebar.json index 4d33b6f..df3b0b6 100644 --- a/sidebar.json +++ b/sidebar.json @@ -10,6 +10,7 @@ "/docs/export-current-database/", "/docs/pivot-table/", "/docs/predefined-inquiries/", + "/docs/sharing/", "/docs/diagnostic-information/" ] },