Partager via


IVsDataObjectIdentifierResolver Interface

Represents the interface that exposes methods for expanding and contracting an identifier for a specified data object.

Namespace:  Microsoft.VisualStudio.Data.Services.SupportEntities
Assembly:  Microsoft.VisualStudio.Data.Services (in Microsoft.VisualStudio.Data.Services.dll)

Syntax

'Déclaration
<DataClientObjectAttribute("A4810A0C-49B2-4260-9D81-2D2EBA25AA3F")> _
<DataDefaultObjectAttribute("AC97DC0A-C7E1-4532-AFBF-C80A122D6533")> _
Public Interface IVsDataObjectIdentifierResolver
[DataClientObjectAttribute("A4810A0C-49B2-4260-9D81-2D2EBA25AA3F")]
[DataDefaultObjectAttribute("AC97DC0A-C7E1-4532-AFBF-C80A122D6533")]
public interface IVsDataObjectIdentifierResolver
[DataClientObjectAttribute(L"A4810A0C-49B2-4260-9D81-2D2EBA25AA3F")]
[DataDefaultObjectAttribute(L"AC97DC0A-C7E1-4532-AFBF-C80A122D6533")]
public interface class IVsDataObjectIdentifierResolver
[<DataClientObjectAttribute("A4810A0C-49B2-4260-9D81-2D2EBA25AA3F")>]
[<DataDefaultObjectAttribute("AC97DC0A-C7E1-4532-AFBF-C80A122D6533")>]
type IVsDataObjectIdentifierResolver =  interface end
public interface IVsDataObjectIdentifierResolver

The IVsDataObjectIdentifierResolver type exposes the following members.

Methods

  Name Description
Public method ContractIdentifier When implemented by a class, contracts an identifier for a data object with the specified type and complete identifier.
Public method ExpandIdentifier When implemented by a class, expands an identifier for a data object with the specified type and partial identifier.

Top

Remarks

Typically, the identifier of an object on a data source consists of an identifying string that gets passed into commands. For example, in the SQL statement SELECT * FROM mytable, the string "mytable" is a unique identifier of a data object in the context under which the statement is running.

Most often, a data source has a containment mechanism for objects, such as a catalog, schema, or package. However, such containment mechanisms introduce the need for multi-part identifiers because a single name no longer suffices for uniquely identifying objects. For example, Oracle differs from SQL Server in grouping objects under different users, requiring that unique identifiers for data objects be qualified with user names.

However, a data source typically has a context that is applied to a given connection; this context normally depends on the user, or on which part of the system is being used. This context often eliminates the need to fully qualify all identifiers. For example, to identify a table object on an Oracle server, the full qualification requires both a user name and a table name; however, the Oracle context is such that a certain user is always the default. Thus, if a table is identified only by its name, the default user is assumed.

The DataObjectIdentifierResolver class provides a way to translate between the fully qualified form of an identifier (its expanded form) and its minimal form, which uses only those identifier parts that are absolutely required to uniquely identify the object (its contracted form).

Because a translation from one form to another may require information about the identifier's context from the data source, there are potential performance problems if expansion and contraction are heavily required by a consumer. For this reason, this class provides a simple method of caching expansions and resolutions for specific inputs that can be used if performance becomes a problem.

This interface has a base implementation in the DDEX Framework.

See Also

Reference

Microsoft.VisualStudio.Data.Services.SupportEntities Namespace