added sub types for parameters (#340)

This commit is contained in:
Leila Lali
2017-05-10 09:39:49 -07:00
committed by GitHub
parent 7625c8d83d
commit 39f5279631
7 changed files with 223 additions and 179 deletions

View File

@@ -300,7 +300,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
} }
catch(Exception ex) catch(Exception ex)
{ {
Logger.Write(LogLevel.Error, $"Failed populating oe children error:{ex.Message} {ex.Source}"); Logger.Write(LogLevel.Error, $"Failed populating oe children. error:{ex.Message} {ex.StackTrace}");
} }
finally finally
{ {

View File

@@ -200,16 +200,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer
private async Task<ConnectionCompleteParams> Connect(ConnectParams connectParams) private async Task<ConnectionCompleteParams> Connect(ConnectParams connectParams)
{ {
string connectionErrorMessage = string.Empty;
try try
{ {
// open connection based on request details // open connection based on request details
ConnectionCompleteParams result = await connectionService.Connect(connectParams); ConnectionCompleteParams result = await connectionService.Connect(connectParams);
connectionErrorMessage = result != null ? result.Messages : string.Empty;
if (result != null && !string.IsNullOrEmpty(result.ConnectionId)) if (result != null && !string.IsNullOrEmpty(result.ConnectionId))
{ {
return result; return result;
} }
else else
{ {
Logger.Write(LogLevel.Warning, $"Connection Failed for OE. connection error: {connectionErrorMessage}");
await serviceHost.SendEvent(ConnectionCompleteNotification.Type, result); await serviceHost.SendEvent(ConnectionCompleteNotification.Type, result);
return null; return null;
} }
@@ -217,6 +220,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer
} }
catch (Exception ex) catch (Exception ex)
{ {
Logger.Write(LogLevel.Warning, $"Connection Failed for OE. connection error:{connectionErrorMessage} error: {ex.Message}");
// Send a connection failed error message in this case. // Send a connection failed error message in this case.
ConnectionCompleteParams result = new ConnectionCompleteParams() ConnectionCompleteParams result = new ConnectionCompleteParams()
{ {

View File

@@ -15,7 +15,12 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{ {
public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext) public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext)
{ {
return ParameterCustomeNodeHelper.CalculateCustomLabel(smoObject, smoContext); return ParameterCustomeNodeHelper.GetCustomLabel(smoObject, smoContext);
}
public override string GetNodeSubType(object context)
{
return ParameterCustomeNodeHelper.GetSubType(context);
} }
} }
@@ -26,7 +31,11 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{ {
public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext) public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext)
{ {
return ParameterCustomeNodeHelper.CalculateCustomLabel(smoObject, smoContext); return ParameterCustomeNodeHelper.GetCustomLabel(smoObject, smoContext);
}
public override string GetNodeSubType(object context)
{
return ParameterCustomeNodeHelper.GetSubType(context);
} }
} }
@@ -37,7 +46,11 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{ {
public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext) public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext)
{ {
return ParameterCustomeNodeHelper.CalculateCustomLabel(smoObject, smoContext); return ParameterCustomeNodeHelper.GetCustomLabel(smoObject, smoContext);
}
public override string GetNodeSubType(object context)
{
return ParameterCustomeNodeHelper.GetSubType(context);
} }
} }
@@ -48,19 +61,39 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{ {
public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext) public override string GetNodeCustomName(object smoObject, SmoQueryContext smoContext)
{ {
return ParameterCustomeNodeHelper.CalculateCustomLabel(smoObject, smoContext); return ParameterCustomeNodeHelper.GetCustomLabel(smoObject, smoContext);
}
public override string GetNodeSubType(object context)
{
return ParameterCustomeNodeHelper.GetSubType(context);
} }
} }
static class ParameterCustomeNodeHelper static class ParameterCustomeNodeHelper
{ {
internal static string GetSubType(object context)
internal static string CalculateCustomLabel(object context, SmoQueryContext smoContext)
{ {
Parameter parameter = context as Parameter; Parameter parameter = context as Parameter;
if (parameter != null) if (parameter != null)
{ {
return ParameterCustomeNodeHelper.GetParameterCustomLabel(parameter); StoredProcedureParameter stordProcedureParameter = parameter as StoredProcedureParameter;
if (stordProcedureParameter != null && stordProcedureParameter.IsOutputParameter)
{
return "Output";
}
return "Input";
//TODO return parameters
}
return string.Empty;
}
internal static string GetCustomLabel(object context, SmoQueryContext smoContext)
{
Parameter parameter = context as Parameter;
if (parameter != null)
{
return GetParameterCustomLabel(parameter);
} }
return string.Empty; return string.Empty;

View File

@@ -17,7 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
Table table = smoObject as Table; Table table = smoObject as Table;
if (table != null && table.IsSystemVersioned) if (table != null && table.IsSystemVersioned)
{ {
return $"{table.Name} ({SR.SystemVersioned_LabelPart})"; return $"{table.Schema}.{table.Name} ({SR.SystemVersioned_LabelPart})";
} }
return string.Empty; return string.Empty;
@@ -34,21 +34,10 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
Table table = smoObject as Table; Table table = smoObject as Table;
if (table != null) if (table != null)
{ {
return $"{table.Name} ({SR.History_LabelPart})"; return $"{table.Schema}.{table.Name} ({SR.History_LabelPart})";
} }
return string.Empty; return string.Empty;
} }
public override string GetNodeSubType(object context)
{
Table table = context as Table;
if (table != null)
{
return "History";
}
return string.Empty;
}
} }
} }

