TSqlModel.GetObjects Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetObjects(DacQueryScopes, ModelTypeClass[]) |
Returns all TSqlObjects matching the list of |
GetObjects(String, ModelTypeClass[]) |
Returns all TSqlObjects in a given |
GetObjects(ModelTypeClass, ObjectIdentifier, DacQueryScopes) |
Returns all TSqlObjects that match the ModelTypeClass and ObjectIdentifier.
Only top level ModelTypeClass types are supported by this method - the |
GetObjects(DacQueryScopes, ModelTypeClass[])
Returns all TSqlObjects matching the list of typeFilters
.
Only top level ModelTypeClass types are supported by this method - all types in the
typeFilters
parameter
must be present in the TopLevelTypes or the call will fail.
public System.Collections.Generic.IEnumerable<Microsoft.SqlServer.Dac.Model.TSqlObject> GetObjects (Microsoft.SqlServer.Dac.Model.DacQueryScopes queryScopes, params Microsoft.SqlServer.Dac.Model.ModelTypeClass[] typeFilters);
member this.GetObjects : Microsoft.SqlServer.Dac.Model.DacQueryScopes * Microsoft.SqlServer.Dac.Model.ModelTypeClass[] -> seq<Microsoft.SqlServer.Dac.Model.TSqlObject>
Public Function GetObjects (queryScopes As DacQueryScopes, ParamArray typeFilters As ModelTypeClass()) As IEnumerable(Of TSqlObject)
Parameters
- queryScopes
- DacQueryScopes
Scope filter for queried objects. Must be in the list of ModelTypeClass types returned from the TopLevelTypes method or the call will fail.
- typeFilters
- ModelTypeClass[]
List of ModelTypeClasss to return.
Returns
All TSqlObjects that match typeFilters
.
Exceptions
If any of the types in the typeFilters
parameter are not a top level type.
If communication with the Microsoft.SqlServer.Dac.Model.TSqlObjectService fails.
Remarks
If no typeFilters
are supplied all TSqlObjects are returned.
Applies to
GetObjects(String, ModelTypeClass[])
Returns all TSqlObjects in a given sourceName
document filtered by ModelTypeClasss
specified by the typeFilters
parameter.
public System.Collections.Generic.IEnumerable<Microsoft.SqlServer.Dac.Model.TSqlObject> GetObjects (string sourceName, params Microsoft.SqlServer.Dac.Model.ModelTypeClass[] typeFilters);
member this.GetObjects : string * Microsoft.SqlServer.Dac.Model.ModelTypeClass[] -> seq<Microsoft.SqlServer.Dac.Model.TSqlObject>
Public Function GetObjects (sourceName As String, ParamArray typeFilters As ModelTypeClass()) As IEnumerable(Of TSqlObject)
Parameters
- sourceName
- String
Name of the source document
- typeFilters
- ModelTypeClass[]
Array of ModelTypeClass that the resulting TSqlObject should be filtered on.
Returns
List of TSqlObjects
Exceptions
If communication with the Microsoft.SqlServer.Dac.Model.TSqlObjectService fails.
Remarks
If no typeFilters
are supplied all ModelTypeClasss are returned.
Applies to
GetObjects(ModelTypeClass, ObjectIdentifier, DacQueryScopes)
Returns all TSqlObjects that match the ModelTypeClass and ObjectIdentifier.
Only top level ModelTypeClass types are supported by this method - the objectType
parameter
must be in the types returned from the TopLevelTypes method or the call will fail.
public System.Collections.Generic.IEnumerable<Microsoft.SqlServer.Dac.Model.TSqlObject> GetObjects (Microsoft.SqlServer.Dac.Model.ModelTypeClass objectType, Microsoft.SqlServer.Dac.Model.ObjectIdentifier id, Microsoft.SqlServer.Dac.Model.DacQueryScopes queryScopes);
member this.GetObjects : Microsoft.SqlServer.Dac.Model.ModelTypeClass * Microsoft.SqlServer.Dac.Model.ObjectIdentifier * Microsoft.SqlServer.Dac.Model.DacQueryScopes -> seq<Microsoft.SqlServer.Dac.Model.TSqlObject>
Public Function GetObjects (objectType As ModelTypeClass, id As ObjectIdentifier, queryScopes As DacQueryScopes) As IEnumerable(Of TSqlObject)
Parameters
- objectType
- ModelTypeClass
Type Filter. Must be in the list of ModelTypeClass types returned from the TopLevelTypes method or the call will fail.
Identity of the TSqlObjects to return.
- queryScopes
- DacQueryScopes
Scope filter for queried objects.
Returns
All TSqlObjects that match the objectType
and id
.
Exceptions
If the objectType
is not a top level type.
If the supplied objectType
is null.
If communication with the Microsoft.SqlServer.Dac.Model.TSqlObjectService fails.