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

Run selected script - without opening editor #4738

Open
surpavan opened this issue Dec 5, 2018 · 8 comments
Open

Run selected script - without opening editor #4738

surpavan opened this issue Dec 5, 2018 · 8 comments

Comments

@surpavan
Copy link

@surpavan surpavan commented Dec 5, 2018

Some scripts are very big and editor will take long time to load into UI - for such scripts we save in drive and run them from workbench or some other tool - just by selecting the file and running it without loading it to editor.

Can we get that feature - probably in tools or some relevant location when we right click on the database name - to run the sql file on selected connection/DB instead of opening the file in editor.
untitled

Mysql:
untitled

@surpavan
Copy link
Author

@surpavan surpavan commented Aug 21, 2019

Any possible milestone?

@serge-rider
Copy link
Member

@serge-rider serge-rider commented Aug 21, 2019

This is relatively big feature.
There are too many different questions and possibly too many UI additions. I can't say when we'll have resources for that. Maybe we more people would vote for this feature.

@surpavan
Copy link
Author

@surpavan surpavan commented Aug 21, 2019

Sorry, I was not trying to prioritize the ticket, but just commenting to make sure it was not forgotten.
Thank you for the wonderful application and thank you for keeping it free.

@dckc
Copy link

@dckc dckc commented Feb 6, 2021

This is relatively big feature.

I found it by way of the good first issue label. Would you please clarify whether you think it is a good first issue?

@p91paul
Copy link
Contributor

@p91paul p91paul commented Feb 6, 2021

A suggestion: I suppose it might be quite easy to implement this as a command line parameter. Just like now you allow to execute tasks (which are very similar in nature to a sql script).
Of course running tasks from the command line is a EE feature, so if a similar implementation is chosen, there goes the "thank you for keeping it free" 😃.

@surpavan
Copy link
Author

@surpavan surpavan commented Feb 6, 2021

I am only asking to provide a right click file within dbeaver ide and run script, without opening the sql script editing window. I don't think it will clash with EE version.
Clarifying: I am not asking for commandline args, I am only asking a right click within the Dbeaver IDE.

@chaptergy
Copy link

@chaptergy chaptergy commented Mar 12, 2021

This is especially useful when working with database dumps, which are usually large in size. If I want to import a db dump in dbeaver I would usually have to wait around 4 to 5 minutes for the editor to load after opening the sql file, only to then wait 4 to 5 minutes more after switching the database on which I would want to import this dump.

@CodyBuilder-dev
Copy link
Contributor

@CodyBuilder-dev CodyBuilder-dev commented Mar 20, 2021

Hello, I just tried to make this feature by myself. But I got caught in a cyclic dependency problem.

Following is a sequence of my approach:
(1) Make 'Run Script' menu and command in 'org.jkiss.dbeaver.ui.navigator'
(2) Write handler setting in plugin.xml to connect the command with 'SQLEditorHandlerExecute' class in 'org.jkiss.dbeaver.ui.editor.sql'
(3) Add 'org.jkiss.dbeaver.ui.editor.sql' in Required-Bundle of MANIFEST
(4) Because 'org.jkiss.dbeaver.ui.editor.sql' already has dependency on 'org.jkiss.dbeaver.ui.navigator', (3) raises cyclic dependency and compile fails

I tried to find a way to execute SQL without 'SQLEditorHandlerExecute' class, but I couldn't make it. Could anyone have better approach to make this feature? Any advice would be appreciated!

@dbeaver dbeaver deleted a comment Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants