[Table Designer] Add validators for computed col in PK and FK (#1653)

This commit is contained in:
Hai Cao
2022-08-25 16:30:47 -07:00
committed by GitHub
parent 21a261bf69
commit 23072250b7
5 changed files with 95 additions and 2 deletions

View File

@@ -9804,6 +9804,16 @@ namespace Microsoft.SqlTools.ServiceLayer
return Keys.GetString(Keys.ColumnCannotDuplicateWitIndexKeyColumnsRuleDescription, columnName, indexName, rowNumber);
}
public static string ComputedColumnNeedToBePersistedAndNotNullInPrimaryKeyRuleDescription(string columnName)
{
return Keys.GetString(Keys.ComputedColumnNeedToBePersistedAndNotNullInPrimaryKeyRuleDescription, columnName);
}
public static string ComputedColumnNeedToBePersistedInForeignKeyRuleDescription(string columnName, string foreignKeyName)
{
return Keys.GetString(Keys.ComputedColumnNeedToBePersistedInForeignKeyRuleDescription, columnName, foreignKeyName);
}
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Keys
{
@@ -13562,6 +13572,12 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string ColumnCannotDuplicateWitIndexKeyColumnsRuleDescription = "ColumnCannotDuplicateWitIndexKeyColumnsRuleDescription";
public const string ComputedColumnNeedToBePersistedAndNotNullInPrimaryKeyRuleDescription = "ComputedColumnNeedToBePersistedAndNotNullInPrimaryKeyRuleDescription";
public const string ComputedColumnNeedToBePersistedInForeignKeyRuleDescription = "ComputedColumnNeedToBePersistedInForeignKeyRuleDescription";
private Keys()
{ }