lana-k / sqliteviz

Instant offline SQL-powered data visualisation in your browser
https://sqliteviz.com
Apache License 2.0
2.14k stars 116 forks source link

[RFE] SQL (extension) function documentation in UI #65

Open saaj opened 3 years ago

saaj commented 3 years ago

(from #62)

As a user of sqliteviz, In order to understand what functions are available for the query, I want to be able filter available in the query editor and/or dedicated panel.

SQLite has PRAGMA function_list. This list can be fed to CodeMirror autocomplete, or, say, right pannel with a filter akin to Google Sheets function list.

image

Question

  1. Has CodeMirror a mechanism to feed available SQL functions? An extension needed? Try out monaco-editor as alternative?
  2. Is it possible to show documentation snippet in the CodeMirror autocomplete?
  3. How to tell which functions are from which extensions?
twoxfh commented 3 years ago

Saaj,

The code currently feeding the drop down is in hint.js

It looks like code mirror has the ability to distinguish the displayText vs the hint. There may be an addon that makes it easier.

I have not seen a standard way of documenting system objects in sqlite, This may need to be another static json based on the default extensions supported.