mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
change time when the batch time is set (#118)
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Local time when the execution starts, specifically when the object is created
|
/// Local time when the execution starts, specifically when the object is created
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly DateTime executionStartTime;
|
private DateTime executionStartTime;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Factory for creating readers/writers for the output of the batch
|
/// Factory for creating readers/writers for the output of the batch
|
||||||
@@ -65,7 +65,6 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
|
|
||||||
// Initialize the internal state
|
// Initialize the internal state
|
||||||
BatchText = batchText;
|
BatchText = batchText;
|
||||||
executionStartTime = DateTime.Now;
|
|
||||||
Selection = new SelectionData(startLine, startColumn, endLine, endColumn);
|
Selection = new SelectionData(startLine, startColumn, endLine, endColumn);
|
||||||
HasExecuted = false;
|
HasExecuted = false;
|
||||||
resultSets = new List<ResultSet>();
|
resultSets = new List<ResultSet>();
|
||||||
@@ -198,6 +197,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
command.CommandText = BatchText;
|
command.CommandText = BatchText;
|
||||||
command.CommandType = CommandType.Text;
|
command.CommandType = CommandType.Text;
|
||||||
command.CommandTimeout = 0;
|
command.CommandTimeout = 0;
|
||||||
|
executionStartTime = DateTime.Now;
|
||||||
|
|
||||||
// Execute the command to get back a reader
|
// Execute the command to get back a reader
|
||||||
using (DbDataReader reader = await command.ExecuteReaderAsync(cancellationToken))
|
using (DbDataReader reader = await command.ExecuteReaderAsync(cancellationToken))
|
||||||
|
|||||||
Reference in New Issue
Block a user