sqlitebrowser / sqlitebrowser

Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at:
https://sqlitebrowser.org
Other
21.25k stars 2.14k forks source link

Copy as csv option #2721

Open jungle-boogie opened 3 years ago

jungle-boogie commented 3 years ago

Describe the new feature

This is to further enhance the 'export to csv' option in DB4S discussed in #2076. I had forgotten about the ability to export the results to csv with the icon mentioned above.

This is a feature request to right-click and copy as csv in the results portion of execute SQL. This would copy the results to the system clipboard. This would operate similarly to the already existing 'copy' option, but with commas separating the data.

Since this is a copy to clipboard, I don't think there's an issue of line feeds.

I'm using DB Browser for SQLite Version 3.12.99 (May 23 2021)

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

No, this is a new feature.

Does this feature exist in another product or project? Please provide a link.

Not that I know of.

chrisjlocke commented 3 years ago

...then you would also need 'Copy as JSON', then 'copy to semi-colon separated values' and 'copy to tab-seperated values' and ... and ... and ... 😉

jungle-boogie commented 3 years ago

yes, you're right. Feature creep is a real thing and I certainly don't want to introduce it, but there are already three options for copy: Copy, copy with headers, copy as SQL.

mgrojo commented 3 years ago

Some applications have a "Special copy" entry in the contextual menu, which opens a dialog for selecting different options. You could do the same if we implement this option or some other copy format.

pekspro commented 3 years ago

Copy rows as JSON is a feature I would like to have right now :-) I know you could export an entire table as JSON, but I just want to have individual rows.