1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 10:08:52 +08:00

Add headers; fix images and links

This commit is contained in:
lana-k
2022-01-06 22:34:07 +01:00
parent 0698522fa5
commit 27bb23ac3d
10 changed files with 51 additions and 86 deletions

View File

@@ -1,16 +1,10 @@
# Diagnostic information
SQLite running in sqliteviz is compiled with particular [options][1] that can
enable or disable some SQLite features. You can get a list of them in `App
info` dialog (fig. 1) by clicking on <img src="./img/info.svg"/> icon in the top
info` dialog (fig. 1) by clicking on ![](./img/info.svg) icon in the top
toolbar.
<p align="center">
<img class="figure" src="./img/Screenshot_app_info.png?0.13.0"/>
</p>
<p align="center">
<sub>
Fig. 1: App info dialog
</sub>
</p>
![Fig. 1: App info dialog](./img/Screenshot_app_info.png)
[1]: https://sqlite.org/compile.html

View File

@@ -1,4 +1,6 @@
# Export current database
Sqliteviz allows running not only `SELECT` statements but DML/DDL statements
too. You can save database modifications into a `.sqlite` file by clicking on
icon <img src="./img/file-export.svg"/> next to the database name on `Workspace`
icon ![](./img/file-export.svg) next to the database name on `Workspace`
page.

View File

@@ -1,7 +1,9 @@
# How to build a pivot table in SQLite
This how-to explores how to build pivot tables in SQLite, which doesn't have a
special constructs like `PIVOT` or `CROSSTAB` in its SQL dialect.
# Static-column pivot table
## Static-column pivot table
If the columns of a pivot table are known beforehand, it's possible to write a
standard, say SQL-92, query that would produce a pivot table in its result set.
@@ -87,7 +89,7 @@ ORDER BY
END
```
# Dynamic-column pivot table
## Dynamic-column pivot table
SQLite in sqliteviz is built with [pivot_vtab][2] extension. The same result set
can be produced with this, arguably simpler and more maintainable, query.

View File

