TSqlObject Class

 

Updated: April 20, 2017

Represents an instance of an object for a SQL Server database schema.

Namespace:   Microsoft.SqlServer.Dac.Model
Assembly:  Microsoft.SqlServer.Dac.Extensions (in Microsoft.SqlServer.Dac.Extensions.dll)

System.Object
  Microsoft.SqlServer.Dac.Model.TSqlObject

public sealed class TSqlObject

NameDescription
System_CAPS_pubpropertyItem[ModelPropertyClass]

Gets the property value.

System_CAPS_pubpropertyName

Gets the identity of the object.

System_CAPS_pubpropertyObjectType

Gets the type of the object.

NameDescription
System_CAPS_pubmethodEquals(Object)

Checks if this TSqlObject is equal to another TSqlObject.(Overrides Object.Equals(Object).)

System_CAPS_pubmethodGetAst()

Generates a new TSqlScript representing the AST for the TSqlObject, if this is supported for the TSqlObject. AST generation is only supported for top-level objects, with certain objects such as the DatabaseOptions and inline constraints not supporting AST generation even though they are top level types. If it's unknown whether the object is capable of being scripted then the TryGetAst method should be used instead. The generated AST is a newly generated object that defines the information about this TSqlObject and any objects that would be scripted together with it. For example a Table would also script out the Columns and inline constraint definitions of a Table. This method can be used to copy object information from one model to another, or to script out information about objects in the model.

System_CAPS_pubmethodGetChildren()

Returns all TSqlObject child objects within the Default scope.

System_CAPS_pubmethodGetChildren(DacQueryScopes)

Returns all TSqlObject child objects within the specified DacQueryScopes scope.

System_CAPS_pubmethodGetHashCode()

Gets the Hashcode for this object.(Overrides Object.GetHashCode().)

System_CAPS_pubmethodGetMetadata(ModelMetadataClass)

Returns the metadata property value.

System_CAPS_pubmethodGetMetadata<T>(ModelMetadataClass)

Returns the metadata property value.

System_CAPS_pubmethodGetParent()

Returns the parent TSqlObject, if it is within the Default scope and if there is only one TSqlObject that could be the parent for this object.

System_CAPS_pubmethodGetParent(DacQueryScopes)

Returns the parent TSqlObject, if it is within the specified DacQueryScopes scope and if there is only one TSqlObject that could be the parent for this object.

System_CAPS_pubmethodGetProperty(ModelPropertyClass)

Returns the property value.

System_CAPS_pubmethodGetProperty<T>(ModelPropertyClass)

Returns the property value.

System_CAPS_pubmethodGetReferenced()

Gets all referenced objects within the Default scope.

System_CAPS_pubmethodGetReferenced(DacQueryScopes)

Gets all referenced objects within a given DacQueryScopes scope.

System_CAPS_pubmethodGetReferenced(ModelRelationshipClass)

Gets referenced objects for a given ModelRelationshipClass, where objects are within the Default scope.

System_CAPS_pubmethodGetReferenced(ModelRelationshipClass, DacQueryScopes)

Gets referenced objects for a given ModelRelationshipClass, where objects are within a given DacQueryScopes scope.

System_CAPS_pubmethodGetReferencedRelationshipInstances()

For each object referenced by this TSqlObject, returns the ModelRelationshipInstance defining the relationship data. This will include the referenced object if it exists, the ObjectIdentifier used to identify the referenced object, and any properties specific to this relationship. Only objects within the Default scope will be returned.

System_CAPS_pubmethodGetReferencedRelationshipInstances(DacExternalQueryScopes)

For each object referenced by this TSqlObject, returns the ModelRelationshipInstance defining the relationship data. This will include the referenced object if it exists, the ObjectIdentifier used to identify the referenced object, and any properties specific to this relationship. Only objects within the specified DacQueryScopes scope will be returned. To return non-composite or system references the scope must be set to include externals. In addition, in this case only the ObjectIdentifier of the referenced object will be returned.

System_CAPS_pubmethodGetReferencedRelationshipInstances(DacQueryScopes)

For each object referenced by this TSqlObject, returns the ModelRelationshipInstance defining the relationship data. This will include the referenced object if it exists, the ObjectIdentifier used to identify the referenced object, and any properties specific to this relationship. Only objects within the specified DacQueryScopes scope will be returned. To return non-composite or system references the GetReferencedRelationshipInstances method should be called instead.

System_CAPS_pubmethodGetReferencedRelationshipInstances(ModelRelationshipClass)

