I've been playing around with various things that didn't work as I expected in SQL Prompt 2 to see what has changed in 3. The new version is definitely a step up, and would be close to perfect, with a few tweaks:
- When showing tables/views, the candidate list should (optionally) contain only tables with foreign keys between them, except after FROM and CROSS JOIN.
- It would make sense for this to be the behavior if the "Include matching column names" and "Include matching data types" options are not selected.
- Alternatively, tables with foreign keys should be displayed together at the top of the list, with unrelated tables below.
- Individual key fields in a compound foreign key should not be listed separately. For example, with these tables: typing results in three options based on the foreign key: Only the middle one (b.a_id = c.a_id and b.b_id = c.b_id) should be displayed.
- joins on foreign keys are "backwards"; if B refers to A as above, joins should be in the form 'b.a_id = a.a_id'.
- This could be an option
- Better still, SQL Prompt should change the autocomplete candidate to match what you type after ' on '. For example, if you type then the completion list's first option should be but if you type then the candidate list's first option should be
- the candidate list should not be shown after a table name has just been typed, i.e., when I am typing a table alias.
- the candidate list should continue to include joins on foreign keys after I have typed a table alias. Right now, if I type in the candidate list correctly contains However, if I continue typing that option, starting with a ".", the join candidate is removed from the list and the list only contains candidate columns.
- Using black as the window background color in the Windows color scheme (like the High Contrast Black color scheme) makes quite a bit of text illegible (when the text color is black, on a black background) or very difficult to read (blue text on a black background.) This affects both the completion list and snippets.
Comments
2 comments
-
Hi,
Thanks for the feedback.When showing tables/views, the candidate list should (optionally) contain only tables with foreign keys between them, except after FROM and CROSS JOIN.
* It would make sense for this to be the behavior if the "Include matching column names" and "Include matching data types" options are not selected.
* Alternatively, tables with foreign keys should be displayed together at the top of the list, with unrelated tables below.Individual key fields in a compound foreign key should not be listed separately. For example, with these tables:
Code:
create table A(a_id int not null constraint PK_A primary key)
create table B(
a_id int not null foreign key references A(a_id),
b_id int not null,
constraint PK_B primary key (a_id, b_id)
)
create table C(
a_id int not null,
b_id int not null,
c_id int not null,
constraint PK_C primary key (a_id, b_id, c_id),
constraint FK_C_B foreign key (a_id, b_id) references B(a_id, b_id)
)
typing
Code:
select * from B b join C c on
results in three options based on the foreign key:
Code:
b.a_id = c.a_id
b.a_id = c.a_id and b.b_id = c.b_id
b.b_id = c.b_id
Only the middle one (b.a_id = c.a_id and b.b_id = c.b_id) should be displayed.joins on foreign keys are "backwards"; if B refers to A as above, joins should be in the form 'b.a_id = a.a_id'.
This could be an optionBetter still, SQL Prompt should change the autocomplete candidate to match what you type after ' on '. For example, if you type
Code:
select * from A a join B b on b.
then the completion list's first option should be
Code:
b.a_id = a.a_id
but if you type
Code:
select * from A a join B b on a.
then the candidate list's first option should be
Code:
a.a_id = b.a_idthe candidate list should not be shown after a table name has just been typed, i.e., when I am typing a table alias.he candidate list should continue to include joins on foreign keys after I have typed a table alias. Right now, if I type in
Code:
select * from A a join B b on a
the candidate list correctly contains
Code:
a.a_id = b.a_id
However, if I continue typing that option, starting with a ".", the join candidate is removed from the list and the list only contains candidate columns.Using black as the window background color in the Windows color scheme (like the High Contrast Black color scheme) makes quite a bit of text illegible (when the text color is black, on a black background) or very difficult to read (blue text on a black background.) This affects both the completion list and snippets.
Regards,
Tilman -
Here's a quick history of how computers have been punching me in the eyes (or not) with their color schemes:
- The Commodore 64, which had light blue text on a darker blue background - very easy on the eyes
- The Apple II, which had white text on a black background - also very nice to look at. (except for the weird color fringing around the edges of characters due to Apple's before-its-time sub-pixel rendering.)
- MS-DOS. Light gray on black. So soothing.
- Turbo Pascal, WordPerfect, MS Word, and many others for DOS: white or yellow text on a blue background. Very easy to read. (And Turbo Pascal 7 had syntax highlighting!)
- Windows 3.x, 9x. Black text on a white background by default, which portends much. But at least it's easy to change to white-on-black.
- AutoCAD: white lines on a black background by default.
- Emacs: Has 'light' and 'dark' settings as well as complete customizability. I use 'dark'.
- Visual Studio and Query Analyzer: follows Windows' color scheme, and allows all of the syntax highlighting colors to be customized.
- Red Gate SQL Prompt: sometimes follows Windows' color scheme, sometimes not. This is very much in keeping with new versions of Windows, Office, and many other applications.
Here's a discussion on the topic: http://cafe.elharo.com/ui/black-on-white-good-white-on-black-bad/
Add comment
Please sign in to leave a comment.