tidb-dashboard icon indicating copy to clipboard operation
tidb-dashboard copied to clipboard

More Powerful Query Editor

Open breezewish opened this issue 5 years ago • 4 comments

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:

  1. Support export full data as csv, xlsx
  2. 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: image
  3. Support selecting the connection database and TiDB instance
    • TiDB instance single selector should be implemented first, like InstanceSelect but only select one TiDB instance.
  4. Support keyword highlighting for the editor according to TiDB parser
  5. 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
  6. 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.
  7. Save the query (for future use).
  8. Query history (no need for persistence) like MySQL Workbench: image

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

breezewish avatar Aug 03 '20 13:08 breezewish

Contribution is welcome. Better to split into multiple PRs, with each one focus on one feature.

breezewish avatar Aug 26 '20 16:08 breezewish

  1. 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?

unbyte avatar Dec 01 '20 07:12 unbyte

  1. 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.

breezewish avatar Dec 08 '20 06:12 breezewish

Reference products:

image

unbyte avatar Apr 15 '21 10:04 unbyte