orientdb-studio icon indicating copy to clipboard operation
orientdb-studio copied to clipboard

Enhancement: Delete Button in DB scheme or confirm popup on drop

Open zifnab87 opened this issue 10 years ago • 4 comments

It would be nice to have another button - except for drop to delete vertices/edges. Or otherwise it would be nice if there was a confirm popup to let you know that there are vertices and if you want to delete them first before dropping the class otherwise cancel. The same for edges..

Thanks

zifnab87 avatar Jul 16 '15 00:07 zifnab87

@zifnab87

in Schema Manager there is the confirmation popup on drop.

wolf4ood avatar Sep 15 '16 15:09 wolf4ood

Hi @zifnab87,

Thank you for opening this issue

@zifnab87, @maggiolo00, if I understand correctly the problem here is the following:

Yes, it is true that a confirmation popup will appear when trying to Drop the Class (the message is similar to the following: "You are dropping class testClass. Are you sure?" ), and users will have the chance to abort the operation, if they want

However if the class is a not empty edge or vertex class, a error message is returned and it won't be possible to drop it (as the DROP CLASS command, by design, don't work in such case, and returns an error)

If I understand @zifnab87 correctly he is suggesting to add another button to be able to "delete" the class even when there are records and it is an edge or vertex class

I understand and agree with @zifnab87's need and I believe we can improve how things are handled now, let's discuss the possible strategies

Some ideas:

Strategy 1

  • show a new dialog window when clicking on the DROP command, that allows users to set the UNSAFE and POLYMORPHIC options. USAFE can be used to handle the case of not empty edge and vertex classes

OR

Strategy 2

  • better handle the case of when the Studio's DROP button is used over a not empty edge or vertex class by checking, when clicking on the button, if this is an edge or vertex class and if it is not empty, and in this case, print a warning like the following:

You are trying to drop class testClass, but this class is an edge or vertex class and is not empty. Would you like to drop the class using the UNSAFE attribute? WARNING: this can disrupt data consistency.

I'd probably prefer Strategy 1. What do you think? other ideas?

Thanks,

santo-it avatar Jan 02 '17 13:01 santo-it

hi @santo-it I'm not so sure about this strategy. I don't like to use the UNSAFE keywords from Studio even behind a confirm dialog, since with a double click the users can erase datas. But If we want to do it i propose that in the case of UNSAFE the user in the dialog should type the name of the class that he is going to delete. In this case he will be fully aware of his doings.

wolf4ood avatar Jan 02 '17 15:01 wolf4ood

Hi @maggiolo00 ,

Thanks for your reply. Okay, I see your point. I believe other database tools allow to delete tables (and all their records) with few clicks, warning about consequences. However, I see your point about being prudent asking users to write the name of the class

From an end user point of view, I believe User Privileges may help as well - e.g. if user does not have privilege to perform a certain action, they won't be able via Studio anyway

I think it's about finding a good compromise between having a safe approach and provide more features (that users have already via SQL) in a GUI

Asking users to type the class name when using UNSAFE is okay with me, I'm open to other "safe" approaches as well (if any we may think of)

Thanks,

santo-it avatar Jan 02 '17 16:01 santo-it