 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[SA 9.0.0144 Pro BETA] - Custom Assistance |
|
How is Custom Assistance supposed to work? I've included a short excerpt from Custom Assistance for SQL Server (it was loaded as default and customized a bit to suit my needs). Originally it contained sections of different built-in functions grouped. But there's some confusion. I can see sections starting with a comment like header (eg. -- Aggregate functions) and an other one that looks more like an ini file section ([analytic functions]). Now when begin typing 'max' the following is shown in the popup:
The lines marked with red in the third column of the popup are probably from section [analytic function]. The one marked with blue in the second column is from a part of the Custom Assistance not visible below. It has a comment. As you can see, max_for_test and max_for_test2 are both shown, the second one having its comment in the second column of the popup, while the first one having built-in function instead of no comment. Functions max_for_another_test and max_for_another_test2 that are put into [just for tests] section are not shown at all. Changing the name of [analytic functions] or [built-in functions] (at the top) will remove functions in those sections as well.
Are these two hardwired into SA? Is there a way to define my own sections (or replace the comment like sections with real ones) so that the popup could show the function name and syntax in first column, its comment in second, and its section in third?
 |
 |
.
.
.
-- Unknown --
bin_to_num(expr NUMBER)NUMBER
bitand(expr1 NUMBER,expr2 NUMBER)NUMBER
cardinality(nested_table)NUMBER
-- non []
max_for_test()
max_for_test2();with comment this time
[just for tests]
max_for_another_test()
max_for_another_test2();with comment
[analytic functions]
avg(|) OVER()
avg(|) OVER(PARTITION BY)
checksum_agg(|) OVER()
checksum_agg(|) OVER(PARTITION BY)
count(*) OVER()
count(*) OVER(PARTITION BY |)
count(|) OVER(PARTITION BY)
count_big(*) OVER()
count_big(*) OVER(PARTITION BY |)
count_big(|) OVER(PARTITION BY)
cume_dist() OVER (ORDER BY |)
cume_dist() OVER (PARTITION BY | ORDER BY)
dense_rank() OVER (ORDER BY |)
dense_rank() OVER (PARTITION BY | ORDER BY)
first_value() OVER (PARTITION BY | ORDER BY RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
first_value() OVER (PARTITION BY | ORDER BY)
first_value() OVER (ORDER BY |)
first_value(|) OVER (ORDER BY)
lag() OVER (PARTITION BY | ORDER BY)
lag() OVER (ORDER BY |)
lag(|) OVER ()
last_value() OVER (PARTITION BY | ORDER BY RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
last_value() OVER (PARTITION BY | ORDER BY)
last_value() OVER (ORDER BY |)
last_value(|) OVER (ORDER BY)
lead() OVER (PARTITION BY | ORDER BY)
lead() OVER (ORDER BY |)
lead(|) OVER ()
max(|) OVER()
max(|) OVER(PARTITION BY)
min(|) OVER()
min(|) OVER(PARTITION BY)
ntile() OVER (ORDER BY |)
ntile() OVER (PARTITION BY | ORDER BY)
ntile(|) OVER (ORDER BY)
percent_rank() OVER(PARTITION BY | ORDER BY)
percent_rank() OVER(PARTITION BY |)
percent_rank() OVER(RANGE |)
percent_rank(|) OVER(ORDER BY)
percentile_cont() WITHIN GROUP (ORDER BY |) OVER ()
percentile_cont(|) WITHIN GROUP (ORDER BY) OVER (PARTITION BY)
percentile_cont(0.5) WITHIN GROUP (ORDER BY |) OVER (PARTITION BY)
percentile_disc() WITHIN GROUP (ORDER BY |) OVER ()
percentile_disc(|) WITHIN GROUP (ORDER BY) OVER (PARTITION BY)
percentile_disc(0.5) WITHIN GROUP (ORDER BY |) OVER (PARTITION BY)
rank() OVER (ORDER BY |)
rank() OVER (PARTITION BY | ORDER BY)
row_number() OVER (ORDER BY |)
row_number() OVER (PARTITION BY | ORDER BY)
stdev(|) OVER()
stdev(|) OVER(ORDER BY)
stdev(|) OVER(PARTITION BY ORDER BY)
stdevp(|) OVER()
stdevp(|) OVER(ORDER BY)
stdevp(|) OVER(PARTITION BY ORDER BY)
sum(|) OVER()
sum(|) OVER(PARTITION BY)
var(|) OVER()
var(|) OVER(ORDER BY)
var(|) OVER(PARTITION BY ORDER BY)
varp(|) OVER()
varp(|) OVER(ORDER BY)
varp(|) OVER(PARTITION BY ORDER BY)
.
.
.
|
|
|
Mon Sep 19, 2016 4:33 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
They are not hard coded, they come from [analytic functions] section. The new thing here is some sort of a merge between function prototypes and working of code snippets. Please note the | symbol controlling cursor position. I will use a case in my example. Say you need to enter
count_big(|) OVER(PARTITION BY)
1. You can paste it all in one click
2. The cursor is placed immediately after big( and columns popup is shown immediately, you don't need to do any extra typing
3. When you click after BY and type space, you get columns popup again. and so on...
4. To use it efficiently, you should start with coding
SELECT
FROM [pick some tables here]
Then click after SELECT and start typing max. In this case the rest makes sense. But if you don't have the FROM tables entered yet, it doesn't make much sense. You can still use it but it's not as efficient.
|
|
Mon Sep 19, 2016 7:53 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
No, that's fine, I caught the idea behind those lines with |, and they just work great. I might not have been clear enough, I'm sorry.
When I said 'hardwired' I was referring to the sections ([built-in functions] and [analytic functions]). I tried to create my own sections and all I got is that the custom assistance stopped working below that line I tried to to turn into a section. And when I tried to modify [analytic section] (changed its name to [analytic section 2] just to see if it would make any difference), functions below that were gone from the popup.
|
|
Mon Sep 19, 2016 9:23 am |
|
 |
|
|
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
|
|
|