mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 02:48:36 -05:00
add missing udf type (#923)
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Metadata
|
|||||||
|
|
||||||
private static ConnectionService connectionService = null;
|
private static ConnectionService connectionService = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Internal for testing purposes only
|
/// Internal for testing purposes only
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static ConnectionService ConnectionServiceInstance
|
internal static ConnectionService ConnectionServiceInstance
|
||||||
@@ -176,7 +176,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Metadata
|
|||||||
@"SELECT s.name AS schema_name, o.[name] AS object_name, o.[type] AS object_type
|
@"SELECT s.name AS schema_name, o.[name] AS object_name, o.[type] AS object_type
|
||||||
FROM sys.all_objects o
|
FROM sys.all_objects o
|
||||||
INNER JOIN sys.schemas s ON o.schema_id = s.schema_id
|
INNER JOIN sys.schemas s ON o.schema_id = s.schema_id
|
||||||
WHERE (o.[type] = 'P' OR o.[type] = 'V' OR o.[type] = 'U' OR o.[type] = 'AF' OR o.[type] = 'FN' OR o.[type] = 'IF') ";
|
WHERE o.[type] IN ('P','V','U','AF','FN','IF','TF') ";
|
||||||
|
|
||||||
if (!IsSystemDatabase(sqlConn.Database))
|
if (!IsSystemDatabase(sqlConn.Database))
|
||||||
{
|
{
|
||||||
@@ -207,7 +207,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Metadata
|
|||||||
metadataType = MetadataType.SProc;
|
metadataType = MetadataType.SProc;
|
||||||
metadataTypeName = "StoredProcedure";
|
metadataTypeName = "StoredProcedure";
|
||||||
}
|
}
|
||||||
else if (objectType == "AF" || objectType == "FN" || objectType == "IF")
|
else if (objectType == "AF" || objectType == "FN" || objectType == "IF" || objectType == "TF")
|
||||||
{
|
{
|
||||||
metadataType = MetadataType.Function;
|
metadataType = MetadataType.Function;
|
||||||
metadataTypeName = "UserDefinedFunction";
|
metadataTypeName = "UserDefinedFunction";
|
||||||
|
|||||||
Reference in New Issue
Block a user