mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
Add headers; fix images and links
This commit is contained in:
@@ -1,16 +1,10 @@
|
|||||||
|
# Diagnostic information
|
||||||
|
|
||||||
SQLite running in sqliteviz is compiled with particular [options][1] that can
|
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
|
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  icon in the top
|
||||||
toolbar.
|
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>
|
|
||||||
|
|
||||||
[1]: https://sqlite.org/compile.html
|
[1]: https://sqlite.org/compile.html
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
# Export current database
|
||||||
|
|
||||||
Sqliteviz allows running not only `SELECT` statements but DML/DDL statements
|
Sqliteviz allows running not only `SELECT` statements but DML/DDL statements
|
||||||
too. You can save database modifications into a `.sqlite` file by clicking on
|
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  next to the database name on `Workspace`
|
||||||
page.
|
page.
|
||||||
|
|||||||
@@ -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
|
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.
|
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
|
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.
|
standard, say SQL-92, query that would produce a pivot table in its result set.
|
||||||
@@ -87,7 +89,7 @@ ORDER BY
|
|||||||
END
|
END
|
||||||
```
|
```
|
||||||
|
|
||||||
# Dynamic-column pivot table
|
## Dynamic-column pivot table
|
||||||
|
|
||||||
SQLite in sqliteviz is built with [pivot_vtab][2] extension. The same result set
|
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.
|
can be produced with this, arguably simpler and more maintainable, query.
|
||||||
|
|||||||
@@ -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
|
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
|
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;
|
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
|
There is a table `dots` with columns `col1`, `col2`, `col3`. Here are the steps
|
||||||
to rename the columns to `x`, `y` and `z` respectively:
|
to rename the columns to `x`, `y` and `z` respectively:
|
||||||
@@ -28,17 +30,17 @@ ALTER TABLE dots
|
|||||||
RENAME COLUMN col3 TO z;
|
RENAME COLUMN col3 TO z;
|
||||||
```
|
```
|
||||||
|
|
||||||
- Click <img src="./img/run.svg"/> to run the script
|
- Click  to run the script
|
||||||
|
|
||||||
|
|
||||||
# Rename table
|
## Rename table
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
ALTER TABLE current_table_name
|
ALTER TABLE current_table_name
|
||||||
RENAME TO new_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`:
|
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
|
ALTER TABLE dots RENAME TO point
|
||||||
```
|
```
|
||||||
|
|
||||||
- Click <img src="./img/run.svg"/> to run the script
|
- Click  to run the script
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Installation
|
||||||
|
|
||||||
The latest release of sqliteviz is running on [Github pages][1].
|
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
|
Basically, you don't need to install sqliteviz. But if you want you can install
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Integrate predefined inquiries
|
||||||
|
|
||||||
If you run sqliteviz on your own server you can specify 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
|
These inquiries will appear in `Inquiries` list for all users working with
|
||||||
sqliteviz on your server.
|
sqliteviz on your server.
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
# Organise
|
# Manage inquiries
|
||||||
|
|
||||||
|
## Organise
|
||||||
|
|
||||||
You can find all inquiries that you saved in `Inquiries` (fig. 1).
|
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>
|
|
||||||
|
|
||||||
To manipulate one inquiry hover the cursor over the row with the inquiry and
|
To manipulate one inquiry hover the cursor over the row with the inquiry and
|
||||||
choose the action:
|
choose the action:
|
||||||
|
|
||||||
* <img src="./img/rename.svg"/> – rename an inquiry
|
*  – rename an inquiry
|
||||||
* <img src="./img/copy.svg"/> – duplicate an inquiry
|
*  – duplicate an inquiry
|
||||||
* <img src="./img/file-export.svg"/> – export an inquiry to JSON file
|
*  – export an inquiry to JSON file
|
||||||
* <img src="./img/delete.svg"/> – delete an inquiry
|
*  – delete an inquiry
|
||||||
|
|
||||||
To edit a query or visualisation settings of an inquiry click on the respective
|
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
|
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
|
inquiries with checkboxes and press `Delete`/`Export` button above the grid
|
||||||
(fig. 2).
|
(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>
|
|
||||||
|
|
||||||
> **Note:** Some operations are not available for predefined inquiries. Read
|
> **Note:** Some operations are not available for predefined inquiries. Read
|
||||||
> [Predefined inquiries][1] for details.
|
> [Predefined inquiries][1] for details.
|
||||||
|
|
||||||
# Import
|
## Import
|
||||||
|
|
||||||
Click `Import` button on `Inquiries` page to import inquiries from a JSON file
|
Click `Import` button on `Inquiries` page to import inquiries from a JSON file
|
||||||
generated by export.
|
generated by export.
|
||||||
|
|
||||||
[1]: Predefined-inquiries
|
[1]: ../Predefined-inquiries
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
|
# Multiple CSV file import
|
||||||
|
|
||||||
Sometimes it's useful to import several CSV files as tables in one database. For
|
Sometimes it's useful to import several CSV files as tables in one database. For
|
||||||
example, to be able to `JOIN` them in SQL.
|
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
|
In sqliteviz you can not only create a database from a CSV file, but also add
|
||||||
another table from CSV to the existing database.
|
another table from CSV to the existing database.
|
||||||
|
|
||||||
- Click <img src="./img/add-csv.svg"/> icon in the schema panel on `Workspace`
|
- Click  icon in the schema panel on `Workspace`
|
||||||
page
|
page
|
||||||
- Choose a CSV file
|
- Choose a CSV file
|
||||||
- Import it with `CSV import` dialog.
|
- Import it with `CSV import` dialog.
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
# Pivot table UI
|
# Pivot table
|
||||||
|
|
||||||
|
## Pivot table UI
|
||||||
|
|
||||||
Sqliteviz allows building pivot tables and visualizing them. To build a pivot
|
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
|
run a query to get data. Then open visualisation panel by clicking 
|
||||||
src="./img/visualisation.svg"/> in any of the two side toolbars and choose a
|
in any of the two side toolbars and choose a pivot mode by clicking .
|
||||||
pivot mode by clicking <img src="./img/pivot.svg"/>.
|
|
||||||
|
|
||||||
A pivot visualisation has the following settings:
|
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,
|
- 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.
|
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>
|
|
||||||
|
|
||||||
<p align="center">
|

|
||||||
<img class="figure" src="./img/Screenshot_pivot_heatmap.png" width="900"/>
|
|
||||||
</p>
|
|
||||||
<p align="center">
|
|
||||||
<sub>
|
|
||||||
Fig. 2: Heatmap
|
|
||||||
</sub>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
There are several built-in chart views for a pivot. But you can build your own
|
There are several built-in chart views for a pivot. But you can build your own
|
||||||
with `Custom chart` view (fig. 4).
|
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>
|
|
||||||
|
|
||||||
> **Note:** You can switch to other pivot views and back to `Custom chart` –
|
> **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
|
> 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.
|
> visualisation mode from pivot to any other mode, unsaved changes will be lost.
|
||||||
|
|
||||||
You can save any visualisation as an image by clicking <img
|
You can save any visualisation as an image by clicking .
|
||||||
src="./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,
|
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
|
technically speaking, can be visualised as any other result set. Practically
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Predefined inquiries
|
||||||
|
|
||||||
Predefined inquiries come out of the box on the sqliteviz instance. In sqliteviz
|
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
|
deployed on [Github Pages][1] there are no predefined inquiries, but you may
|
||||||
see them if you use sqliteviz integrated into another app.
|
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
|
These inquiries are shown in `Inqueries` list with a special label on the mouse
|
||||||
over (fig. 1).
|
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>
|
|
||||||
|
|
||||||
As a user, you can't rename or delete a predefined inquiry. You can't save
|
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
|
changes in a predefined inquiry, but you can save them as a new inquiry. The
|
||||||
|
|||||||
Reference in New Issue
Block a user