mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 09:59:48 -05:00
Feature/batch line info (#56)
* inital pipe of line numbers and getting text from workspace services * tests compile * Fixed bug regarding tests using connections on mac * updated tests * fixed workspace service and fixed tests * integrated feedback
This commit is contained in:
@@ -86,7 +86,12 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
});
|
||||
// NOTE: We only want to process batches that have statements (ie, ignore comments and empty lines)
|
||||
Batches = parseResult.Script.Batches.Where(b => b.Statements.Count > 0)
|
||||
.Select(b => new Batch(b.Sql, b.StartLocation.LineNumber, outputFileFactory)).ToArray();
|
||||
.Select(b => new Batch(b.Sql,
|
||||
b.StartLocation.LineNumber - 1,
|
||||
b.StartLocation.ColumnNumber - 1,
|
||||
b.EndLocation.LineNumber - 1,
|
||||
b.EndLocation.ColumnNumber - 1,
|
||||
outputFileFactory)).ToArray();
|
||||
}
|
||||
|
||||
#region Properties
|
||||
@@ -113,7 +118,8 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
||||
Id = index,
|
||||
HasError = batch.HasError,
|
||||
Messages = batch.ResultMessages.ToArray(),
|
||||
ResultSetSummaries = batch.ResultSummaries
|
||||
ResultSetSummaries = batch.ResultSummaries,
|
||||
Selection = batch.Selection
|
||||
}).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user