@@ -1,4 +1,6 @@
# Rename columns
# How to rename tables and columns after CSV import
## Rename columns
If sqliteviz parses CSV without `Use first row as column headers` option then
it will name the columns like `col1`, `col2` etc. You can easily rename the
@@ -9,7 +11,7 @@ ALTER TABLE your_table_name
RENAME COLUMN current_column_name TO new_column_name;
```
## Column rename example
### Column rename example
There is a table `dots` with columns `col1`, `col2`, `col3`. Here are the steps
to rename the columns to `x`, `y` and `z` respectively:
@@ -28,17 +30,17 @@ ALTER TABLE dots
RENAME COLUMN col3 TO z;
```
- Click <img src="./img/run.svg"/> to run the script
- Click ![](./img/run.svg) to run the script
# Rename table
## Rename table
```sql
ALTER TABLE current_table_name
RENAME TO new_table_name;
```
## Table rename example
### Table rename example
There is a table `dots`. Here are the steps to rename it to `point`:
@@ -49,4 +51,4 @@ There is a table `dots`. Here are the steps to rename it to `point`:
ALTER TABLE dots RENAME TO point
```
- Click <img src="./img/run.svg"/> to run the script
- Click ![](./img/run.svg) to run the script

View File

@@ -1,3 +1,5 @@
# Installation
The latest release of sqliteviz is running on [Github pages][1].
Basically, you don't need to install sqliteviz. But if you want you can install

View File

@@ -1,3 +1,5 @@
# Integrate predefined inquiries
If you run sqliteviz on your own server you can specify predefined inquiries.
These inquiries will appear in `Inquiries` list for all users working with
sqliteviz on your server.

View File

@@ -1,19 +1,18 @@
# Organise
# Manage inquiries
## Organise
You can find all inquiries that you saved in `Inquiries` (fig. 1).
<p align="center"> <img class="figure" src="./img/Screenshot_my_inquiries.png"
width="700"/> </p>
<p align="center"> <sub> Fig. 1: Inquiries </sub> </p>
![Fig. 1: Inquiries](./img/Screenshot_my_inquiries.png)
To manipulate one inquiry hover the cursor over the row with the inquiry and
choose the action:
* <img src="./img/rename.svg"/> rename an inquiry
* <img src="./img/copy.svg"/> duplicate an inquiry
* <img src="./img/file-export.svg"/> export an inquiry to JSON file
* <img src="./img/delete.svg"/> delete an inquiry
* ![](./img/rename.svg) rename an inquiry
* ![](./img/copy.svg) duplicate an inquiry
* ![](./img/file-export.svg) export an inquiry to JSON file
* ![](./img/delete.svg) delete an inquiry
To edit a query or visualisation settings of an inquiry click on the respective
row. You will be redirected to `Workspace` where the chosen inquiry will be
@@ -27,19 +26,14 @@ You can also delete or export a group of inquiries to a JSON file. Select
inquiries with checkboxes and press `Delete`/`Export` button above the grid
(fig. 2).
<p align="center"> <img class="figure" src="./img/Screenshot_group.png?0.15.0"
width="600"/> </p>
<p align="center"> <sub> Fig. 2: Inquiries: a group of inquiries is selected
</sub> </p>
![Fig. 2: Inquiries: a group of inquiries is selected](./img/Screenshot_group.png)
> **Note:** Some operations are not available for predefined inquiries. Read
> [Predefined inquiries][1] for details.
# Import
## Import
Click `Import` button on `Inquiries` page to import inquiries from a JSON file
generated by export.
[1]: Predefined-inquiries
[1]: ../Predefined-inquiries

View File

@@ -1,10 +1,12 @@
# Multiple CSV file import
Sometimes it's useful to import several CSV files as tables in one database. For
example, to be able to `JOIN` them in SQL.
In sqliteviz you can not only create a database from a CSV file, but also add
another table from CSV to the existing database.
- Click <img src="./img/add-csv.svg"/> icon in the schema panel on `Workspace`
- Click ![](./img/add-csv.svg) icon in the schema panel on `Workspace`
page
- Choose a CSV file
- Import it with `CSV import` dialog.

View File

@@ -1,9 +1,10 @@
# Pivot table UI
# Pivot table
## Pivot table UI
Sqliteviz allows building pivot tables and visualizing them. To build a pivot
run a query to get data. Then open visualisation panel by clicking <img
src="./img/visualisation.svg"/> in any of the two side toolbars and choose a
pivot mode by clicking <img src="./img/pivot.svg"/>.
run a query to get data. Then open visualisation panel by clicking ![](./img/visualisation.svg)
in any of the two side toolbars and choose a pivot mode by clicking ![](./img/pivot.svg).
A pivot visualisation has the following settings:
@@ -18,54 +19,24 @@ A pivot visualisation has the following settings:
- View pivot table visualisation. It can be a table, a heatmap, a chart,
etc. See some examples of different views of the same pivot table below.
<p align="center">
<img class="figure" src="./img/Screenshot_pivot_table.png" width="900"/>
</p>
<p align="center">
<sub>
Fig. 1: Table
</sub>
</p>
![Fig. 1: Table](./img/Screenshot_pivot_table.png)
<p align="center">
<img class="figure" src="./img/Screenshot_pivot_heatmap.png" width="900"/>
</p>
<p align="center">
<sub>
Fig. 2: Heatmap
</sub>
</p>
![Fig. 2: Heatmap](./img/Screenshot_pivot_heatmap.png)
<p align="center">
<img class="figure" src="./img/Screenshot_pivot_barchart.png" width="900"/>
</p>
<p align="center">
<sub>
Fig. 3: Horizontal Stacked Bar Chart
</sub>
</p>
![Fig. 3: Horizontal Stacked Bar Chart](./img/Screenshot_pivot_barchart.png)
There are several built-in chart views for a pivot. But you can build your own
with `Custom chart` view (fig. 4).
<p align="center">
<img class="figure" src="./img/Screenshot_pivot_custom chart.png"
width="900"/>
</p>
<p align="center">
<sub>
Fig. 4: Custom Chart
</sub>
</p>
![Fig. 4: Custom Chart](./img/Screenshot_pivot_custom chart.png)
> **Note:** You can switch to other pivot views and back to `Custom chart`
> all your custom chart settings will be remembered. But if you switch the
> visualisation mode from pivot to any other mode, unsaved changes will be lost.
You can save any visualisation as an image by clicking <img
src="./img/camera.svg"/>.
You can save any visualisation as an image by clicking ![](./img/camera.svg).
# Pivot table SQL
## Pivot table SQL
Pivot table (in the form of a result set) can be built on the SQL-level and,
technically speaking, can be visualised as any other result set. Practically

View File

@@ -1,3 +1,5 @@
# Predefined inquiries
Predefined inquiries come out of the box on the sqliteviz instance. In sqliteviz
deployed on [Github Pages][1] there are no predefined inquiries, but you may
see them if you use sqliteviz integrated into another app.
@@ -5,15 +7,7 @@ see them if you use sqliteviz integrated into another app.
These inquiries are shown in `Inqueries` list with a special label on the mouse
over (fig. 1).
<p align="center">
<img class="figure" src="./img/Screenshot_predefined.png?0.15.0"
width="700"/>
</p>
<p align="center">
<sub>
Fig. 1: Predefined inquiry
</sub>
</p>
![Fig. 1: Predefined inquiry](./img/Screenshot_predefined.png)
As a user, you can't rename or delete a predefined inquiry. You can't save
changes in a predefined inquiry, but you can save them as a new inquiry. The