mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 17:23:55 -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user