For objects referenced by this TSqlObject with a specific ModelRelationshipClass, returns the ModelRelationshipInstance defining the relationship data. This will include the referenced object if it exists, the ObjectIdentifier used to identify the referenced object, and any properties specific to this relationship. Only objects within the Default scope will be returned.

System_CAPS_pubmethodGetReferencedRelationshipInstances(ModelRelationshipClass, DacExternalQueryScopes)

For objects referenced by this TSqlObject with a specific ModelRelationshipClass, returns the ModelRelationshipInstance defining the relationship data. This will include the referenced object if it exists, the ObjectIdentifier used to identify the referenced object, and any properties specific to this relationship. Only objects within the specified DacExternalQueryScopes scope will be returned. To return non-composite or system references the scope must be set to include externals. In addition, in this case only the ObjectIdentifier of the referenced object will be returned.

System_CAPS_pubmethodGetReferencedRelationshipInstances(ModelRelationshipClass, DacQueryScopes)

For objects referenced by this TSqlObject with a specific ModelRelationshipClass, returns the ModelRelationshipInstance defining the relationship data. This will include the referenced object if it exists, the ObjectIdentifier used to identify the referenced object, and any properties specific to this relationship. Only objects within the specified DacQueryScopes scope will be returned. To return non-composite or system references the GetReferencedRelationshipInstances method should be called instead.

System_CAPS_pubmethodGetReferencing()

Gets all referencing objects within the Default scope.

System_CAPS_pubmethodGetReferencing(DacQueryScopes)

Gets all referencing objects within a given DacQueryScopes scope.

System_CAPS_pubmethodGetReferencing(ModelRelationshipClass)

Gets referencing objects, where the relationship is defined by a specific ModelRelationshipClass and where objects are within the Default scope.

System_CAPS_pubmethodGetReferencing(ModelRelationshipClass, DacQueryScopes)

Gets referencing objects, where the relationship is defined by a specific ModelRelationshipClass and where objects are within a given DacQueryScopes scope.

System_CAPS_pubmethodGetReferencingRelationshipInstances()

For each object referencing this TSqlObject, returns the ModelRelationshipInstance defining the relationship data. This will include the referencing object - definedby the FromObject field, and any properties specific to this relationship. Only objects within the specified DacQueryScopes scope will be returned.

System_CAPS_pubmethodGetReferencingRelationshipInstances(DacQueryScopes)

For each object referencing this TSqlObject, returns the ModelRelationshipInstance defining the relationship data. This will include the referencing object - definedby the FromObject field, and any properties specific to this relationship. Only objects within the Default scope will be returned.

System_CAPS_pubmethodGetReferencingRelationshipInstances(ModelRelationshipClass)

For each object referencing this TSqlObject with a specific ModelRelationshipClass, returns the ModelRelationshipInstance defining the relationship data. This will include the referencing object - definedby the FromObject field, and any properties specific to this relationship. Only objects within the Default scope will be returned.

System_CAPS_pubmethodGetReferencingRelationshipInstances(ModelRelationshipClass, DacQueryScopes)

For each object referencing this TSqlObject with a specific ModelRelationshipClass, returns the ModelRelationshipInstance defining the relationship data. This will include the referencing object - definedby the FromObject field, and any properties specific to this relationship. Only objects within the specified DacQueryScopes scope will be returned.

System_CAPS_pubmethodGetScript()

Generates a CREATE script from the objects AST. AST generation is only supported for top-level objects, with certain objects such as the DatabaseOptions and inline constraints not supporting AST generation even though they are top level types. If it's unknown whether the object is capable of being scripted then the TryGetAst method should be used instead.

System_CAPS_pubmethodGetSourceInformation()

Gets the SourceInformation for this object, if this is available.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodTryGetAst(TSqlScript)

Attempts to generate an AST for the object. AST generation is only supported for top-level objects, with certain objects such as the DatabaseOptions and inline constraints not supporting AST generation even though they are top level types. The generated AST is a newly generated object that defines the information about this TSqlObject and any objects that would be scripted together with it. For example a Table would also script out the Columns and inline constraint definitions of a Table. This method can be used to copy object information from one model to another, or to script out information about objects in the model.

System_CAPS_pubmethodTryGetScript(String)

Attempts to generate a CREATE script from the objects AST. AST generation is only supported for top-level objects, with certain objects such as the DatabaseOptions and inline constraints not supporting AST generation even though they are top level types. If it's unknown whether the object is capable of being scripted then the TryGetAst method should be used instead.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top

Community Additions

ADD
Show: