SQL Tools Service
Show / Hide Table of Contents
Improve this Doc View Source

Class Batch

This class represents a batch within a query

Inheritance
System.Object
Batch
Namespace:Microsoft.SqlTools.ServiceLayer.QueryExecution
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public class Batch : IDisposable

Properties

| Improve this Doc View Source

BatchText

The text of batch that will be executed

Declaration
public string BatchText { get; set; }
Type Description
System.String
| Improve this Doc View Source

ExecutionElapsedTime

Localized timestamp for how long it took for the execution to complete

Declaration
public string ExecutionElapsedTime { get; }
Type Description
System.String
| Improve this Doc View Source

ExecutionEndTimeStamp

Localized timestamp for when the execution completed. Stored in UTC ISO 8601 format; should be localized before displaying to any user

Declaration
public string ExecutionEndTimeStamp { get; }
Type Description
System.String
| Improve this Doc View Source

ExecutionStartTimeStamp

Localized timestamp for when the execution began. Stored in UTC ISO 8601 format; should be localized before displaying to any user

Declaration
public string ExecutionStartTimeStamp { get; }
Type Description
System.String
| Improve this Doc View Source

HasError

Whether or not this batch has an error

Declaration
public bool HasError { get; set; }
Type Description
System.Boolean
| Improve this Doc View Source

HasExecuted

Whether or not this batch has been executed, regardless of success or failure

Declaration
public bool HasExecuted { get; set; }
Type Description
System.Boolean
| Improve this Doc View Source

Id

Ordinal of the batch in the query

Declaration
public int Id { get; }
Type Description
System.Int32
| Improve this Doc View Source

ResultMessages

Messages that have come back from the server

Declaration
public IEnumerable<ResultMessage> ResultMessages { get; }
Type Description
System.Collections.Generic.IEnumerable<ResultMessage>
| Improve this Doc View Source

ResultSets

The result sets of the batch execution

Declaration
public IList<ResultSet> ResultSets { get; }
Type Description
System.Collections.Generic.IList<ResultSet>
| Improve this Doc View Source

ResultSummaries

Property for generating a set result set summaries from the result sets

Declaration
public ResultSetSummary[] ResultSummaries { get; }
Type Description
ResultSetSummary[]
| Improve this Doc View Source

Summary

Creates a BatchSummary based on the batch instance

Declaration
public BatchSummary Summary { get; }
Type Description
BatchSummary

Methods

| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
| Improve this Doc View Source

Execute(DbConnection, CancellationToken)

Executes this batch and captures any server messages that are returned.

Declaration
public Task Execute(DbConnection conn, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Data.Common.DbConnection conn

The connection to use to execute the batch

System.Threading.CancellationToken cancellationToken

Token for cancelling the execution

Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

GetSubset(Int32, Int32, Int32)

Generates a subset of the rows from a result set of the batch

Declaration
public Task<ResultSetSubset> GetSubset(int resultSetIndex, int startRow, int rowCount)
Parameters
Type Name Description
System.Int32 resultSetIndex

The index for selecting the result set

System.Int32 startRow

The starting row of the results

System.Int32 rowCount

How many rows to retrieve

Returns
Type Description
System.Threading.Tasks.Task<ResultSetSubset>

A subset of results

Events

| Improve this Doc View Source

BatchCompletion

Event that will be called when the batch has completed execution

Declaration
public event Batch.BatchAsyncEventHandler BatchCompletion
| Improve this Doc View Source

BatchStart

Event to call when the batch has started execution

Declaration
public event Batch.BatchAsyncEventHandler BatchStart
| Improve this Doc View Source

ResultSetCompletion

Event that will be called when the resultset has completed execution. It will not be called from the Batch but from the ResultSet instance

Declaration
public event ResultSet.ResultSetAsyncEventHandler ResultSetCompletion
  • Improve this Doc
  • View Source

© Microsoft  //  Generated with DocFX