Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown, Ascii Table and more export parameters #105

Open
invisal opened this issue Jun 28, 2024 · 0 comments · May be fixed by #112
Open

Markdown, Ascii Table and more export parameters #105

invisal opened this issue Jun 28, 2024 · 0 comments · May be fixed by #112
Assignees

Comments

@invisal
Copy link
Collaborator

invisal commented Jun 28, 2024

We would like to improve our export feature. The code of the design is already push in this branch https://github.com/invisal/libsql-studio/tree/export-more-params-and-format

image

  • User can select Complete (the whole result), Selected (only the selected rows)
  • User can select output target
    • File (download into file)
    • Clipboard (just save to clipboard)
  • Introduce two more format: Markdown and Ascii.
  • Each option now have more parameters.

SQL Option

  • Table Name (user can specify what should be the table name)
  • Batch Size

In SQL, you can insert in batch as the following

INSERT INTO table(...) VALUES 
  (...),
  (...),
  (...);

Markdown

We can export the result into markdown table.

| Column 1      | Column 2      |
| ------------- | ------------- |
| Cell 1, Row 1 | Cell 2, Row 1 |
| Cell 1, Row 2 | Cell 1, Row 2 |

The "Column Text Limit" controls what is the max text length for each column. If the cell text exceeds the limit, it will crop it out and add "..."

ASCII Table

Generate the ASCII table looking. It is good for copy and paste on Stackoverflow

+-------+-----+-----------+
| Name  | Age | Eye color |
+-------+-----+-----------+
| John  |  23 |   green   |
| Mary  |  16 |   brown   |
| Rita  |  47 |   blue    |
| Peter |   8 |   brown   |
+-------+-----+-----------+
@avevotsira avevotsira linked a pull request Jul 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants