When working with MS SQL Server, typing schemas is very important.
ADS autocompletion shows them, but when selecting an entry, it is omitted.
This results in not executable Querys and you have to add schemas by hand.
Really need an option to include schema in autocompletion.
9 KB
12 KB
18 KB
Hi Tim,
Yes, we don't offer that feature but will leave this issue open to be evaluated for a future release.
Thanks, Tom
Dev team... also see private issue #5836
Need to explore whether the schema info exists in the popup menu. Start with SQLStdCompletionQuery. Since this is new behavior, we will need to have an option to turn this feature on and off. Default is off.
Dev team... also see private issue #5836
Need to explore whether the schema info exists in the popup menu. Start with SQLStdCompletionQuery. Since this is new behavior, we will need to have an option to turn this feature on and off. Default is off.
@Dev Team,
It should be expanded as schema.table. And the expansion logic should also consider Option Settings for Scripts > Server > quote identifier for table name. Since we don't have a separate settings for schema quote identifier, we will inherit the settings for table.
Thanks
@Dev Team,
It should be expanded as schema.table. And the expansion logic should also consider Option Settings for Scripts > Server > quote identifier for table name. Since we don't have a separate settings for schema quote identifier, we will inherit the settings for table.
Thanks
SVN r57024
-- We need change the message:
public static final String dsc_includeschemafortablecompletion = TXT.get("DatastudioOption.txt.Scripts.includeschemafortablecompletion.d", "Default for Include Schema For Table Completion for Query Analyzer.");
TO
"Enable qualifying with schema name when completing a table completion."
-- ConnectionProperties > change the following:
String s = COptionSystem.getOptionInstance().getUIProperties().getProperty(propertyName, "false");
TO
COptionSettings.getPropertyBool(propertyName, false);
-- SQLStandardCompletionQuery > quoteTableCompletionText > Why should we do additional check, schema.equals(SCHEMA_ALL)?
if((connSettings.isMssql() || connSettings.isAzure()) && connSettings.isIncludeSchemaForTableCompletionEnabled() && schema.equals(SCHEMA_ALL))
-- master.prompts.csv > We should never change this file. Please revert this change.
SVN r57024
-- We need change the message:
public static final String dsc_includeschemafortablecompletion = TXT.get("DatastudioOption.txt.Scripts.includeschemafortablecompletion.d", "Default for Include Schema For Table Completion for Query Analyzer.");
TO
"Enable qualifying with schema name when completing a table completion."
-- ConnectionProperties > change the following:
String s = COptionSystem.getOptionInstance().getUIProperties().getProperty(propertyName, "false");
TO
COptionSettings.getPropertyBool(propertyName, false);
-- SQLStandardCompletionQuery > quoteTableCompletionText > Why should we do additional check, schema.equals(SCHEMA_ALL)?
if((connSettings.isMssql() || connSettings.isAzure()) && connSettings.isIncludeSchemaForTableCompletionEnabled() && schema.equals(SCHEMA_ALL))
-- master.prompts.csv > We should never change this file. Please revert this change.
I have changed the code accordingly as suggested.
In the below condition
if((connSettings.isMssql() || connSettings.isAzure()) && connSettings.isIncludeSchemaForTableCompletionEnabled() && schema.equals(SCHEMA_ALL)), in case user gives the schema "schema1" (in the editor) already and then uses suggestions, the tables are been filtered using the schema name where "schema" will be schema1 here. so to avoid adding schema name again after selecting the suggestion, "schema.equals(SCHEMA_ALL)" condition has been placed.
This issue changes have been commited in the following revisions: 57024, 57043
57024 - Included checkbox in options->scripts-> SQL, SQL Azure, SQL Server 7 for enabling schema inclusion while completing table name. Including schema name on table completion when the check-box is "checked"
57043 - changes done according to review comments and modified behavior of check-box similar to "Quote Identifier for Table Completion"
I have changed the code accordingly as suggested.
In the below condition
if((connSettings.isMssql() || connSettings.isAzure()) && connSettings.isIncludeSchemaForTableCompletionEnabled() && schema.equals(SCHEMA_ALL)), in case user gives the schema "schema1" (in the editor) already and then uses suggestions, the tables are been filtered using the schema name where "schema" will be schema1 here. so to avoid adding schema name again after selecting the suggestion, "schema.equals(SCHEMA_ALL)" condition has been placed.
This issue changes have been commited in the following revisions: 57024, 57043
57024 - Included checkbox in options->scripts-> SQL, SQL Azure, SQL Server 7 for enabling schema inclusion while completing table name. Including schema name on table completion when the check-box is "checked"
57043 - changes done according to review comments and modified behavior of check-box similar to "Quote Identifier for Table Completion"
Hi Sridhar,
Please revert your change for master.prompts.csv. This file should never be modified. Please let the other developers know.
Thanks Tom
Hi Sridhar,
Please revert your change for master.prompts.csv. This file should never be modified. Please let the other developers know.
Thanks Tom
Hi Tom,
I have reverted the changes in the revision 57043 to be similar to 56925 (which is the one before my changes) with the review comments by Asif. Let me know if anything further needs to be done.
Hi Tom,
I have reverted the changes in the revision 57043 to be similar to 56925 (which is the one before my changes) with the review comments by Asif. Let me know if anything further needs to be done.
Hi Sridhar,
>> In the below condition
if((connSettings.isMssql() || connSettings.isAzure()) && connSettings.isIncludeSchemaForTableCompletionEnabled() && schema.equals(SCHEMA_ALL)), in case user gives the schema "schema1" (in the editor) already and then uses suggestions, the tables are been filtered using the schema name where "schema" will be schema1 here. so to avoid adding schema name again after selecting the suggestion, "schema.equals(SCHEMA_ALL)" condition has been placed.
<asif> I would recommend to remove "schema.equals(SCHEMA_ALL)" condition.
Hi Sridhar,
>> In the below condition
if((connSettings.isMssql() || connSettings.isAzure()) && connSettings.isIncludeSchemaForTableCompletionEnabled() && schema.equals(SCHEMA_ALL)), in case user gives the schema "schema1" (in the editor) already and then uses suggestions, the tables are been filtered using the schema name where "schema" will be schema1 here. so to avoid adding schema name again after selecting the suggestion, "schema.equals(SCHEMA_ALL)" condition has been placed.
<asif> I would recommend to remove "schema.equals(SCHEMA_ALL)" condition.
Hi Asif,
>> I would recommend to remove "schema.equals(SCHEMA_ALL)" condition.
We are including the selected schema name ONLY when the "Auto Complete on All Schemas" is ON.
If we remove the above condition, and user starts typing --
select * from dbo.
it shows the suggestions, now if we select any table name from the suggestions, then the fix will add schema name again along with the table name as below.
select * from dbo.dbo.Table1
instead of select * from dbo.Table1.
We believe this is not expected, please let us know if you think otherwise.
Thanks.
[asif] In that case you should add condition for prefixing schema:
if (StringUtils.isEmpty(schema) || schema.equals(SCHEMA_ALL)) {
Hi Asif,
>> I would recommend to remove "schema.equals(SCHEMA_ALL)" condition.
We are including the selected schema name ONLY when the "Auto Complete on All Schemas" is ON.
If we remove the above condition, and user starts typing --
select * from dbo.
it shows the suggestions, now if we select any table name from the suggestions, then the fix will add schema name again along with the table name as below.
select * from dbo.dbo.Table1
instead of select * from dbo.Table1.
We believe this is not expected, please let us know if you think otherwise.
Thanks.
[asif] In that case you should add condition for prefixing schema:
if (StringUtils.isEmpty(schema) || schema.equals(SCHEMA_ALL)) {
Commited the above suggested change in Revision - 57067
Commited the above suggested change in Revision - 57067
Hi,
We have verified the issue successfully on Windows platform using dev-build 45.
We have checked and found that the schema is shown when selecting the table name (SQL Server 2016,2017 and SQL Azure).
Executed test cases can be found here
Thanks,
Bineet
Hi,
We have verified the issue successfully on Windows platform using dev-build 45.
We have checked and found that the schema is shown when selecting the table name (SQL Server 2016,2017 and SQL Azure).
Executed test cases can be found here
Thanks,
Bineet
Can we also test on Mac and Ubuntu platforms?
Thanks, Tom
Can we also test on Mac and Ubuntu platforms?
Thanks, Tom
Yes Tom, we would be covering mac and ubuntu platforms as well. Team will update the details.
Yes Tom, we would be covering mac and ubuntu platforms as well. Team will update the details.
We have verified the issue successfully on Ubuntu platform using dev build 50.
We have checked that Schema autocompletion is working as expected for SQL server 2017, SQL 2016 and MS Azure.
Testrail execution link can be found here
Thanks,
Hitesh
We have verified the issue successfully on Ubuntu platform using dev build 50.
We have checked that Schema autocompletion is working as expected for SQL server 2017, SQL 2016 and MS Azure.
Testrail execution link can be found here
Thanks,
Hitesh
Hi,
We have verified the issue successfully on Mac OSX platform using dev-build 45.
We have checked and found that the schema is shown when selecting the table name (SQL Server 2016,2017 and SQL Azure).
Executed test cases can be found here.
Thanks,
Bineet
Hi,
We have verified the issue successfully on Mac OSX platform using dev-build 45.
We have checked and found that the schema is shown when selecting the table name (SQL Server 2016,2017 and SQL Azure).
Executed test cases can be found here.
Thanks,
Bineet
Assigning this to Automation team for further action on this.
Assigning this to Automation team for further action on this.
Added new Scripts for Autocompletion on Schemas for MSSQL server.
Added new Scripts for Autocompletion on Schemas for MSSQL server.
QE testing has completed. Please find the details below.
https://idera.testrail.net/index.php?/runs/view/2627&group_by=cases:section_id&group_order=asc&group_id=18404
Machine IP : 10.220.200.181
Machine Name :simpsons\administrator
VM OS: windows 8.1 enterprise
RAM: 4GB and 64 bit
DB Server Name :SQL server 2016
Build Used : Build v20.5.0-RC1
QE testing has completed. Please find the details below.
https://idera.testrail.net/index.php?/runs/view/2627&group_by=cases:section_id&group_order=asc&group_id=18404
Machine IP : 10.220.200.181
Machine Name :simpsons\administrator
VM OS: windows 8.1 enterprise
RAM: 4GB and 64 bit
DB Server Name :SQL server 2016
Build Used : Build v20.5.0-RC1
Issue #15608 |
Verified |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
Hi Tim,
Yes, we don't offer that feature but will leave this issue open to be evaluated for a future release.
Thanks, Tom