Skip to content

Commit c8ed077

Browse files
Add IsNullable property to EditColumnInfo class (#2545)
1 parent e4da377 commit c8ed077

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Microsoft.SqlTools.ServiceLayer/EditData/Contracts/EditColumnInfo.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,10 @@ public class EditColumnInfo
2020
/// such as being computed columns, identity columns, or columns that are part of a primary key.
2121
/// </summary>
2222
public bool IsEditable { get; set; }
23+
24+
/// <summary>
25+
/// Whether or not the column allows null values
26+
/// </summary>
27+
public bool? IsNullable { get; set; }
2328
}
2429
}

src/Microsoft.SqlTools.ServiceLayer/EditData/EditSession.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ public EditColumnInfo[] GetColumnInfo()
510510
{
511511
Name = c.ColumnName,
512512
// IsEditable provides a clearer public API name than IsUpdatable
513-
IsEditable = c.IsUpdatable
513+
IsEditable = c.IsUpdatable,
514+
IsNullable = c.AllowDBNull
514515
}).ToArray() ?? new EditColumnInfo[0];
515516
}
516517

0 commit comments

Comments
 (0)