View File

@@ -307,10 +307,10 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.ObjectExplorer
var children = await _service.ExpandNode(session, node.NodePath); var children = await _service.ExpandNode(session, node.NodePath);
foreach (var child in children) foreach (var child in children)
{ {
//VerifyMetadata(child); VerifyMetadata(child);
if (stringBuilder != null && child.NodeType != "Folder" && child.NodeType != "FileGroupFile") if (stringBuilder != null && child.NodeType != "Folder" && child.NodeType != "FileGroupFile")
{ {
stringBuilder.AppendLine($"NodeType: {child.NodeType} Label: {child.Label}"); stringBuilder.AppendLine($"NodeType: {child.NodeType} Label: {child.Label} SubType:{child.NodeSubType} Status:{child.NodeStatus}");
} }
if (!verifySystemObjects && (child.Label == SR.SchemaHierarchy_SystemStoredProcedures || if (!verifySystemObjects && (child.Label == SR.SchemaHierarchy_SystemStoredProcedures ||
child.Label == SR.SchemaHierarchy_SystemViews || child.Label == SR.SchemaHierarchy_SystemViews ||
@@ -368,11 +368,11 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.ObjectExplorer
{ {
if (!string.IsNullOrEmpty(node.Metadata.Schema)) if (!string.IsNullOrEmpty(node.Metadata.Schema))
{ {
Assert.Equal($"{node.Metadata.Schema}.{node.Metadata.Name}", node.Label); Assert.True(node.Label.Contains($"{node.Metadata.Schema}.{node.Metadata.Name}"));
} }
else else
{ {
Assert.Equal(node.Metadata.Name, node.Label); Assert.NotNull(node.Label);
} }
} }
} }

View File

@@ -1,152 +1,157 @@
NodeType: Table Label: dbo.tableWithColumnset NodeType: Table Label: dbo.tableWithColumnset SubType: Status:
NodeType: Column Label: i (int, null) NodeType: Column Label: i (int, null) SubType: Status:
NodeType: Column Label: cs (Column Set, null) NodeType: Column Label: cs (Column Set, null) SubType: Status:
NodeType: Table Label: Employee_Temporal (System-Versioned) NodeType: Table Label: HumanResources.Employee SubType: Status:
NodeType: Column Label: BusinessEntityID (PK, int, not null) NodeType: Column Label: BusinessEntityID (PK, FK, int, not null) SubType: Status:
NodeType: Column Label: NationalIDNumber (nvarchar(15), not null) NodeType: Column Label: NationalIDNumber (nvarchar(15), not null) SubType: Status:
NodeType: Column Label: LoginID (nvarchar(256), not null) NodeType: Column Label: LoginID (nvarchar(256), not null) SubType: Status:
NodeType: Column Label: OrganizationNode (hierarchyid, null) NodeType: Column Label: OrganizationNode (hierarchyid, null) SubType: Status:
NodeType: Column Label: OrganizationLevel (Computed, smallint, null) NodeType: Column Label: OrganizationLevel (Computed, smallint, null) SubType: Status:
NodeType: Column Label: JobTitle (nvarchar(50), not null) NodeType: Column Label: JobTitle (nvarchar(50), not null) SubType: Status:
NodeType: Column Label: BirthDate (date, not null) NodeType: Column Label: BirthDate (date, not null) SubType: Status:
NodeType: Column Label: MaritalStatus (nchar(1), not null) NodeType: Column Label: MaritalStatus (nchar(1), not null) SubType: Status:
NodeType: Column Label: Gender (nchar(1), not null) NodeType: Column Label: Gender (nchar(1), not null) SubType: Status:
NodeType: Column Label: HireDate (date, not null) NodeType: Column Label: HireDate (date, not null) SubType: Status:
NodeType: Column Label: VacationHours (smallint, not null) NodeType: Column Label: SalariedFlag (Flag(bit), not null) SubType: Status:
NodeType: Column Label: SickLeaveHours (smallint, not null) NodeType: Column Label: VacationHours (smallint, not null) SubType: Status:
NodeType: Column Label: ValidFrom (datetime2, not null) NodeType: Column Label: SickLeaveHours (smallint, not null) SubType: Status:
NodeType: Column Label: ValidTo (datetime2, not null) NodeType: Column Label: CurrentFlag (Flag(bit), not null) SubType: Status:
NodeType: Key Label: PK_Employee_History_BusinessEntityID NodeType: Column Label: rowguid (uniqueidentifier, not null) SubType: Status:
NodeType: Statistic Label: PK_Employee_History_BusinessEntityID NodeType: Column Label: ModifiedDate (datetime, not null) SubType: Status:
NodeType: HistoryTable Label: Employee_Temporal_History (History) NodeType: Key Label: FK_Employee_Person_BusinessEntityID SubType:ForeignKey Status:
NodeType: Column Label: BusinessEntityID (int, not null) NodeType: Key Label: PK_Employee_BusinessEntityID SubType:PrimaryKey Status:
NodeType: Column Label: NationalIDNumber (nvarchar(15), not null) NodeType: Constraint Label: CK_Employee_BirthDate SubType: Status:
NodeType: Column Label: LoginID (nvarchar(256), not null) NodeType: Constraint Label: CK_Employee_Gender SubType: Status:
NodeType: Column Label: OrganizationNode (hierarchyid, null) NodeType: Constraint Label: CK_Employee_HireDate SubType: Status:
NodeType: Column Label: OrganizationLevel (smallint, null) NodeType: Constraint Label: CK_Employee_MaritalStatus SubType: Status:
NodeType: Column Label: JobTitle (nvarchar(50), not null) NodeType: Constraint Label: CK_Employee_SickLeaveHours SubType: Status:
NodeType: Column Label: BirthDate (date, not null) NodeType: Constraint Label: CK_Employee_VacationHours SubType: Status:
NodeType: Column Label: MaritalStatus (nchar(1), not null) NodeType: Index Label: NonClusteredIndex-Login (Non-Unique, Non-Clustered) SubType: Status:
NodeType: Column Label: Gender (nchar(1), not null) NodeType: Statistic Label: NonClusteredIndex-Login SubType: Status:
NodeType: Column Label: HireDate (date, not null) NodeType: Statistic Label: PK_Employee_BusinessEntityID SubType: Status:
NodeType: Column Label: VacationHours (smallint, not null) NodeType: Table Label: HumanResources.Employee_Temporal (System-Versioned) SubType: Status:
NodeType: Column Label: SickLeaveHours (smallint, not null) NodeType: Column Label: BusinessEntityID (PK, int, not null) SubType: Status:
NodeType: Column Label: ValidFrom (datetime2, not null) NodeType: Column Label: NationalIDNumber (nvarchar(15), not null) SubType: Status:
NodeType: Column Label: ValidTo (datetime2, not null) NodeType: Column Label: LoginID (nvarchar(256), not null) SubType: Status:
NodeType: Table Label: HumanResources.Employee NodeType: Column Label: OrganizationNode (hierarchyid, null) SubType: Status:
NodeType: Column Label: BusinessEntityID (PK, FK, int, not null) NodeType: Column Label: OrganizationLevel (Computed, smallint, null) SubType: Status:
NodeType: Column Label: NationalIDNumber (nvarchar(15), not null) NodeType: Column Label: JobTitle (nvarchar(50), not null) SubType: Status:
NodeType: Column Label: LoginID (nvarchar(256), not null) NodeType: Column Label: BirthDate (date, not null) SubType: Status:
NodeType: Column Label: OrganizationNode (hierarchyid, null) NodeType: Column Label: MaritalStatus (nchar(1), not null) SubType: Status:
NodeType: Column Label: OrganizationLevel (Computed, smallint, null) NodeType: Column Label: Gender (nchar(1), not null) SubType: Status:
NodeType: Column Label: JobTitle (nvarchar(50), not null) NodeType: Column Label: HireDate (date, not null) SubType: Status:
NodeType: Column Label: BirthDate (date, not null) NodeType: Column Label: VacationHours (smallint, not null) SubType: Status:
NodeType: Column Label: MaritalStatus (nchar(1), not null) NodeType: Column Label: SickLeaveHours (smallint, not null) SubType: Status:
NodeType: Column Label: Gender (nchar(1), not null) NodeType: Column Label: ValidFrom (datetime2, not null) SubType: Status:
NodeType: Column Label: HireDate (date, not null) NodeType: Column Label: ValidTo (datetime2, not null) SubType: Status:
NodeType: Column Label: SalariedFlag (Flag(bit), not null) NodeType: Key Label: PK_Employee_History_BusinessEntityID SubType:PrimaryKey Status:
NodeType: Column Label: VacationHours (smallint, not null) NodeType: Statistic Label: PK_Employee_History_BusinessEntityID SubType: Status:
NodeType: Column Label: SickLeaveHours (smallint, not null) NodeType: HistoryTable Label: HumanResources.Employee_Temporal_History (History) SubType: Status:
NodeType: Column Label: CurrentFlag (Flag(bit), not null) NodeType: Column Label: BusinessEntityID (int, not null) SubType: Status:
NodeType: Column Label: rowguid (uniqueidentifier, not null) NodeType: Column Label: NationalIDNumber (nvarchar(15), not null) SubType: Status:
NodeType: Column Label: ModifiedDate (datetime, not null) NodeType: Column Label: LoginID (nvarchar(256), not null) SubType: Status:
NodeType: Key Label: FK_Employee_Person_BusinessEntityID NodeType: Column Label: OrganizationNode (hierarchyid, null) SubType: Status:
NodeType: Key Label: PK_Employee_BusinessEntityID NodeType: Column Label: OrganizationLevel (smallint, null) SubType: Status:
NodeType: Constraint Label: CK_Employee_BirthDate NodeType: Column Label: JobTitle (nvarchar(50), not null) SubType: Status:
NodeType: Constraint Label: CK_Employee_Gender NodeType: Column Label: BirthDate (date, not null) SubType: Status:
NodeType: Constraint Label: CK_Employee_HireDate NodeType: Column Label: MaritalStatus (nchar(1), not null) SubType: Status:
NodeType: Constraint Label: CK_Employee_MaritalStatus NodeType: Column Label: Gender (nchar(1), not null) SubType: Status:
NodeType: Constraint Label: CK_Employee_SickLeaveHours NodeType: Column Label: HireDate (date, not null) SubType: Status:
NodeType: Constraint Label: CK_Employee_VacationHours NodeType: Column Label: VacationHours (smallint, not null) SubType: Status:
NodeType: Index Label: NonClusteredIndex-Login (Non-Unique, Non-Clustered) NodeType: Column Label: SickLeaveHours (smallint, not null) SubType: Status:
NodeType: Statistic Label: NonClusteredIndex-Login NodeType: Column Label: ValidFrom (datetime2, not null) SubType: Status:
NodeType: Statistic Label: PK_Employee_BusinessEntityID NodeType: Column Label: ValidTo (datetime2, not null) SubType: Status:
NodeType: Table Label: Person.Person NodeType: Table Label: Person.Person SubType: Status:
NodeType: Column Label: BusinessEntityID (PK, int, not null) NodeType: Column Label: BusinessEntityID (PK, int, not null) SubType: Status:
NodeType: Column Label: PersonType (nchar(2), not null) NodeType: Column Label: PersonType (nchar(2), not null) SubType: Status:
NodeType: Column Label: NameStyle (NameStyle(bit), not null) NodeType: Column Label: NameStyle (NameStyle(bit), not null) SubType: Status:
NodeType: Column Label: Title (nvarchar(8), null) NodeType: Column Label: Title (nvarchar(8), null) SubType: Status:
NodeType: Column Label: FirstName (Name(nvarchar), not null) NodeType: Column Label: FirstName (Name(nvarchar), not null) SubType: Status:
NodeType: Column Label: MiddleName (Name(nvarchar), null) NodeType: Column Label: MiddleName (Name(nvarchar), null) SubType: Status:
NodeType: Column Label: LastName (Name(nvarchar), not null) NodeType: Column Label: LastName (Name(nvarchar), not null) SubType: Status:
NodeType: Column Label: Suffix (nvarchar(10), null) NodeType: Column Label: Suffix (nvarchar(10), null) SubType: Status:
NodeType: Column Label: EmailPromotion (int, not null) NodeType: Column Label: EmailPromotion (int, not null) SubType: Status:
NodeType: Column Label: AdditionalContactInfo (AdditionalContactInfoSchemaCollection, null) NodeType: Column Label: AdditionalContactInfo (AdditionalContactInfoSchemaCollection, null) SubType: Status:
NodeType: Column Label: rowguid (uniqueidentifier, not null) NodeType: Column Label: rowguid (uniqueidentifier, not null) SubType: Status:
NodeType: Column Label: ModifiedDate (datetime, not null) NodeType: Column Label: ModifiedDate (datetime, not null) SubType: Status:
NodeType: Key Label: PK_Person_BusinessEntityID NodeType: Key Label: PK_Person_BusinessEntityID SubType:PrimaryKey Status:
NodeType: Constraint Label: CK_Person_EmailPromotion NodeType: Constraint Label: CK_Person_EmailPromotion SubType: Status:
NodeType: Constraint Label: CK_Person_PersonType NodeType: Constraint Label: CK_Person_PersonType SubType: Status:
NodeType: Trigger Label: TableTrigger NodeType: Trigger Label: TableTrigger SubType: Status:
NodeType: Statistic Label: PK_Person_BusinessEntityID NodeType: Statistic Label: PK_Person_BusinessEntityID SubType: Status:
NodeType: View Label: HumanResources.vEmployee NodeType: View Label: HumanResources.vEmployee SubType: Status:
NodeType: Column Label: BusinessEntityID (int, not null) NodeType: Column Label: BusinessEntityID (int, not null) SubType: Status:
NodeType: Column Label: Title (nvarchar(8), null) NodeType: Column Label: Title (nvarchar(8), null) SubType: Status:
NodeType: Column Label: FirstName (Name(nvarchar), not null) NodeType: Column Label: FirstName (Name(nvarchar), not null) SubType: Status:
NodeType: Column Label: MiddleName (Name(nvarchar), null) NodeType: Column Label: MiddleName (Name(nvarchar), null) SubType: Status:
NodeType: Column Label: LastName (Name(nvarchar), not null) NodeType: Column Label: LastName (Name(nvarchar), not null) SubType: Status:
NodeType: Column Label: Suffix (nvarchar(10), null) NodeType: Column Label: Suffix (nvarchar(10), null) SubType: Status:
NodeType: Column Label: JobTitle (nvarchar(50), not null) NodeType: Column Label: JobTitle (nvarchar(50), not null) SubType: Status:
NodeType: Column Label: AdditionalContactInfo (AdditionalContactInfoSchemaCollection, null) NodeType: Column Label: AdditionalContactInfo (AdditionalContactInfoSchemaCollection, null) SubType: Status:
NodeType: Synonym Label: dbo.MyProduct NodeType: Synonym Label: dbo.MyProduct SubType: Status:
NodeType: StoredProcedure Label: HumanResources.sp_GetEmployee_Person_Info_AsOf NodeType: StoredProcedure Label: dbo.uspGetList SubType: Status:
NodeType: StoredProcedureParameter Label: @asOf (datetime2, Input, Default) NodeType: StoredProcedureParameter Label: @Product (varchar, Input, No default) SubType:Input Status:
NodeType: TableValuedFunction Label: dbo.ufnGetContactInformation NodeType: StoredProcedureParameter Label: @MaxPrice (money, Input, No default) SubType:Input Status:
NodeType: TableValuedFunctionParameter Label: @PersonID (int, Input, No default) NodeType: StoredProcedureParameter Label: @ComparePrice (money, Input/Output, No default) SubType:Output Status:
NodeType: ScalarValuedFunction Label: dbo.fun1 NodeType: StoredProcedureParameter Label: @ListPrice (money, Input/Output, No default) SubType:Output Status:
NodeType: ScalarValuedFunction Label: dbo.ufnGetInventoryStock NodeType: StoredProcedure Label: HumanResources.sp_GetEmployee_Person_Info_AsOf SubType: Status:
NodeType: ScalarValuedFunctionParameter Label: @ProductID (int, Input, No default) NodeType: StoredProcedureParameter Label: @asOf (datetime2, Input, Default) SubType:Input Status:
NodeType: DatabaseTrigger Label: Trigger_2 NodeType: TableValuedFunction Label: dbo.ufnGetContactInformation SubType: Status:
NodeType: Assembly Label: Microsoft.SqlServer.Types NodeType: TableValuedFunctionParameter Label: @PersonID (int, Input, No default) SubType:Input Status:
NodeType: UserDefinedDataType Label: dbo.AccountNumber NodeType: ScalarValuedFunction Label: dbo.fun1 SubType: Status:
NodeType: UserDefinedDataType Label: dbo.Flag NodeType: ScalarValuedFunction Label: dbo.ufnGetInventoryStock SubType: Status:
NodeType: UserDefinedDataType Label: dbo.Name NodeType: ScalarValuedFunctionParameter Label: @ProductID (int, Input, No default) SubType:Input Status:
NodeType: UserDefinedDataType Label: dbo.NameStyle NodeType: DatabaseTrigger Label: Trigger_2 SubType: Status:
NodeType: UserDefinedDataType Label: dbo.OrderNumber NodeType: Assembly Label: Microsoft.SqlServer.Types SubType: Status:
NodeType: UserDefinedDataType Label: dbo.Phone NodeType: UserDefinedDataType Label: dbo.AccountNumber SubType: Status:
NodeType: UserDefinedTableType Label: Demo.SalesOrderDetailType_inmem NodeType: UserDefinedDataType Label: dbo.Flag SubType: Status:
NodeType: UserDefinedTableTypeColumn Label: OrderQty (smallint, not null) NodeType: UserDefinedDataType Label: dbo.Name SubType: Status:
NodeType: UserDefinedTableTypeColumn Label: ProductID (int, not null) NodeType: UserDefinedDataType Label: dbo.NameStyle SubType: Status:
NodeType: UserDefinedTableTypeColumn Label: SpecialOfferID (int, not null) NodeType: UserDefinedDataType Label: dbo.OrderNumber SubType: Status:
NodeType: UserDefinedTableType Label: Demo.SalesOrderDetailType_ondisk NodeType: UserDefinedDataType Label: dbo.Phone SubType: Status:
NodeType: UserDefinedTableTypeColumn Label: OrderQty (smallint, not null) NodeType: UserDefinedTableType Label: Demo.SalesOrderDetailType_inmem SubType: Status:
NodeType: UserDefinedTableTypeColumn Label: ProductID (int, not null) NodeType: UserDefinedTableTypeColumn Label: OrderQty (smallint, not null) SubType: Status:
NodeType: UserDefinedTableTypeColumn Label: SpecialOfferID (int, not null) NodeType: UserDefinedTableTypeColumn Label: ProductID (int, not null) SubType: Status:
NodeType: XmlSchemaCollection Label: Person.AdditionalContactInfoSchemaCollection NodeType: UserDefinedTableTypeColumn Label: SpecialOfferID (int, not null) SubType: Status:
NodeType: Sequence Label: Demo.ID_Seq NodeType: UserDefinedTableType Label: Demo.SalesOrderDetailType_ondisk SubType: Status:
NodeType: FileGroup Label: PRIMARY NodeType: UserDefinedTableTypeColumn Label: OrderQty (smallint, not null) SubType: Status:
NodeType: FullTextCatalog Label: AW2014FullTextCatalog NodeType: UserDefinedTableTypeColumn Label: ProductID (int, not null) SubType: Status:
NodeType: User Label: amy0 NodeType: UserDefinedTableTypeColumn Label: SpecialOfferID (int, not null) SubType: Status:
NodeType: User Label: dbo NodeType: XmlSchemaCollection Label: Person.AdditionalContactInfoSchemaCollection SubType: Status:
NodeType: User Label: guest NodeType: Sequence Label: Demo.ID_Seq SubType: Status:
NodeType: User Label: INFORMATION_SCHEMA NodeType: FileGroup Label: PRIMARY SubType: Status:
NodeType: User Label: sys NodeType: FullTextCatalog Label: AW2014FullTextCatalog SubType: Status:
NodeType: DatabaseRole Label: db_accessadmin NodeType: User Label: amy0 SubType: Status:
NodeType: DatabaseRole Label: db_backupoperator NodeType: User Label: dbo SubType: Status:
NodeType: DatabaseRole Label: db_datareader NodeType: User Label: guest SubType: Status:
NodeType: DatabaseRole Label: db_datawriter NodeType: User Label: INFORMATION_SCHEMA SubType: Status:
NodeType: DatabaseRole Label: db_ddladmin NodeType: User Label: sys SubType: Status:
NodeType: DatabaseRole Label: db_denydatareader NodeType: DatabaseRole Label: db_accessadmin SubType: Status:
NodeType: DatabaseRole Label: db_denydatawriter NodeType: DatabaseRole Label: db_backupoperator SubType: Status:
NodeType: DatabaseRole Label: db_owner NodeType: DatabaseRole Label: db_datareader SubType: Status:
NodeType: DatabaseRole Label: db_securityadmin NodeType: DatabaseRole Label: db_datawriter SubType: Status:
NodeType: DatabaseRole Label: public NodeType: DatabaseRole Label: db_ddladmin SubType: Status:
NodeType: DatabaseRole Label: SalesManagers NodeType: DatabaseRole Label: db_denydatareader SubType: Status:
NodeType: DatabaseRole Label: SalesPersons NodeType: DatabaseRole Label: db_denydatawriter SubType: Status:
NodeType: Schema Label: dbo NodeType: DatabaseRole Label: db_owner SubType: Status:
NodeType: Schema Label: db_accessadmin NodeType: DatabaseRole Label: db_securityadmin SubType: Status:
NodeType: Schema Label: db_backupoperator NodeType: DatabaseRole Label: public SubType: Status:
NodeType: Schema Label: db_datareader NodeType: DatabaseRole Label: SalesManagers SubType: Status:
NodeType: Schema Label: db_datawriter NodeType: DatabaseRole Label: SalesPersons SubType: Status:
NodeType: Schema Label: db_ddladmin NodeType: Schema Label: dbo SubType: Status:
NodeType: Schema Label: db_denydatareader NodeType: Schema Label: db_accessadmin SubType: Status:
NodeType: Schema Label: db_denydatawriter NodeType: Schema Label: db_backupoperator SubType: Status:
NodeType: Schema Label: db_owner NodeType: Schema Label: db_datareader SubType: Status:
NodeType: Schema Label: db_securityadmin NodeType: Schema Label: db_datawriter SubType: Status:
NodeType: Schema Label: Demo NodeType: Schema Label: db_ddladmin SubType: Status:
NodeType: Schema Label: guest NodeType: Schema Label: db_denydatareader SubType: Status:
NodeType: Schema Label: HumanResources NodeType: Schema Label: db_denydatawriter SubType: Status:
NodeType: Schema Label: INFORMATION_SCHEMA NodeType: Schema Label: db_owner SubType: Status:
NodeType: Schema Label: Person NodeType: Schema Label: db_securityadmin SubType: Status:
NodeType: Schema Label: sys NodeType: Schema Label: Demo SubType: Status:
NodeType: DatabaseEncryptionKey Label: NodeType: Schema Label: guest SubType: Status:
NodeType: Schema Label: HumanResources SubType: Status:
NodeType: Schema Label: INFORMATION_SCHEMA SubType: Status:
NodeType: Schema Label: Person SubType: Status:
NodeType: Schema Label: sys SubType: Status:
NodeType: DatabaseEncryptionKey Label: SubType: Status:

View File

@@ -391,4 +391,17 @@
GO GO
/****** Column Set ***/ /****** Column Set ***/
CREATE TABLE tableWithColumnset (i int SPARSE, cs xml column_set FOR ALL_SPARSE_COLUMNS); CREATE TABLE tableWithColumnset (i int SPARSE, cs xml column_set FOR ALL_SPARSE_COLUMNS);
GO
/****** Procedure With output parameter ***/
CREATE PROCEDURE uspGetList @Product varchar(40)
, @MaxPrice money
, @ComparePrice money OUTPUT
, @ListPrice money OUT
AS
select 1
-- Populate the output variable @compareprice.
SET @ComparePrice = @MaxPrice;
GO