Feature/sqlcmd : Enable running scripts with SQLCMD variables - Part 1 (#839)

* Part1 : Changes to make cmdcmd script to work with parameters in script

* Stop SQL intellisense for SQLCMD

* Adding test for Intellisense handling of SQLCMD page

* Removing unintentional spacing changes caused by formatting

* Updating with smaller CR comments. Will discuss regarding script vs other options in batch info

* Removing unintentional change

* Adding latest PR comments
This commit is contained in:
Udeesha Gautam
2019-08-09 14:25:47 -07:00
committed by GitHub
parent d42e3626cb
commit 68145d5e7c
9 changed files with 177 additions and 24 deletions

View File

@@ -116,7 +116,12 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
// Process the query into batches
BatchParserWrapper parser = new BatchParserWrapper();
List<BatchDefinition> parserResult = parser.GetBatches(queryText);
ExecutionEngineConditions conditions = null;
if (settings.IsSqlCmdMode)
{
conditions = new ExecutionEngineConditions() { IsSqlCmd = settings.IsSqlCmdMode };
}
List<BatchDefinition> parserResult = parser.GetBatches(queryText, conditions);
var batchSelection = parserResult
.Select((batchDefinition, index) =>