mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-23 17:24:12 -05:00
enable table designer for sqlproj (#1511)
* enable table designer for sqlproj * return issues and new table info on initialization * vbump dacfx * Revert "vbump dacfx" This reverts commit f59768b41f67866bd7620e06b141e8bfdb1523aa.
This commit is contained in:
@@ -32,7 +32,8 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
new TableMustHaveAtLeastOneColumnRule(),
|
||||
new MemoryOptimizedTableIdentityColumnRule(),
|
||||
new TableShouldAvoidHavingMultipleEdgeConstraintsRule(),
|
||||
new ColumnCannotBeListedMoreThanOnceInPrimaryKeyRule()
|
||||
new ColumnCannotBeListedMoreThanOnceInPrimaryKeyRule(),
|
||||
new MutipleCreateTableStatementsInScriptRule()
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -578,4 +579,20 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
|
||||
public class MutipleCreateTableStatementsInScriptRule : ITableDesignerValidationRule
|
||||
{
|
||||
public List<TableDesignerIssue> Run(Dac.TableDesigner designer)
|
||||
{
|
||||
var errors = new List<TableDesignerIssue>();
|
||||
if(designer.ScriptContainsMultipleTableDefinition)
|
||||
{
|
||||
errors.Add(new TableDesignerIssue(){
|
||||
Description = "There are multiple table definitions in the script, only the first table can be edited in the designer.",
|
||||
Severity = Contracts.IssueSeverity.Information
|
||||
});
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user