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

[Feature request] Open CLOB value in external viewer/editor #4729

Closed
rojares opened this issue Dec 2, 2018 · 10 comments
Closed

[Feature request] Open CLOB value in external viewer/editor #4729

rojares opened this issue Dec 2, 2018 · 10 comments

Comments

@rojares
Copy link

rojares commented Dec 2, 2018

Now you can view common image files inside DBeaver when editing table data. You can open/save the binary data from/to filesystem. What would be very useful is the ability to open a CLOB value in external editor. For example storing pdf files into database would become convenient because the user could open the value in a pdf reader to check the contents of the value. Opening in external editor would require only opening a "virtual file" (binary stream) in the underlying OS. Possibly DBeaver could store the binary contents in temp file. And then the user could choose which program should open that file.

@serge-rider
Copy link
Member

Agreed. However the main problem is determining file type. We can open CLOBs as txt files but any binary format will require some format detection.
We could try to utilize new Java function Files.probeContentType. Although it knows not that many formats.

@rojares
Copy link
Author

rojares commented Dec 5, 2018

How about trying to open the CLOB as some generic mime type like application/octet-stream? Maybe this would open os specific dialog where the user can choose which program should open the file. Of course Files.probeContentType should be tried first.

@halitanildonmez
Copy link
Contributor

I am working on this but have a question: how do you want to open the file ? From where I mean. What I am doing now is I have created a blob, added a pdf file and trying to open the file from table data view

@rojares
Copy link
Author

rojares commented Jul 7, 2020

  1. If value is number, varchar etc. it is shown inline as text
    image
  2. If value is blob in image format, dbeaver recognizes it automatically, and shows it as an image inline
    image
  3. If value is blob in pdf format then by default value is shown as text
    image
  4. You can select from "Content viewer settings" to show the value in Binary
    image
  5. So maybe you could add next to it a new button "Open in external program". Clicking this would then open the value in an external program. In order to find the right kind of program we would have to ask the operating system using a mime type that which program it recommends. The user could choose the recommended program or some other program. If recommended program does not exist then the user would have to choose some program.
    The dialog shown to the user could be something like this.
    image

@halitanildonmez
Copy link
Contributor

Got it! Will do

@halitanildonmez
Copy link
Contributor

#9234

There is a pull request. I am not sure if the code will be acceptable yet I can fix the errors.

The button is next to the "Content viewer settings" button.

Maybe @rojares you can test it out and give feedback ?

halitanildonmez added a commit to halitanildonmez/dbeaver that referenced this issue Jul 25, 2020
@serge-rider serge-rider added this to Triage in DBeaver board via automation Sep 4, 2020
@serge-rider serge-rider added this to the 7.2.1 milestone Sep 4, 2020
@serge-rider serge-rider moved this from Triage to In Progress in DBeaver board Sep 4, 2020
@sachinmukherjee
Copy link

Is this issue open?

@serge-rider
Copy link
Member

PR has been merged, feature will be included in 7.2.1

@serge-rider serge-rider moved this from In Progress to Ready for QA in DBeaver board Sep 15, 2020
@kseniiaguzeeva kseniiaguzeeva self-assigned this Sep 15, 2020
@kseniiaguzeeva
Copy link

Implemented

DBeaver board automation moved this from Ready for QA to Done Sep 16, 2020
@timharsch
Copy link

Is this feature in the community edition? I would like to view CLOBs as PDFs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
DBeaver board
  
Done
Development

No branches or pull requests

6 participants