More Powerful Query Editor
Feature Request
Is your feature request related to a problem? Please describe:
A simple query editor is now implemented in https://github.com/pingcap-incubator/tidb-dashboard/pull/713. Its functionality is very limited so that it is marked as "experimental". We can provide more features so that it is GA.
Describe the feature you'd like:
- Support export full data as csv, xlsx
- Support BINARY(BLOB) and NULL.
- For BINARY data, it should be displayed as a "BINARY" label but user can view its hex value or even download the value after clicking the cell. A great example is MySQL Workbench:

- For BINARY data, it should be displayed as a "BINARY" label but user can view its hex value or even download the value after clicking the cell. A great example is MySQL Workbench:
- Support selecting the connection database and TiDB instance
- TiDB instance single selector should be implemented first, like
InstanceSelectbut only select one TiDB instance.
- TiDB instance single selector should be implemented first, like
- Support keyword highlighting for the editor according to TiDB parser
- Support multiple resultsets for multiple statements
- A loose parser that split multiple statements should be implemented first. The parser should be relaxed to accept future TiDB syntax
- Preserve and use same session on the page, instead of destroying and recreating one each time
- Note: Using WebSocket may not be a good idea, since TiDB Dashbaord is likely to be deployed behind a HTTP proxy which does not support WebSocket. My idea is a session pool with GC.
- Save the query (for future use).
- Query history (no need for persistence) like MySQL Workbench:

Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
Contribution is welcome. Better to split into multiple PRs, with each one focus on one feature.
- Support export full data as csv, xlsx
is the data to be exported the one already displayed in the frontend or the one generated by the backend after request?
- Support export full data as csv, xlsx
is the data to be exported the one already displayed in the frontend or the one generated by the backend after request?
Better to be the one generated the backend, since the frontend data is truncated.
Reference products:
