mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-17 02:51:45 -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 =
|
var minimalQuery =
|
||||||
codeBlock.Service.GetMinimalText(MinimalTextKind.RemoveLeadingWhitespaceAndComments);
|
codeBlock.Service.GetMinimalText(MinimalTextKind.RemoveLeadingWhitespaceAndComments);
|
||||||
IDataReader origReader = _kustoQueryProvider.ExecuteQuery(
|
|
||||||
KustoQueryUtils.IsClusterLevelQuery(minimalQuery) ? "" : databaseName,
|
IDataReader origReader;
|
||||||
minimalQuery,
|
|
||||||
clientRequestProperties);
|
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;
|
origReaders[index] = origReader;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user