mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Task/script refactor (#476)
* scripting working with race conditions * new service works with no race conditions * use new scripting service and commented out tests * refactored peek definition to use mssql-scripter * fixed peek definition tests * removed auto gen comment * fixed peek definition highlighting bug * made scripting async and fixed event handlers * fixed tests (without cancel and plan notifs) * removed dead code * added nuget package * CR comments + select script service implementation * minor fixes and added test * CR comments and script select * added unit tests * code review comments and cleanup * fixed failing scripting tests
This commit is contained in:
@@ -97,7 +97,7 @@ GO";
|
||||
string objectName = "spt_monitor";
|
||||
|
||||
string schemaName = null;
|
||||
string objectType = "TABLE";
|
||||
string objectType = "Table";
|
||||
|
||||
// Get locations for valid table object
|
||||
Location[] locations = scripter.GetSqlObjectDefinition(objectName, schemaName, objectType);
|
||||
@@ -139,7 +139,7 @@ GO";
|
||||
string objectName = "spt_monitor";
|
||||
|
||||
string schemaName = "dbo";
|
||||
string objectType = "TABLE";
|
||||
string objectType = "Table";
|
||||
|
||||
// Get locations for valid table object with schema name
|
||||
Location[] locations = scripter.GetSqlObjectDefinition(objectName, schemaName, objectType);
|
||||
@@ -260,7 +260,7 @@ GO";
|
||||
Scripter scripter = new Scripter(serverConnection, connInfo);
|
||||
string objectName = "objects";
|
||||
string schemaName = "sys";
|
||||
string objectType = "VIEW";
|
||||
string objectType = "View";
|
||||
|
||||
Location[] locations = scripter.GetSqlObjectDefinition(objectName, schemaName, objectType);
|
||||
Assert.NotNull(locations);
|
||||
@@ -401,7 +401,7 @@ GO";
|
||||
[Fact]
|
||||
public async Task GetTableValuedFunctionDefinitionWithSchemaNameSuccessTest()
|
||||
{
|
||||
await ExecuteAndValidatePeekTest(ReturnTableTableFunctionQuery, ReturnTableFunctionName, TableValuedFunctionTypeName);
|
||||
await ExecuteAndValidatePeekTest(ReturnTableTableFunctionQuery, ReturnTableFunctionName, ScalarValuedFunctionTypeName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -444,7 +444,7 @@ GO";
|
||||
[Fact]
|
||||
public async Task GetTableValuedFunctionDefinitionWithoutSchemaNameSuccessTest()
|
||||
{
|
||||
await ExecuteAndValidatePeekTest(ReturnTableTableFunctionQuery, ReturnTableFunctionName, TableValuedFunctionTypeName, null);
|
||||
await ExecuteAndValidatePeekTest(ReturnTableTableFunctionQuery, ReturnTableFunctionName, ScalarValuedFunctionTypeName, null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user