mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Merge branch 'dev' into feature/queryBatchProcessing
This commit is contained in:
10
nuget.config
10
nuget.config
@@ -1,14 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration >
|
<configuration >
|
||||||
|
|
||||||
<config>
|
|
||||||
<add key="DefaultPushSource" value="http://SQLISNuget/DS-SSMS/api/v2/package" />
|
|
||||||
</config>
|
|
||||||
|
|
||||||
<packageSources>
|
<packageSources>
|
||||||
|
<add key="DataTools Nuget" value="http://dtnuget/api/v2/" />
|
||||||
<!-- Add the SSMS repo for private requirements -->
|
|
||||||
<add key="SQLDS - SSMS" value="http://SQLISNuget/DS-SSMS/nuget/" />
|
|
||||||
</packageSources>
|
</packageSources>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -124,6 +124,9 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
|
|
||||||
// Add the result set to the results of the query
|
// Add the result set to the results of the query
|
||||||
ResultSets.Add(resultSet);
|
ResultSets.Add(resultSet);
|
||||||
|
|
||||||
|
// Add a message for the number of rows the query returned
|
||||||
|
ResultMessages.Add(string.Format(RowsAffectedFormat, resultSet.Rows.Count));
|
||||||
} while (await reader.NextResultAsync(cancellationToken));
|
} while (await reader.NextResultAsync(cancellationToken));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Query : IDisposable
|
public class Query : IDisposable
|
||||||
{
|
{
|
||||||
|
private const string RowsAffectedFormat = "({0} row(s) affected)";
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Newtonsoft.Json": "9.0.1",
|
"Newtonsoft.Json": "9.0.1",
|
||||||
"Microsoft.SqlServer.SqlParser": "140.1.3",
|
"Microsoft.SqlServer.SqlParser": "140.1.4",
|
||||||
"System.Data.Common": "4.1.0",
|
"System.Data.Common": "4.1.0",
|
||||||
"System.Data.SqlClient": "4.1.0"
|
"System.Data.SqlClient": "4.1.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution
|
|||||||
ServerName = "sqltools11"
|
ServerName = "sqltools11"
|
||||||
};
|
};
|
||||||
|
|
||||||
return new ConnectionInfo(CreateMockFactory(data, throwOnRead), "test://test", connDetails);
|
return new ConnectionInfo(CreateMockFactory(data, throwOnRead), OwnerUri, connDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -381,6 +381,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution
|
|||||||
//VerifyQueryExecuteCallCount(requestContext, Times.Once(), Times.Never(), Times.Never());
|
//VerifyQueryExecuteCallCount(requestContext, Times.Once(), Times.Never(), Times.Never());
|
||||||
//Assert.NotNull(result.Messages);
|
//Assert.NotNull(result.Messages);
|
||||||
//Assert.NotEmpty(result.Messages);
|
//Assert.NotEmpty(result.Messages);
|
||||||
|
|
||||||
|
// ... There should not be an active query
|
||||||
|
Assert.Empty(queryService.ActiveQueries);
|
||||||
}
|
}
|
||||||
|
|
||||||
//[Fact]
|
//[Fact]
|
||||||
|
|||||||
@@ -91,6 +91,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Utility
|
|||||||
|
|
||||||
public override int FieldCount { get { return Rows?.Current.Count ?? 0; } }
|
public override int FieldCount { get { return Rows?.Current.Count ?? 0; } }
|
||||||
|
|
||||||
|
public override int RecordsAffected
|
||||||
|
{
|
||||||
|
// Mimics the behavior of SqlDataReader
|
||||||
|
get { return Rows != null ? -1 : 1; }
|
||||||
|
}
|
||||||
|
|
||||||
#region Not Implemented
|
#region Not Implemented
|
||||||
|
|
||||||
public override bool GetBoolean(int ordinal)
|
public override bool GetBoolean(int ordinal)
|
||||||
@@ -200,7 +206,6 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Utility
|
|||||||
|
|
||||||
public override int Depth { get; }
|
public override int Depth { get; }
|
||||||
public override bool IsClosed { get; }
|
public override bool IsClosed { get; }
|
||||||
public override int RecordsAffected { get; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user