mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Make Kusto control commands work (#1094)
Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
@@ -165,10 +165,21 @@ namespace Microsoft.Kusto.ServiceLayer.DataSource
|
||||
{
|
||||
var minimalQuery =
|
||||
codeBlock.Service.GetMinimalText(MinimalTextKind.RemoveLeadingWhitespaceAndComments);
|
||||
IDataReader origReader = _kustoQueryProvider.ExecuteQuery(
|
||||
KustoQueryUtils.IsClusterLevelQuery(minimalQuery) ? "" : databaseName,
|
||||
minimalQuery,
|
||||
clientRequestProperties);
|
||||
|
||||
IDataReader origReader;
|
||||
|
||||
if(minimalQuery.StartsWith(".") && !minimalQuery.StartsWith(".show")){
|
||||
origReader = _kustoAdminProvider.ExecuteControlCommand(
|
||||
KustoQueryUtils.IsClusterLevelQuery(minimalQuery) ? "" : databaseName,
|
||||
minimalQuery,
|
||||
clientRequestProperties);
|
||||
}
|
||||
else{
|
||||
origReader = _kustoQueryProvider.ExecuteQuery(
|
||||
KustoQueryUtils.IsClusterLevelQuery(minimalQuery) ? "" : databaseName,
|
||||
minimalQuery,
|
||||
clientRequestProperties);
|
||||
}
|
||||
|
||||
origReaders[index] = origReader;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user