SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[7.0.132 beta] FR - lazy/greedy select current statement

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[7.0.132 beta] FR - lazy/greedy select current statement
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [7.0.132 beta] FR - lazy/greedy select current statement Reply with quote
There's a hotkey to select current statement (the statement which the cursor is currently in). That an excellent feature I could use much more if it had a switch that could choose between "lazy" and "greedy" selection of the current statement.

What do I mean by that?

Right now if the cursor is in a SELECT subquery of a SELECT query that does an INSERT into a table the whole INSERT - SELECT - subSELECT gets selected. Most of the times I only want to test the SELECT or the subSELECT statement only and I have to select the statement manually. The "lazy" version could select the statement "downwards", that is, everything levels down the cursor position, selecting only the subquery if the cursor is there, or the complete SELECT with its subqueries if the cursor is there, etc., while the "greedy" could do the "upward" selection (all the way up to the INSERT part included).
Mon Jul 07, 2014 4:26 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
But what if that INSERT - SELECT - subSELECT is part of a larger BEGIN - END block or within CREATE PROCEDURE?

My 2 cents, having multiple keys to select "current" statement with different scope would be a confusing feature, who would remember all these keys anyway? Maybe it's better to do it gradually, start with the minimal selection using the existing hot key and then have something else to expand the scope of selection by 1 level. Repeated use of the expansion key will select parent blocks/batches until the entire script in the editor is selected. What do you think about that?
Mon Jul 07, 2014 8:18 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Actually, repeated use of Select Current Statement hot key can also serve as the expansion key.
Mon Jul 07, 2014 8:19 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
A much better implementation that would be, yes.
Mon Jul 07, 2014 8:25 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Submitted. Thank you.
Mon Jul 07, 2014 8:46 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
The incremental selection of current statement is awesome, thank you very much.
Tue Oct 27, 2015 6:38 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
You are welcome. That one was actually introduced in 7.1 release about 10 months ago.
Tue Oct 27, 2015 9:15 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
Funny I didn't notice it. I use this frequently.
Tue Oct 27, 2015 6:02 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.