//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts
{
///
/// Summary of a batch within a query
///
public class BatchSummary
{
///
/// Localized timestamp for how long it took for the execution to complete
///
public string ExecutionElapsed { get; set; }
///
/// Localized timestamp for when the execution completed.
///
public string ExecutionEnd { get; set; }
///
/// Localized timestamp for when the execution started.
///
public string ExecutionStart { get; set; }
///
/// Whether or not the batch encountered an error that halted execution
///
public bool HasError { get; set; }
///
/// The ID of the result set within the query results
///
public int Id { get; set; }
///
/// The selection from the file for this batch
///
public SelectionData Selection { get; set; }
///
/// The summaries of the result sets inside the batch
///
public ResultSetSummary[] ResultSetSummaries { get; set; }
///
/// The special action of the batch
///
public SpecialAction SpecialAction { get; set; }
public override string ToString() => $"Batch Id:'{Id}', Elapsed:'{ExecutionElapsed}', HasError:'{HasError}'";
}
}