docs: updating docs based on feedback

This commit is contained in:
Kacper Kula 2025-01-15 14:30:09 +00:00
parent 4dd84294b3
commit c7a319651c
9 changed files with 131 additions and 3 deletions

View file

@ -1,6 +1,8 @@
# Obsidian SQLSeal
SQLSeal allows to transform your CSV files located in your vault into fully-fledged SQL database. You can use SQL statements to query this data however you like.
SQLSeal allow you to query for files, tags and tasks in your vault using familar SQL syntax.
It also enables you to preview any CSV file in your vault as a database.
It brings fully featured database into your vault!
## Installation

View file

@ -17,6 +17,7 @@ export default defineConfig({
text: 'Documentation',
items: [
{ text: 'Quick Start', link: '/quick-start' },
{ text: 'Demo Vault', link: '/demo-vault' },
{ text: 'Changing Render Methods', link: '/changing-render-method'},
{ text: 'Using properties', link: '/using-properties' },
{ text: 'Query Vault Content', link: '/query-vault-content' },
@ -25,12 +26,30 @@ export default defineConfig({
{ text: 'CSV Viewer', link: '/csv-viewer'},
{ text: 'Troubleshooting', link: '/troubleshooting' },
{ text: 'Future Plans', link: '/future-plans' },
]
},
{
text: 'FAQ',
items: [
{ text: 'Comparison with Dataview', link: '/faq/comparison-with-dataview' }
]
},
{
text: 'Contributing',
items: [
{ text: 'Contributing', link: '/contributing/get-started' },
{ text: 'Reporting a bug', link: '/contributing/reporting-bugs' },
{ text: 'Project Architecture', link: '/contributing/project-architecture' }
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
{ icon: 'github', link: 'https://github.com/h-sphere/sql-seal' },
{ icon: 'discord', link: 'https://discord.gg/ZMRnFeAWXb' },
{ icon: 'bluesky', link: 'https://bsky.app/profile/hypersphereblog.bsky.social' }
],
footer: {
message: '',

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View file

@ -0,0 +1,16 @@
# Contributing
If you are interested in contributing to SQLSeal, thank you! SQLSeal is a side project developed out of passion and it's always great to get more hands on-board.
There are many ways you can contribute!
## Non-code contributions
You can help SQLSeal by [finding bugs](./reporting-bugs) or [expanding our Demo Vault](../demo-vault#Contributing). See the relevant pages for more information about that.
# Dev contributions
If you can code, you might be able to help us develop the plugin further. SQLSeal uses the following stack:
- TypeScript
- SQLite (compiled to WebAssembly)
- ESBuild
- PNPM
If you decide to contribute, let's see [Project Architecture](./project-architecture) for more info.

View file

@ -0,0 +1,40 @@
# Project Architecture
SQLSeal is an Obsidian Plugin written in TypeScript. We use the following tech stack:
- [PNPM](https://pnpm.io/)
- [TypeScript](https://www.typescriptlang.org/)
- [SQL.JS](https://github.com/sql-js/sql.js): [SQLite](https://www.sqlite.org/) compiled into WebAssembly
- [AbsurdSQL](https://github.com/jlongster/absurd-sql) to persist SQLite page blocks into IndexedDB and not keep the database in the memory
- [AGGrid](https://www.ag-grid.com/) - grid solution, default table renderer
- Node-SQL-Parser - to parse SQL and modify table names before sending it to SQLite
- Comlink - for Webworker communication abstraction
## Architecture overview
![Architecture Diagram](./diagram.png)
On the high level SQLSeal uses SQLite and communicates with it using WebWorker. The main process calls that Web Worker (using Comlink as a wrapper to abstract away complexity of postMessage and wrap it into class methods returning promises instead). The database is setup in a way that individual blocks are being persisted into the IndexedDB. Thanks to that even if the database grows, the memory footprint should stay relatively low.
## Extensible Architecture
The plugin is designed with extensible architecture in mind. I want to encourage people to write related plugins that expand functionality of SQLSeal or use it as the storage. Below I describe my plans. Some interfaces are already in place, some will be implemented at the later stage.
### Adding new Renderers
> [!NOTE] Stage
> Current Stage: Proof of Concept
SQLSeal by default gets 3 renderers (or views) bundled in: GRID (default), HTML and MARKDOWN. I want the plugin to reach the stage where external plugins can register their own renderers with thier own configuration and control how the query result is being displayed. I work on a SQLSeal Plot (codename) that allows you to chart results of your query. Once it's finished documentation and interface for this feature can be finalised.
### Register new data source
> [!NOTE] Stage
> Current Stage: Idea
I want to allow external plugins to register their data sources: i.e. plugin that fetches your IMDB watch history and creates new table. To allow full data ownership, the plugin would save the results on the disk (probably as CSV) so user can later use the data however they want.
### Register new data types
> [!NOTE] Stage
> Current Stage: Idea
### Expose SQLSeal interface to other plugins
> [!NOTE] Stage
> Current Stage: Development
Other plugins could extend SQLSeal's TABLE syntax so it can operate on more data types (i.e. JSON, XLSX).

View file

@ -0,0 +1,9 @@
# Reporting Bugs
If you found a bug in SQLSeal, please report it! The plugin is in active development and your report will make it better!
## How to report a bug
- Go to [SQLSeal Issues Page](https://github.com/h-sphere/sql-seal/issues)
- Add new issue
- Describe in details what problem you are enocountering. If possible, include the system you are using, SQL query that causes the problem, the error you are getting and any other relevant details
Thank you for improving the quality of this plugin!

22
docs/demo-vault.md Normal file
View file

@ -0,0 +1,22 @@
# Demo Vault
We prepared SQLSeal Demo Vault to help you get started. It includes set of example queries that showcases some basic functionality of the plugin.
I hope for the vault to expand and become both good in-depth tutorial for the plugin and source of inspirations for the setup.
[SQLSeal Demo Vault](https://github.com/h-sphere/sql-seal-demo-vault)
## Using the vault
To use the vault, click on the Code -> Download ZIP. Alternatively you can click [this link (ZIP file with Vault)](https://github.com/h-sphere/sql-seal-demo-vault/archive/refs/heads/main.zip). Once the file is downloaded, unzip it and open it in Obsidian.
The Vault has already SQLSeal installed so no extra setup should be required.
## Contributing
> [!TIP]
> If you never contributed to Open Source project before, I highly recommend [following this guide](https://github.com/firstcontributions/first-contributions).
If you want to contribute to the vault:
- Fork the vault into your GitHub account
- Clone it to your machine
- Open the vault in your Obsidian
- Make the changes
- Commit the changes
- Open a Pull Request again the Demo Vault repository.

View file

@ -0,0 +1,18 @@
# Comparison with Dataview
There are few other plugins which might sound like they do similar thing. The most popular of them, Dataview is an amazing project used by majority of Obsidian users so naturally I've got questions how does this compare to Dataview. Although I don't think this plugin is a replacement for dataview, and I personally use both of them on daily basis, here's the main comparison of the features:
| Feature | Dataview | SQLSeal |
|----------------------------------------------------|-------------------------------|--------------------------------------|
| Querying Data from your vault (files, tags, tasks) | ✅ | ✅ |
| Query language used | Dataview query language (DQL) | SQL (full compatibility with SQLite) |
| Mobile Support | ✅ | ✅ |
| Querying data files (CSV) | ❌ | ✅ |
| Editing data files (CSV) | ❌ | ✅ |
| Ability to join tables | ❌ | ✅ |
| Ability to filter data | ✅ | ✅ |
| Ability to perform basic aggregations | | |
| Support for inline queries | ✅ (using `=` prefix) | ✅ (using `S>` prefix) |
| Support for JavaScript | ✅ | ❌ (planned in the future) |
> [!NOTE]
> The table above is not-exhaustive and will be improved upon in the future.

View file

@ -5,7 +5,7 @@ layout: home
hero:
name: "Obsidian SQLSeal"
# text: "Plugin enabling full SQL capabilities in Obsidian"
tagline: "Plugin enabling full SQL capabilities in Obsidian"
tagline: "Query your vault using SQL"
actions:
- theme: brand
text: Get Started
@ -18,5 +18,7 @@ features:
details: With SQLite under the hood, you can use all functionality of the database
- title: Query your files and tags
details: Use SQL to filter files in your vault
- title: Add your own data
details: Operate on your CSV files using SQL to process them on the go
---