mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-26 09:35:38 -05:00
Remove Value in AddSqlCmdVariableParams (#1885)
This commit is contained in:
@@ -24,11 +24,6 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
|
||||
/// Default value of the SQLCMD variable
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Value of the SQLCMD variable, with or without the $()
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -458,7 +458,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
||||
|
||||
internal async Task HandleAddSqlCmdVariableRequest(AddSqlCmdVariableParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
{
|
||||
await RunWithErrorHandling(() => GetProject(requestParams.ProjectUri!).SqlCmdVariables.Add(new SqlCmdVariable(requestParams.Name, requestParams.DefaultValue, requestParams.Value)), requestContext);
|
||||
await RunWithErrorHandling(() => GetProject(requestParams.ProjectUri!).SqlCmdVariables.Add(new SqlCmdVariable(requestParams.Name, requestParams.DefaultValue)), requestContext);
|
||||
}
|
||||
|
||||
internal async Task HandleDeleteSqlCmdVariableRequest(DeleteSqlCmdVariableParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||
@@ -472,7 +472,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
||||
{
|
||||
SqlProject project = GetProject(requestParams.ProjectUri!);
|
||||
project.SqlCmdVariables.Delete(requestParams.Name); // idempotent (won't throw if doesn't exist)
|
||||
project.SqlCmdVariables.Add(new SqlCmdVariable(requestParams.Name, requestParams.DefaultValue, requestParams.Value));
|
||||
project.SqlCmdVariables.Add(new SqlCmdVariable(requestParams.Name, requestParams.DefaultValue));
|
||||
}, requestContext);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user