mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
localize the rule descriptions (#1543)
This commit is contained in:
@@ -9133,6 +9133,102 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
}
|
||||
}
|
||||
|
||||
public static string MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string TemporalTableMustHavePrimaryKeyRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.TemporalTableMustHavePrimaryKeyRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string TemporalTableMustHavePeriodColumnsRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.TemporalTableMustHavePeriodColumnsRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string PeriodColumnsRuleMoreThanOneIssueDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.PeriodColumnsRuleMoreThanOneIssueDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string PeriodColumnsRuleNotMatchIssueDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.PeriodColumnsRuleNotMatchIssueDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ColumnsInPrimaryKeyCannotBeNullableRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.ColumnsInPrimaryKeyCannotBeNullableRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string TableMustHaveAtLeastOneColumnRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.TableMustHaveAtLeastOneColumnRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string MemoryOptimizedTableIdentityColumnRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.MemoryOptimizedTableIdentityColumnRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string TableShouldAvoidHavingMultipleEdgeConstraintsRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.TableShouldAvoidHavingMultipleEdgeConstraintsRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string MemoryOptimizedCannotBeEnabledWhenNotSupportedRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.MemoryOptimizedCannotBeEnabledWhenNotSupportedRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string MutipleCreateTableStatementsInScriptRuleDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.MutipleCreateTableStatementsInScriptRuleDescription);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ConnectionServiceListDbErrorNotConnected(string uri)
|
||||
{
|
||||
return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri);
|
||||
@@ -9443,6 +9539,61 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
return Keys.GetString(Keys.UnknownEnumString, name);
|
||||
}
|
||||
|
||||
public static string IndexMustHaveColumnsRuleDescription(string indexName)
|
||||
{
|
||||
return Keys.GetString(Keys.IndexMustHaveColumnsRuleDescription, indexName);
|
||||
}
|
||||
|
||||
public static string ForeignKeyMustHaveColumnsRuleDescription(string foreignKeyName)
|
||||
{
|
||||
return Keys.GetString(Keys.ForeignKeyMustHaveColumnsRuleDescription, foreignKeyName);
|
||||
}
|
||||
|
||||
public static string ColumnCanOnlyAppearOnceInIndexRuleDescription(string columnName, string indexName, int rowNumber)
|
||||
{
|
||||
return Keys.GetString(Keys.ColumnCanOnlyAppearOnceInIndexRuleDescription, columnName, indexName, rowNumber);
|
||||
}
|
||||
|
||||
public static string ColumnCanOnlyAppearOnceInForeignKeyRuleDescription(string columnName, string foreignKeyName, int rowNumber)
|
||||
{
|
||||
return Keys.GetString(Keys.ColumnCanOnlyAppearOnceInForeignKeyRuleDescription, columnName, foreignKeyName, rowNumber);
|
||||
}
|
||||
|
||||
public static string ColumnCanOnlyAppearOnceInForeignKeyRuleForeignColumnDescription(string columnName, string foreignKeyName, int rowNumber)
|
||||
{
|
||||
return Keys.GetString(Keys.ColumnCanOnlyAppearOnceInForeignKeyRuleForeignColumnDescription, columnName, foreignKeyName, rowNumber);
|
||||
}
|
||||
|
||||
public static string NoDuplicateConstraintNameRuleDescription(string constraintName, int rowNumber)
|
||||
{
|
||||
return Keys.GetString(Keys.NoDuplicateConstraintNameRuleDescription, constraintName, rowNumber);
|
||||
}
|
||||
|
||||
public static string NoDuplicateColumnNameRuleDescription(string columnName, int rowNumber)
|
||||
{
|
||||
return Keys.GetString(Keys.NoDuplicateColumnNameRuleDescription, columnName, rowNumber);
|
||||
}
|
||||
|
||||
public static string NoDuplicateIndexNameRuleDescription(string indexName, int rowNumber)
|
||||
{
|
||||
return Keys.GetString(Keys.NoDuplicateIndexNameRuleDescription, indexName, rowNumber);
|
||||
}
|
||||
|
||||
public static string EdgeConstraintMustHaveClausesRuleDescription(string name)
|
||||
{
|
||||
return Keys.GetString(Keys.EdgeConstraintMustHaveClausesRuleDescription, name);
|
||||
}
|
||||
|
||||
public static string EdgeConstraintNoRepeatingClausesRuleDescription(string pair, int rowNumber)
|
||||
{
|
||||
return Keys.GetString(Keys.EdgeConstraintNoRepeatingClausesRuleDescription, pair, rowNumber);
|
||||
}
|
||||
|
||||
public static string ColumnCannotBeListedMoreThanOnceInPrimaryKeyRuleDescription(string columnName)
|
||||
{
|
||||
return Keys.GetString(Keys.ColumnCannotBeListedMoreThanOnceInPrimaryKeyRuleDescription, columnName);
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Keys
|
||||
{
|
||||
@@ -13051,6 +13202,75 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
public const string TableColumnIsComputedPersistedNullableDescription = "TableColumnIsComputedPersistedNullableDescription";
|
||||
|
||||
|
||||
public const string IndexMustHaveColumnsRuleDescription = "IndexMustHaveColumnsRuleDescription";
|
||||
|
||||
|
||||
public const string ForeignKeyMustHaveColumnsRuleDescription = "ForeignKeyMustHaveColumnsRuleDescription";
|
||||
|
||||
|
||||
public const string ColumnCanOnlyAppearOnceInIndexRuleDescription = "ColumnCanOnlyAppearOnceInIndexRuleDescription";
|
||||
|
||||
|
||||
public const string ColumnCanOnlyAppearOnceInForeignKeyRuleDescription = "ColumnCanOnlyAppearOnceInForeignKeyRuleDescription";
|
||||
|
||||
|
||||
public const string ColumnCanOnlyAppearOnceInForeignKeyRuleForeignColumnDescription = "ColumnCanOnlyAppearOnceInForeignKeyRuleForeignColumnDescription";
|
||||
|
||||
|
||||
public const string NoDuplicateConstraintNameRuleDescription = "NoDuplicateConstraintNameRuleDescription";
|
||||
|
||||
|
||||
public const string NoDuplicateColumnNameRuleDescription = "NoDuplicateColumnNameRuleDescription";
|
||||
|
||||
|
||||
public const string NoDuplicateIndexNameRuleDescription = "NoDuplicateIndexNameRuleDescription";
|
||||
|
||||
|
||||
public const string EdgeConstraintMustHaveClausesRuleDescription = "EdgeConstraintMustHaveClausesRuleDescription";
|
||||
|
||||
|
||||
public const string EdgeConstraintNoRepeatingClausesRuleDescription = "EdgeConstraintNoRepeatingClausesRuleDescription";
|
||||
|
||||
|
||||
public const string MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRuleDescription = "MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRuleDescription";
|
||||
|
||||
|
||||
public const string TemporalTableMustHavePrimaryKeyRuleDescription = "TemporalTableMustHavePrimaryKeyRuleDescription";
|
||||
|
||||
|
||||
public const string TemporalTableMustHavePeriodColumnsRuleDescription = "TemporalTableMustHavePeriodColumnsRuleDescription";
|
||||
|
||||
|
||||
public const string PeriodColumnsRuleMoreThanOneIssueDescription = "PeriodColumnsRuleMoreThanOneIssueDescription";
|
||||
|
||||
|
||||
public const string PeriodColumnsRuleNotMatchIssueDescription = "PeriodColumnsRuleNotMatchIssueDescription";
|
||||
|
||||
|
||||
public const string ColumnsInPrimaryKeyCannotBeNullableRuleDescription = "ColumnsInPrimaryKeyCannotBeNullableRuleDescription";
|
||||
|
||||
|
||||
public const string OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRuleDescription = "OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRuleDescription";
|
||||
|
||||
|
||||
public const string TableMustHaveAtLeastOneColumnRuleDescription = "TableMustHaveAtLeastOneColumnRuleDescription";
|
||||
|
||||
|
||||
public const string MemoryOptimizedTableIdentityColumnRuleDescription = "MemoryOptimizedTableIdentityColumnRuleDescription";
|
||||
|
||||
|
||||
public const string TableShouldAvoidHavingMultipleEdgeConstraintsRuleDescription = "TableShouldAvoidHavingMultipleEdgeConstraintsRuleDescription";
|
||||
|
||||
|
||||
public const string ColumnCannotBeListedMoreThanOnceInPrimaryKeyRuleDescription = "ColumnCannotBeListedMoreThanOnceInPrimaryKeyRuleDescription";
|
||||
|
||||
|
||||
public const string MemoryOptimizedCannotBeEnabledWhenNotSupportedRuleDescription = "MemoryOptimizedCannotBeEnabledWhenNotSupportedRuleDescription";
|
||||
|
||||
|
||||
public const string MutipleCreateTableStatementsInScriptRuleDescription = "MutipleCreateTableStatementsInScriptRuleDescription";
|
||||
|
||||
|
||||
private Keys()
|
||||
{ }
|
||||
|
||||
|
||||
@@ -4983,4 +4983,107 @@ The Query Processor estimates that implementing the following index could improv
|
||||
<value>Whether the computed column can have a NULL value (NOT NULL can only be specified if the column is persisted)</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="IndexMustHaveColumnsRuleDescription" xml:space="preserve">
|
||||
<value>Index '{0}' does not have any columns associated with it.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - indexName (string) </comment>
|
||||
</data>
|
||||
<data name="ForeignKeyMustHaveColumnsRuleDescription" xml:space="preserve">
|
||||
<value>Foreign key '{0}' does not have any columns specified.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - foreignKeyName (string) </comment>
|
||||
</data>
|
||||
<data name="ColumnCanOnlyAppearOnceInIndexRuleDescription" xml:space="preserve">
|
||||
<value>Column with name '{0}' has already been added to the index '{1}'. Row number: {2}.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - columnName (string), 1 - indexName (string), 2 - rowNumber (int) </comment>
|
||||
</data>
|
||||
<data name="ColumnCanOnlyAppearOnceInForeignKeyRuleDescription" xml:space="preserve">
|
||||
<value>Column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - columnName (string), 1 - foreignKeyName (string), 2 - rowNumber (int) </comment>
|
||||
</data>
|
||||
<data name="ColumnCanOnlyAppearOnceInForeignKeyRuleForeignColumnDescription" xml:space="preserve">
|
||||
<value>Foreign column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - columnName (string), 1 - foreignKeyName (string), 2 - rowNumber (int) </comment>
|
||||
</data>
|
||||
<data name="NoDuplicateConstraintNameRuleDescription" xml:space="preserve">
|
||||
<value>The name '{0}' is already used by another constraint. Row number: {1}.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - constraintName (string), 1 - rowNumber (int) </comment>
|
||||
</data>
|
||||
<data name="NoDuplicateColumnNameRuleDescription" xml:space="preserve">
|
||||
<value>The name '{0}' is already used by another column. Row number: {1}.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - columnName (string), 1 - rowNumber (int) </comment>
|
||||
</data>
|
||||
<data name="NoDuplicateIndexNameRuleDescription" xml:space="preserve">
|
||||
<value>The name '{0}' is already used by another index. Row number: {1}.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - indexName (string), 1 - rowNumber (int) </comment>
|
||||
</data>
|
||||
<data name="EdgeConstraintMustHaveClausesRuleDescription" xml:space="preserve">
|
||||
<value>Edge constraint '{0}' does not have any clauses specified.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - name (string) </comment>
|
||||
</data>
|
||||
<data name="EdgeConstraintNoRepeatingClausesRuleDescription" xml:space="preserve">
|
||||
<value>The pair '{0}' is already defined by another clause in the edge constraint. Row number: {1}.</value>
|
||||
<comment>.
|
||||
Parameters: 0 - pair (string), 1 - rowNumber (int) </comment>
|
||||
</data>
|
||||
<data name="MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRuleDescription" xml:space="preserve">
|
||||
<value>Memory-optimized table must have non-clustered primary key.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="TemporalTableMustHavePrimaryKeyRuleDescription" xml:space="preserve">
|
||||
<value>System versioned table must have primary key.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="TemporalTableMustHavePeriodColumnsRuleDescription" xml:space="preserve">
|
||||
<value>System versioned table must have the period columns defined.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="PeriodColumnsRuleMoreThanOneIssueDescription" xml:space="preserve">
|
||||
<value>Period columns (Generated Always As Row Start/End) can only be defined once.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="PeriodColumnsRuleNotMatchIssueDescription" xml:space="preserve">
|
||||
<value>Period columns (Generated Always As Row Start/End) must be defined as pair. If one is defined, the other must also be defined.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="ColumnsInPrimaryKeyCannotBeNullableRuleDescription" xml:space="preserve">
|
||||
<value>Columns in primary key cannot be nullable.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRuleDescription" xml:space="preserve">
|
||||
<value>Only durable (DURABILITY = SCHEMA_AND_DATA) memory-optimized tables can be system-versioned.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="TableMustHaveAtLeastOneColumnRuleDescription" xml:space="preserve">
|
||||
<value>A table must have at least one non-computed column defined.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="MemoryOptimizedTableIdentityColumnRuleDescription" xml:space="preserve">
|
||||
<value>The use of seed and increment values other than 1 is not supported with memory optimized tables.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="TableShouldAvoidHavingMultipleEdgeConstraintsRuleDescription" xml:space="preserve">
|
||||
<value>The table has more than one edge constraint on it. This is only useful as a temporary state when modifying existing edge constraints, and should not be used in other cases.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="ColumnCannotBeListedMoreThanOnceInPrimaryKeyRuleDescription" xml:space="preserve">
|
||||
<value>Cannot use duplicate column names in primary key, column name: {0}</value>
|
||||
<comment>.
|
||||
Parameters: 0 - columnName (string) </comment>
|
||||
</data>
|
||||
<data name="MemoryOptimizedCannotBeEnabledWhenNotSupportedRuleDescription" xml:space="preserve">
|
||||
<value>Memory-optimized table is not supported for this database.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="MutipleCreateTableStatementsInScriptRuleDescription" xml:space="preserve">
|
||||
<value>There are multiple table definitions in the script, only the first table can be edited in the designer.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -2320,4 +2320,27 @@ TableColumnComputedFormulaDescription = Formula that the column uses if it is a
|
||||
TableColumnIsComputedPersistedTitle = Is Persisted
|
||||
TableColumnIsComputedPersistedDescription = Whether the computed column is saved with the data source
|
||||
TableColumnIsComputedPersistedNullableTitle = Is Persisted Nullable
|
||||
TableColumnIsComputedPersistedNullableDescription = Whether the computed column can have a NULL value (NOT NULL can only be specified if the column is persisted)
|
||||
TableColumnIsComputedPersistedNullableDescription = Whether the computed column can have a NULL value (NOT NULL can only be specified if the column is persisted)
|
||||
IndexMustHaveColumnsRuleDescription(string indexName) = Index '{0}' does not have any columns associated with it.
|
||||
ForeignKeyMustHaveColumnsRuleDescription(string foreignKeyName) = Foreign key '{0}' does not have any columns specified.
|
||||
ColumnCanOnlyAppearOnceInIndexRuleDescription(string columnName, string indexName, int rowNumber) = Column with name '{0}' has already been added to the index '{1}'. Row number: {2}.
|
||||
ColumnCanOnlyAppearOnceInForeignKeyRuleDescription(string columnName, string foreignKeyName, int rowNumber) = Column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.
|
||||
ColumnCanOnlyAppearOnceInForeignKeyRuleForeignColumnDescription(string columnName, string foreignKeyName, int rowNumber) = Foreign column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.
|
||||
NoDuplicateConstraintNameRuleDescription(string constraintName, int rowNumber) = The name '{0}' is already used by another constraint. Row number: {1}.
|
||||
NoDuplicateColumnNameRuleDescription(string columnName, int rowNumber) = The name '{0}' is already used by another column. Row number: {1}.
|
||||
NoDuplicateIndexNameRuleDescription(string indexName, int rowNumber) = The name '{0}' is already used by another index. Row number: {1}.
|
||||
EdgeConstraintMustHaveClausesRuleDescription(string name) = Edge constraint '{0}' does not have any clauses specified.
|
||||
EdgeConstraintNoRepeatingClausesRuleDescription(string pair, int rowNumber) = The pair '{0}' is already defined by another clause in the edge constraint. Row number: {1}.
|
||||
MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRuleDescription = Memory-optimized table must have non-clustered primary key.
|
||||
TemporalTableMustHavePrimaryKeyRuleDescription = System versioned table must have primary key.
|
||||
TemporalTableMustHavePeriodColumnsRuleDescription = System versioned table must have the period columns defined.
|
||||
PeriodColumnsRuleMoreThanOneIssueDescription = Period columns (Generated Always As Row Start/End) can only be defined once.
|
||||
PeriodColumnsRuleNotMatchIssueDescription= Period columns (Generated Always As Row Start/End) must be defined as pair. If one is defined, the other must also be defined.
|
||||
ColumnsInPrimaryKeyCannotBeNullableRuleDescription = Columns in primary key cannot be nullable.
|
||||
OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRuleDescription = Only durable (DURABILITY = SCHEMA_AND_DATA) memory-optimized tables can be system-versioned.
|
||||
TableMustHaveAtLeastOneColumnRuleDescription = A table must have at least one non-computed column defined.
|
||||
MemoryOptimizedTableIdentityColumnRuleDescription = The use of seed and increment values other than 1 is not supported with memory optimized tables.
|
||||
TableShouldAvoidHavingMultipleEdgeConstraintsRuleDescription = The table has more than one edge constraint on it. This is only useful as a temporary state when modifying existing edge constraints, and should not be used in other cases.
|
||||
ColumnCannotBeListedMoreThanOnceInPrimaryKeyRuleDescription(string columnName) = Cannot use duplicate column names in primary key, column name: {0}
|
||||
MemoryOptimizedCannotBeEnabledWhenNotSupportedRuleDescription = Memory-optimized table is not supported for this database.
|
||||
MutipleCreateTableStatementsInScriptRuleDescription = There are multiple table definitions in the script, only the first table can be edited in the designer.
|
||||
@@ -6068,6 +6068,132 @@ The Query Processor estimates that implementing the following index could improv
|
||||
<target state="new">Formula</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="IndexMustHaveColumnsRuleDescription">
|
||||
<source>Index '{0}' does not have any columns associated with it.</source>
|
||||
<target state="new">Index '{0}' does not have any columns associated with it.</target>
|
||||
<note>.
|
||||
Parameters: 0 - indexName (string) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="ForeignKeyMustHaveColumnsRuleDescription">
|
||||
<source>Foreign key '{0}' does not have any columns specified.</source>
|
||||
<target state="new">Foreign key '{0}' does not have any columns specified.</target>
|
||||
<note>.
|
||||
Parameters: 0 - foreignKeyName (string) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="ColumnCanOnlyAppearOnceInIndexRuleDescription">
|
||||
<source>Column with name '{0}' has already been added to the index '{1}'. Row number: {2}.</source>
|
||||
<target state="new">Column with name '{0}' has already been added to the index '{1}'. Row number: {2}.</target>
|
||||
<note>.
|
||||
Parameters: 0 - columnName (string), 1 - indexName (string), 2 - rowNumber (int) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="ColumnCanOnlyAppearOnceInForeignKeyRuleDescription">
|
||||
<source>Column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.</source>
|
||||
<target state="new">Column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.</target>
|
||||
<note>.
|
||||
Parameters: 0 - columnName (string), 1 - foreignKeyName (string), 2 - rowNumber (int) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="ColumnCanOnlyAppearOnceInForeignKeyRuleForeignColumnDescription">
|
||||
<source>Foreign column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.</source>
|
||||
<target state="new">Foreign column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.</target>
|
||||
<note>.
|
||||
Parameters: 0 - columnName (string), 1 - foreignKeyName (string), 2 - rowNumber (int) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="NoDuplicateConstraintNameRuleDescription">
|
||||
<source>The name '{0}' is already used by another constraint. Row number: {1}.</source>
|
||||
<target state="new">The name '{0}' is already used by another constraint. Row number: {1}.</target>
|
||||
<note>.
|
||||
Parameters: 0 - constraintName (string), 1 - rowNumber (int) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="NoDuplicateColumnNameRuleDescription">
|
||||
<source>The name '{0}' is already used by another column. Row number: {1}.</source>
|
||||
<target state="new">The name '{0}' is already used by another column. Row number: {1}.</target>
|
||||
<note>.
|
||||
Parameters: 0 - columnName (string), 1 - rowNumber (int) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="NoDuplicateIndexNameRuleDescription">
|
||||
<source>The name '{0}' is already used by another index. Row number: {1}.</source>
|
||||
<target state="new">The name '{0}' is already used by another index. Row number: {1}.</target>
|
||||
<note>.
|
||||
Parameters: 0 - indexName (string), 1 - rowNumber (int) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="EdgeConstraintMustHaveClausesRuleDescription">
|
||||
<source>Edge constraint '{0}' does not have any clauses specified.</source>
|
||||
<target state="new">Edge constraint '{0}' does not have any clauses specified.</target>
|
||||
<note>.
|
||||
Parameters: 0 - name (string) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="EdgeConstraintNoRepeatingClausesRuleDescription">
|
||||
<source>The pair '{0}' is already defined by another clause in the edge constraint. Row number: {1}.</source>
|
||||
<target state="new">The pair '{0}' is already defined by another clause in the edge constraint. Row number: {1}.</target>
|
||||
<note>.
|
||||
Parameters: 0 - pair (string), 1 - rowNumber (int) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRuleDescription">
|
||||
<source>Memory-optimized table must have non-clustered primary key.</source>
|
||||
<target state="new">Memory-optimized table must have non-clustered primary key.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="TemporalTableMustHavePrimaryKeyRuleDescription">
|
||||
<source>System versioned table must have primary key.</source>
|
||||
<target state="new">System versioned table must have primary key.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="TemporalTableMustHavePeriodColumnsRuleDescription">
|
||||
<source>System versioned table must have the period columns defined.</source>
|
||||
<target state="new">System versioned table must have the period columns defined.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="PeriodColumnsRuleMoreThanOneIssueDescription">
|
||||
<source>Period columns (Generated Always As Row Start/End) can only be defined once.</source>
|
||||
<target state="new">Period columns (Generated Always As Row Start/End) can only be defined once.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="PeriodColumnsRuleNotMatchIssueDescription">
|
||||
<source>Period columns (Generated Always As Row Start/End) must be defined as pair. If one is defined, the other must also be defined.</source>
|
||||
<target state="new">Period columns (Generated Always As Row Start/End) must be defined as pair. If one is defined, the other must also be defined.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="ColumnsInPrimaryKeyCannotBeNullableRuleDescription">
|
||||
<source>Columns in primary key cannot be nullable.</source>
|
||||
<target state="new">Columns in primary key cannot be nullable.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRuleDescription">
|
||||
<source>Only durable (DURABILITY = SCHEMA_AND_DATA) memory-optimized tables can be system-versioned.</source>
|
||||
<target state="new">Only durable (DURABILITY = SCHEMA_AND_DATA) memory-optimized tables can be system-versioned.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="TableMustHaveAtLeastOneColumnRuleDescription">
|
||||
<source>A table must have at least one non-computed column defined.</source>
|
||||
<target state="new">A table must have at least one non-computed column defined.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="MemoryOptimizedTableIdentityColumnRuleDescription">
|
||||
<source>The use of seed and increment values other than 1 is not supported with memory optimized tables.</source>
|
||||
<target state="new">The use of seed and increment values other than 1 is not supported with memory optimized tables.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="TableShouldAvoidHavingMultipleEdgeConstraintsRuleDescription">
|
||||
<source>The table has more than one edge constraint on it. This is only useful as a temporary state when modifying existing edge constraints, and should not be used in other cases.</source>
|
||||
<target state="new">The table has more than one edge constraint on it. This is only useful as a temporary state when modifying existing edge constraints, and should not be used in other cases.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="ColumnCannotBeListedMoreThanOnceInPrimaryKeyRuleDescription">
|
||||
<source>Cannot use duplicate column names in primary key, column name: {0}</source>
|
||||
<target state="new">Cannot use duplicate column names in primary key, column name: {0}</target>
|
||||
<note>.
|
||||
Parameters: 0 - columnName (string) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="MemoryOptimizedCannotBeEnabledWhenNotSupportedRuleDescription">
|
||||
<source>Memory-optimized table is not supported for this database.</source>
|
||||
<target state="new">Memory-optimized table is not supported for this database.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="MutipleCreateTableStatementsInScriptRuleDescription">
|
||||
<source>There are multiple table definitions in the script, only the first table can be edited in the designer.</source>
|
||||
<target state="new">There are multiple table definitions in the script, only the first table can be edited in the designer.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -24,7 +24,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
new EdgeConstraintNoRepeatingClausesRule(),
|
||||
new MemoryOptimizedCannotBeEnabledWhenNotSupportedRule(),
|
||||
new MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRule(),
|
||||
new TemporalTableMustHavePeriodColumns(),
|
||||
new TemporalTableMustHavePeriodColumnsRule(),
|
||||
new PeriodColumnsRule(),
|
||||
new ColumnsInPrimaryKeyCannotBeNullableRule(),
|
||||
new OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRule(),
|
||||
@@ -68,7 +68,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("Index '{0}' does not have any columns associated with it.", index.Name),
|
||||
Description = SR.IndexMustHaveColumnsRuleDescription(index.Name),
|
||||
PropertyPath = new object[] { TablePropertyNames.Indexes, i }
|
||||
});
|
||||
}
|
||||
@@ -90,7 +90,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("Foreign key '{0}' does not have any columns specified.", foreignKey.Name),
|
||||
Description = SR.ForeignKeyMustHaveColumnsRuleDescription(foreignKey.Name),
|
||||
PropertyPath = new object[] { TablePropertyNames.ForeignKeys, i }
|
||||
});
|
||||
}
|
||||
@@ -116,7 +116,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("Column with name '{0}' has already been added to the index '{1}'. Row number: {2}.", columnSpec.Column, index.Name, j + 1),
|
||||
Description = SR.ColumnCanOnlyAppearOnceInIndexRuleDescription(columnSpec.Column, index.Name, j + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.Indexes, i, IndexPropertyNames.Columns, j }
|
||||
});
|
||||
}
|
||||
@@ -147,7 +147,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("Column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.", column, foreignKey.Name, j + 1),
|
||||
Description = SR.ColumnCanOnlyAppearOnceInForeignKeyRuleDescription(column, foreignKey.Name, j + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.ForeignKeys, i, ForeignKeyPropertyNames.ColumnMapping, j, ForeignKeyColumnMappingPropertyNames.Column }
|
||||
});
|
||||
}
|
||||
@@ -165,7 +165,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("Foreign column with name '{0}' has already been added to the foreign key '{1}'. Row number: {2}.", foreignColumn, foreignKey.Name, j + 1),
|
||||
Description = SR.ColumnCanOnlyAppearOnceInForeignKeyRuleForeignColumnDescription(foreignColumn, foreignKey.Name, j + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.ForeignKeys, i, ForeignKeyPropertyNames.ColumnMapping, j, ForeignKeyColumnMappingPropertyNames.ForeignColumn }
|
||||
});
|
||||
}
|
||||
@@ -193,7 +193,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("The name '{0}' is already used by another constraint. Row number: {1}.", foreignKey.Name, i + 1),
|
||||
Description = SR.NoDuplicateConstraintNameRuleDescription(foreignKey.Name, i + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.ForeignKeys, i, ForeignKeyPropertyNames.Name }
|
||||
});
|
||||
}
|
||||
@@ -211,7 +211,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("The name '{0}' is already used by another constraint. Row number: {1}.", checkConstraint.Name, i + 1),
|
||||
Description = SR.NoDuplicateConstraintNameRuleDescription(checkConstraint.Name, i + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.CheckConstraints, i, CheckConstraintPropertyNames.Name }
|
||||
});
|
||||
}
|
||||
@@ -228,7 +228,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("The name '{0}' is already used by another constraint. Row number: {1}.", edgeConstraint.Name, i + 1),
|
||||
Description = SR.NoDuplicateConstraintNameRuleDescription(edgeConstraint.Name, i + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.EdgeConstraints, i, EdgeConstraintPropertyNames.Name }
|
||||
});
|
||||
}
|
||||
@@ -255,7 +255,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("The name '{0}' is already used by another column. Row number: {1}.", column.Name, i + 1),
|
||||
Description = SR.NoDuplicateColumnNameRuleDescription(column.Name, i + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.Columns, i, TableColumnPropertyNames.Name }
|
||||
});
|
||||
}
|
||||
@@ -282,7 +282,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("The name '{0}' is already used by another index. Row number: {1}.", index.Name, i + 1),
|
||||
Description = SR.NoDuplicateIndexNameRuleDescription(index.Name, i + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.Indexes, i, IndexPropertyNames.Name }
|
||||
});
|
||||
}
|
||||
@@ -308,7 +308,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("Edge constraint '{0}' does not have any clauses specified.", edgeConstraint.Name),
|
||||
Description = SR.EdgeConstraintMustHaveClausesRuleDescription(edgeConstraint.Name),
|
||||
PropertyPath = new object[] { TablePropertyNames.EdgeConstraints, i }
|
||||
});
|
||||
}
|
||||
@@ -335,7 +335,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("The pair '{0}' is already defined by another clause in the edge constraint. Row number: {1}.", pair, j + 1),
|
||||
Description = SR.EdgeConstraintNoRepeatingClausesRuleDescription(pair, j + 1),
|
||||
PropertyPath = new object[] { TablePropertyNames.EdgeConstraints, i, EdgeConstraintPropertyNames.Clauses, j, EdgeConstraintClausePropertyNames.FromTable }
|
||||
});
|
||||
}
|
||||
@@ -359,7 +359,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "Memory-optimized table must have non-clustered primary key.",
|
||||
Description = SR.MemoryOptimizedTableMustHaveNonClusteredPrimaryKeyRuleDescription,
|
||||
PropertyPath = new object[] { TablePropertyNames.PrimaryKeyIsClustered }
|
||||
});
|
||||
}
|
||||
@@ -377,14 +377,14 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "System versioned table must have primary key."
|
||||
Description = SR.TemporalTableMustHavePrimaryKeyRuleDescription
|
||||
});
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
|
||||
public class TemporalTableMustHavePeriodColumns : ITableDesignerValidationRule
|
||||
public class TemporalTableMustHavePeriodColumnsRule : ITableDesignerValidationRule
|
||||
{
|
||||
public List<TableDesignerIssue> Run(Dac.TableDesigner designer)
|
||||
{
|
||||
@@ -394,7 +394,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "System versioned table must have the period columns defined.",
|
||||
Description = SR.TemporalTableMustHavePeriodColumnsRuleDescription,
|
||||
MoreInfoLink = "https://docs.microsoft.com/sql/relational-databases/tables/creating-a-system-versioned-temporal-table"
|
||||
});
|
||||
}
|
||||
@@ -414,14 +414,14 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "Period columns (Generated Always As Row Start/End) can only be defined once."
|
||||
Description = SR.PeriodColumnsRuleMoreThanOneIssueDescription
|
||||
});
|
||||
}
|
||||
else if (rowEnd.Count() != rowStart.Count())
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "Period columns (Generated Always As Row Start/End) must be defined as pair. If one is defined, the other must also be defined"
|
||||
Description = SR.PeriodColumnsRuleNotMatchIssueDescription
|
||||
});
|
||||
}
|
||||
return errors;
|
||||
@@ -441,7 +441,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "Columns in primary key cannot be nullable.",
|
||||
Description = SR.ColumnsInPrimaryKeyCannotBeNullableRuleDescription,
|
||||
PropertyPath = new object[] { TablePropertyNames.Columns, i }
|
||||
});
|
||||
}
|
||||
@@ -460,7 +460,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "Only durable (DURABILITY = SCHEMA_AND_DATA) memory-optimized tables can be system-versioned."
|
||||
Description = SR.OnlyDurableMemoryOptimizedTableCanBeSystemVersionedRuleDescription
|
||||
});
|
||||
}
|
||||
return errors;
|
||||
@@ -477,7 +477,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "A table must have at least one non-computed column defined."
|
||||
Description = SR.TableMustHaveAtLeastOneColumnRuleDescription
|
||||
});
|
||||
}
|
||||
return errors;
|
||||
@@ -500,7 +500,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
var propertyName = column.IdentitySeed != 1 ? TableColumnPropertyNames.IdentitySeed : TableColumnPropertyNames.IdentityIncrement;
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "The use of seed and increment values other than 1 is not supported with memory optimized tables.",
|
||||
Description = SR.MemoryOptimizedTableIdentityColumnRuleDescription,
|
||||
PropertyPath = new object[] { TablePropertyNames.Columns, i, propertyName }
|
||||
});
|
||||
}
|
||||
@@ -520,7 +520,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "The table has more than one edge constraint on it. This is only useful as a temporary state when modifying existing edge constraints, and should not be used in other cases.",
|
||||
Description = SR.TableShouldAvoidHavingMultipleEdgeConstraintsRuleDescription,
|
||||
Severity = Contracts.IssueSeverity.Warning,
|
||||
MoreInfoLink = "https://docs.microsoft.com/sql/relational-databases/tables/graph-edge-constraints"
|
||||
});
|
||||
@@ -545,7 +545,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("Cannot use duplicate column names in primary key, column name: {0}", columnSpec.Column),
|
||||
Description = SR.ColumnCannotBeListedMoreThanOnceInPrimaryKeyRuleDescription(columnSpec.Column),
|
||||
PropertyPath = new object[] { TablePropertyNames.PrimaryKeyColumns, i, IndexColumnSpecificationPropertyNames.Column }
|
||||
});
|
||||
}
|
||||
@@ -569,7 +569,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = string.Format("Memory-optimized table is not supported for this database."),
|
||||
Description = SR.MemoryOptimizedCannotBeEnabledWhenNotSupportedRuleDescription,
|
||||
PropertyPath = new object[] { TablePropertyNames.IsMemoryOptimized },
|
||||
MoreInfoLink = designer.IsAzure
|
||||
? "https://docs.microsoft.com/en-us/azure/azure-sql/in-memory-oltp-overview"
|
||||
@@ -585,10 +585,11 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
public List<TableDesignerIssue> Run(Dac.TableDesigner designer)
|
||||
{
|
||||
var errors = new List<TableDesignerIssue>();
|
||||
if(designer.ScriptContainsMultipleTableDefinition)
|
||||
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.",
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = SR.MutipleCreateTableStatementsInScriptRuleDescription,
|
||||
Severity = Contracts.IssueSeverity.Information
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user