Auto database selection (set active)

Feature requests and their debate

Auto database selection (set active)

Postby lorenzo-s » Sun Aug 26, 2012 3:05 pm

I found a little annoying the fact that databases are not auto-selected (automatically set as active, I mean) when I open their object tree or when I open a contained table.

In a typical scenario, I open DBeaver, I browse the tree until a table (my connection > Databases > my database > Tables > my table), view some data, then I want to run some SQL (CTRL+L to open SQL editor), I write down some code then I execute it (CTRL+Enter). Execution will fail because no database is selected. That can be fixed if the application assumes I want to operate on my database because I opened it in the tree view or because I clicked a table in it.
lorenzo-s
 
Posts: 6
Joined: Sun Aug 26, 2012 2:31 pm

Re: Auto database selection (set active)

Postby Serge » Sun Sep 09, 2012 12:53 pm

Hi,

I'm afraid I didn't completely understand the problem.
Currently when you open SQL editor DBeaver detects current database using
1. Active editor
2. Current selection in database navigator
If there is no open editor and you have no selection in navigator then DBeaver will ask you which datasource to use.
Could you provide exact steps to reproduce this problem?

Thanks
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Auto database selection (set active)

Postby sithboi » Wed Nov 11, 2015 4:33 pm

Hello,

I know this is opening an old thread but I didn't want to open a new one for the same topic.

Moving from other IDE's to this one, I believe what he means is when you open the SQL Editor that the currently selected database in the navigation is not what appears at the top for the server. Using DBViz as an example, if I hit Ctrl+T it'll open a new sql editor with my currently selected database/schema at the top. In DBeaver you have to right click, set active, and then open the SQL editor with the ctrl+L or ctrl+alt+L combinations. This is one feature I like about other IDE's as it keep my hands on the keyboard and I don't have to use other mouse clicks; it also avoid the MASTER or last used database to be queried against.

New Edit:
I would say the fix could be when you hit ctrl + L that it checks to see if the database you have selected is the active one if not, auto set it as active, and open a new sql editor window.
sithboi
 
Posts: 1
Joined: Mon Nov 09, 2015 5:24 pm


Return to Feature Requests



Who is online

Users browsing this forum: No registered users and 8 guests