mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-29 09:35:38 -05:00
Edit Data: Create Row with Nullable Columns (#553)
* WIP * All the new RowCreate tests are working * Fixing a couple bugs with the row delete and row update tests * Regenerating localization files * Fixing multiple iteration in tests
This commit is contained in:
@@ -214,13 +214,13 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.UpdateManagement
|
||||
// Make sure a value was provided for the cell
|
||||
if (cell == null)
|
||||
{
|
||||
// If there isn't a default, then fail
|
||||
if (DefaultValues[i] == null)
|
||||
// If the column is not nullable and there is no default defined, then fail
|
||||
if (!column.AllowDBNull.HasTrue() && DefaultValues[i] == null)
|
||||
{
|
||||
throw new InvalidOperationException(SR.EditDataCreateScriptMissingValue);
|
||||
throw new InvalidOperationException(SR.EditDataCreateScriptMissingValue(column.ColumnName));
|
||||
}
|
||||
|
||||
// There is a default value, so trust the db will apply it
|
||||
// There is a default value (or omitting the value is fine), so trust the db will apply it correctly
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -212,7 +212,7 @@ EditDataInvalidFormatBinary = Invalid format for binary column
|
||||
|
||||
EditDataInvalidFormatBoolean = Allowed values for boolean columns are 0, 1, "true", or "false"
|
||||
|
||||
EditDataCreateScriptMissingValue = A required cell value is missing
|
||||
EditDataCreateScriptMissingValue(string colName) = The column '{0}' is defined as NOT NULL but was not given a value
|
||||
|
||||
EditDataDeleteSetCell = A delete is pending for this row, a cell update cannot be applied.
|
||||
|
||||
|
||||
@@ -475,9 +475,10 @@
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="EditDataCreateScriptMissingValue">
|
||||
<source>A required cell value is missing</source>
|
||||
<source>The column '{0}' is defined as NOT NULL but was not given a value</source>
|
||||
<target state="new">A required cell value is missing</target>
|
||||
<note></note>
|
||||
<note>.
|
||||
Parameters: 0 - colName (string) </note>
|
||||
</trans-unit>
|
||||
<trans-unit id="EditDataDeleteSetCell">
|
||||
<source>A delete is pending for this row, a cell update cannot be applied.</source>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user