Users would like to be able to attach a FluidShell connection/session to an already open Query Analyzer window so that they can run scripts that create temporary tables, which are then accessible in the Query Analyzer window. Possible solution is to enhance the \session and \connect commands so you can do something like this :
\connect -k 100 -qa "Title of QA Window"
\session 100
The \connect would make a session available with ID 100, which would just be the connection of the Query Analyzer window with the title "Title of QA Window", and then the \session command would switch to that session.
We have the SessionCommand.java and ConnectCommand.java classes, where this should be implemented. We need to keep in mind that a user can have multiple application frames open, and thus a multiple list of Query Analyzer windows open. We have the WindowsTracker.java class, which extends the FrameTracker.java class which has the method the method .getAllFrames(), returning a list of JFrame objects. In this list of open JFrame objects, we need to look for any instances of an AppFrame.java class, which is the DataStudio frame class.
In the method QueryPanel.updateTabPlacement() you can see how it iterates through all the Query Analyzers of all the Frames. This is how we will need to find a Query Analyzer tab which matches the title the user requested in the \connect command. The QueryPanel.java class has a .getConnection() and .getConnectionProperties() method.
We will also need to determine how to handle if the user decides to \disconnect this connection in the FluidShell. Or if the user does a reconnect in the Query Analyzer window after the user attaches from the FluidShell.
I've begun forming the documentation in v16 for this. Let me know if -qa option section below is appropriate.
https://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/Documentation16/page/257/connect
and related command notes can be found below
I've begun forming the documentation in v16 for this. Let me know if -qa option section below is appropriate.
https://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/Documentation16/page/257/connect
and related command notes can be found below
The updates to the session command are not needed. We don't document the columns for the session list. So we don't need to document what the new column is.
Please refer to the updated help text of the connect, reconnect, and disconnect commands when the new build is available.
The updates to the session command are not needed. We don't document the columns for the session list. So we don't need to document what the new column is.
Please refer to the updated help text of the connect, reconnect, and disconnect commands when the new build is available.
We will also need to determine how to handle if the user decides to \disconnect this connection in the FluidShell.
If the user runs the \disconnect command in FluidShell, the session is disconnected but the database connection in the Query Analyzer window remains connected.
Or if the user does a reconnect in the Query Analyzer window after the user attaches from the FluidShell.
If the user reconnects in the Query Analyzer window, the user will get an error that the connection is closed when trying to use the FluidShell session. The user can run the \reconnect command in FluidShell to attach to the current database connection from the Query Analyzer window.
We will also need to determine how to handle if the user decides to \disconnect this connection in the FluidShell.
If the user runs the \disconnect command in FluidShell, the session is disconnected but the database connection in the Query Analyzer window remains connected.
Or if the user does a reconnect in the Query Analyzer window after the user attaches from the FluidShell.
If the user reconnects in the Query Analyzer window, the user will get an error that the connection is closed when trying to use the FluidShell session. The user can run the \reconnect command in FluidShell to attach to the current database connection from the Query Analyzer window.
I've edited the documentation in v16 using the contents of the help from v15.0.14-1
you can refresh the links I posted above, and this newly edited link
https://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/Documentation16/page/279/reconnect
I've edited the documentation in v16 using the contents of the help from v15.0.14-1
you can refresh the links I posted above, and this newly edited link
https://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/Documentation16/page/279/reconnect
@jenny: can you also check the reconnect icon in the Fluidshell toolbar. The reconnect command works fine and I am able to attach to the QA and query the temp table, but not when I click on the reconnect icon
@jenny: can you also check the reconnect icon in the Fluidshell toolbar. The reconnect command works fine and I am able to attach to the QA and query the temp table, but not when I click on the reconnect icon
I've fixed the Reconnect icon to attach to the current QA connection. Please verify using 15.0.14-2.
I've fixed the Reconnect icon to attach to the current QA connection. Please verify using 15.0.14-2.
Jonathan, the "Notes" section you added to the session command should have been added to the disconnect command instead.
Jonathan, the "Notes" section you added to the session command should have been added to the disconnect command instead.
please review the new feature page for this, as I don't know if I am doing a good job of screenshotting and explaining this feature:
https://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/New-Features-16.0/page/FluidShell-Query-Analyzer-Connection-Sharing/FluidShell-Query-Analyzer-Connection-Sharing
please review the new feature page for this, as I don't know if I am doing a good job of screenshotting and explaining this feature:
https://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/New-Features-16.0/page/FluidShell-Query-Analyzer-Connection-Sharing/FluidShell-Query-Analyzer-Connection-Sharing
Need to test scenarios :
Need to test scenarios :
There are issues with the scenarios I've added.
There are issues with the scenarios I've added.
12. FS :> select @@spid/
12. FS :> select @@spid/
Scenario 1: Fixed to show the current QA window title in session list.
Scenario 2: No change
Scenario 3: Fixed to display the QA window title as "[Closed]" in \session (step 7) and return the error message "The Query Analyzer window has been closed." in \reconnect (step 8).
Scenario 4: No change
Scenario 1: Fixed to show the current QA window title in session list.
Scenario 2: No change
Scenario 3: Fixed to display the QA window title as "[Closed]" in \session (step 7) and return the error message "The Query Analyzer window has been closed." in \reconnect (step 8).
Scenario 4: No change
Issue #13068 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 15.0.14-5 |
No time estimate |
We have the SessionCommand.java and ConnectCommand.java classes, where this should be implemented. We need to keep in mind that a user can have multiple application frames open, and thus a multiple list of Query Analyzer windows open. We have the WindowsTracker.java class, which extends the FrameTracker.java class which has the method the method .getAllFrames(), returning a list of JFrame objects. In this list of open JFrame objects, we need to look for any instances of an AppFrame.java class, which is the DataStudio frame class.
In the method QueryPanel.updateTabPlacement() you can see how it iterates through all the Query Analyzers of all the Frames. This is how we will need to find a Query Analyzer tab which matches the title the user requested in the \connect command. The QueryPanel.java class has a .getConnection() and .getConnectionProperties() method.
We will also need to determine how to handle if the user decides to \disconnect this connection in the FluidShell. Or if the user does a reconnect in the Query Analyzer window after the user attaches from the FluidShell.