Share via


SqlSchemaModel Class

The base class for schema managers for SQL Server databases.

Inheritance Hierarchy

System.Object
  Microsoft.Data.Schema.SchemaModel.ModelStore
    Microsoft.Data.Schema.SchemaModel.DataSchemaModel
      Microsoft.Data.Schema.Sql.SchemaModel.SqlSchemaModel
        Microsoft.Data.Schema.Sql.SchemaModel.Sql100SchemaModel
        Microsoft.Data.Schema.Sql.SchemaModel.Sql80SchemaModel
        Microsoft.Data.Schema.Sql.SchemaModel.Sql90SchemaModel

Namespace:  Microsoft.Data.Schema.Sql.SchemaModel
Assembly:  Microsoft.Data.Schema.Sql (in Microsoft.Data.Schema.Sql.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public MustInherit Class SqlSchemaModel _
    Inherits DataSchemaModel
[SerializableAttribute]
public abstract class SqlSchemaModel : DataSchemaModel
[SerializableAttribute]
public ref class SqlSchemaModel abstract : public DataSchemaModel
[<AbstractClass>]
[<SerializableAttribute>]
type SqlSchemaModel =  
    class
        inherit DataSchemaModel
    end
public abstract class SqlSchemaModel extends DataSchemaModel

The SqlSchemaModel type exposes the following members.

Constructors

  Name Description
Protected method SqlSchemaModel(SerializationInfo, StreamingContext) Initializes a new instance of the SqlSchemaModel class.
Protected method SqlSchemaModel(ModelCollation, ModelSchema, String, ScriptCache, ErrorManager, Boolean, SqlModelCapability) Initializes a new instance of the SqlSchemaModel class.

Top

Properties

  Name Description
Public property AnnotationsIncludedInSerialization Gets a value that indicates whether annotations are included when the model is serialized. (Overrides DataSchemaModel.AnnotationsIncludedInSerialization.)
Public property Capability Gets a value that indicates what capabilities this model has.
Public property Collation (Inherited from ModelStore.)
Public property Comparer Gets the collation comparer object. (Inherited from ModelStore.)
Protected property Controller Gets the model controller. (Inherited from DataSchemaModel.)
Public property DatabaseSchemaProvider Gets the database schema provider. (Inherited from DataSchemaModel.)
Public property ElementProcessingOperationsCount Gets the number of operations that remain before the model is resolved. (Overrides DataSchemaModel.ElementProcessingOperationsCount.)
Public property ErrorManager Gets the error manager to report errors. (Inherited from DataSchemaModel.)
Public property IsDisposing (Inherited from ModelStore.)
Public property IsOptimizedForInsert (Inherited from ModelStore.)
Public property IsOptimizedForQuery (Inherited from ModelStore.)
Public property Schema (Inherited from ModelStore.)
Public property ScriptCache Gets the script cache to cache scripts. (Inherited from DataSchemaModel.)
Public property SqlDatabaseSchemaProvider Gets the database schema provider for this model.
Protected property ValidationEnabled Gets a value that indicates whether validation is enabled for this schema model.
Public property WriteCount Returns the value of the current write count. (Inherited from ModelStore.)

Top

Methods

  Name Description
Public method AddAnnotation Adds an annotation to the model. (Inherited from ModelStore.)
Public method AddCustomData Adds custom data to the model. (Inherited from DataSchemaModel.)
Protected method AddScriptCacheForFile
Public method BeginBatchUpdate Called at the beginning of a batch update operation. (Overrides DataSchemaModel.BeginBatchUpdate().)
Protected method CleanupExternalProperty When implemented in a derived class, releases resources that are used by an external property when the element is deleted. (Inherited from ModelStore.)
Public method CreateAnnotation(Type) (Inherited from ModelStore.)
Public method CreateAnnotation(ModelAnnotationClass) Creates an annotation by using the given annotation metadata. (Inherited from ModelStore.)
Public method CreateAnnotation<TAnnotation>() (Inherited from ModelStore.)
Public method CreateElement(Type) (Inherited from ModelStore.)
Public method CreateElement(ModelElementClass) Creates an element by using the given element metadata object. (Inherited from ModelStore.)
Public method CreateElement<TElement>() (Inherited from ModelStore.)
Public method CreateElementHandle (Inherited from ModelStore.)
Protected method CreateExternalElement(Type) Creates an external element. (Inherited from ModelStore.)
Protected method CreateExternalElement(ModelElementClass) Creates an external element by using the provided element metadata object. (Inherited from ModelStore.)
Protected method CreateExternalElement<TElement>() Creates an external element of the specified type. (Inherited from ModelStore.)
Protected method CreateExternalNamedElement(Type, ModelIdentifier) Creates a named external element by using the provided type and identifier. (Inherited from ModelStore.)
Protected method CreateExternalNamedElement(ModelElementClass, ModelIdentifier) Creates a named external element by using the provided element metadata object and identifier. (Inherited from ModelStore.)
Protected method CreateExternalNamedElement<TElement>(ModelIdentifier) Creates a named external element of the specified type by using the provided element metadata object and identifier. (Inherited from ModelStore.)
Public method CreateIdentifier(ICollection<String>) Creates a unique model identifier by using the provided collection of part names. (Inherited from ModelStore.)
Public method CreateIdentifier(array<String[]) Creates a unique model identifier by using the provided array of part names. (Inherited from ModelStore.)
Public method CreateIdentifier(Boolean, ICollection<String>) Creates a unique model identifier by using the provided collection of name parts. (Inherited from ModelStore.)
Public method CreateIdentifier(Boolean, array<String[]) Creates a unique model identifier by using the provided case-sensitive indication and array of part names. (Inherited from ModelStore.)
Public method CreateIdentifier(IList<String>, ICollection<String>) Creates a unique model identifier by using the provided list of external part names, indication of case sensitivity, and collection of part names. (Inherited from ModelStore.)
Public method CreateIdentifier(IList<String>, Boolean, ICollection<String>) Creates a unique model identifier by using the provided list of external parts, indication of case sensitivity, and collection of part names. (Inherited from ModelStore.)
Public method CreateIdentifier(IList<String>, Boolean, array<String[]) Creates a unique model identifier by using the provided list of external part names, indication of case sensitivity, and array of part names. (Inherited from ModelStore.)
Public method CreateIdentifierHandle Creates a handle for the provided identifier. (Inherited from ModelStore.)
Public method CreateNamedAnnotation(Type, ModelIdentifier) Creates a named ModelAnnotation object by using the provided model identifier. (Inherited from ModelStore.)
Public method CreateNamedAnnotation(ModelAnnotationClass, ModelIdentifier) Creates a named ModelAnnotation object by using the provided annotation metadata object and identifier. (Inherited from ModelStore.)
Public method CreateNamedAnnotation<TAnnotation>(ModelIdentifier) Creates a named ModelAnnotation object by using the provided model identifier. (Inherited from ModelStore.)
Public method CreateNamedElement(Type, ModelIdentifier) (Inherited from ModelStore.)
Public method CreateNamedElement(ModelElementClass, ModelIdentifier) (Inherited from ModelStore.)
Public method CreateNamedElement<TElement>(ModelIdentifier) (Inherited from ModelStore.)
Public method DecodeIdentifier(String) Returns an identifier that corresponds to the decoded value of the provided string. (Inherited from ModelStore.)
Protected method DeserializeExternalProperty Deserializes any external properties that are supported by SqlSchemaModel. (Overrides ModelStore.DeserializeExternalProperty(XmlReader, ModelPropertyClass).)
Public method Dispose() Disposes the model. (Inherited from ModelStore.)
Protected method Dispose(Boolean) Releases resources. (Overrides DataSchemaModel.Dispose(Boolean).)
Public method EndBatchUpdate Called at the end of a batch update operation. (Overrides DataSchemaModel.EndBatchUpdate().)
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize (Inherited from ModelStore.)
Protected method FixupAfterDeserialization Performs additional actions to guarantee model consistency after deserialization from a .dbmdl file. (Overrides ModelStore.FixupAfterDeserialization().)
Protected method FixupAfterXmlDeserialization Performs additional actions to guarantee model consistency after deserialization from an XML file. (Overrides DataSchemaModel.FixupAfterXmlDeserialization().)
Public method FreeElementHandle Frees the provided element handle. (Inherited from ModelStore.)
Public method FreeIdentifierHandle Frees the provided element handle. (Inherited from ModelStore.)
Public method GetAllAnnotations() Returns a list of all annotations. (Inherited from ModelStore.)
Public method GetAllAnnotations(Type) (Inherited from ModelStore.)
Public method GetAllAnnotations(ModelIdentifier) Returns a list of all annotations that are named with the provided identifier. (Inherited from ModelStore.)
Public method GetAllAnnotations(ModelIdentifier, Type) (Inherited from ModelStore.)
Public method GetAnnotations() Returns all the annotations on the model. (Inherited from ModelStore.)
Public method GetAnnotations(Type) Returns a list of the annotations on the model that implements the given type. (Inherited from ModelStore.)
Public method GetAnnotations(ModelIdentifier) Returns a list of the annotations on the model that matches the given identifiers. (Inherited from ModelStore.)
Public method GetAnnotations(ModelIdentifier, Type) Returns all annotations that have the given identifier name, and that implement the given type. (Inherited from ModelStore.)
Public method GetCustomData() Gets a list of custom data. (Inherited from DataSchemaModel.)
Public method GetCustomData(String) Gets a list of custom data by using the provided category. (Inherited from DataSchemaModel.)
Public method GetCustomData(String, String) Gets a list of custom data by using the provided category and type name. (Inherited from DataSchemaModel.)
Public method GetElementHandleTarget Returns a model element that is identified by the provided handle. (Inherited from ModelStore.)
Public method GetElements(ModelElementResolutionStatus) Returns a list of the elements in the store that has the given resolution status. (Inherited from ModelStore.)
Public method GetElements(ModelElementValidationStatus) Returns a list of the elements in the store that has the given validation status. (Inherited from ModelStore.)
Public method GetElements(Type, ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElements(ModelElementClass, ModelElementQueryFilter) Returns elements that share the given metadata object as selected by the given filter. (Inherited from ModelStore.)
Public method GetElements(ModelElementResolutionStatus, Int32) Returns a list of the elements that aredetermined by the count that has the given resolution status. (Inherited from ModelStore.)
Public method GetElements(ModelElementValidationStatus, Int32) Returns a list of the elements that are determined by the count that has the given validation status. (Inherited from ModelStore.)
Public method GetElements(ModelIdentifier, ModelElementClass, ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElements(ModelIdentifier, ModelIdentifierGroup, ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElements(ModelIdentifier, Type, ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElements<TElement>(ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElements<TElement>(ModelIdentifier, ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElementsCount(ModelElementResolutionStatus) Returns the number of elements in the store that match the given status. (Inherited from ModelStore.)
Public method GetElementsCount(ModelElementValidationStatus) Returns the number of elements in the store that match the given status. (Inherited from ModelStore.)
Public method GetElementsFrom(String, ModelElementClass, ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElementsFrom(String, Type, ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElementsFrom<TElement>(String, ModelElementQueryFilter) (Inherited from ModelStore.)
Public method GetElementsFromExternalSource Gets the elements from an external source. (Inherited from DataSchemaModel.)
Protected method GetElementSources Returns the source information for a particular element. (Overrides DataSchemaModel.GetElementSources(IModelElement).)
Protected method GetExternalProperty<TProperty> Gets an external property of a particular class for the specified model element. (Overrides ModelStore.GetExternalProperty<TProperty>(IModelElement, ModelPropertyClass).)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetIdentifier(ICollection<String>) (Inherited from ModelStore.)
Public method GetIdentifier(array<String[]) Gets the identifier from the model by scope ID and a string. (Inherited from ModelStore.)
Public method GetIdentifier(IList<String>, ICollection<String>) (Inherited from ModelStore.)
Public method GetIdentifierHandleTarget (Inherited from ModelStore.)
Public method GetObjectData Populates a [System.Runtime.Serialization.SerializationInfo] object with the data that are required to serialize the current SqlSchemaModel object. (Overrides DataSchemaModel.GetObjectData(SerializationInfo, StreamingContext).)
Protected method GetRelationshipEntrySources Returns the source information for a particular relationship entry. (Overrides DataSchemaModel.GetRelationshipEntrySources(IModelRelationshipEntry).)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method InitializeReferenceConstructor Called to initialize the reference constructor. (Overrides DataSchemaModel.InitializeReferenceConstructor(DataSchemaModelHeader, DataSchemaModelConstructor).)
Public method IsOwnedChildObjectType Returns a value that indicates whether a type is a schema-bound child object.
Public methodStatic member IsOwnedObjectType Returns a value that indicates whether a type is a schema-bound object.
Public method LoadExternals Loads model elements from an external sources, such as a persisted model. (Inherited from DataSchemaModel.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnCustomDataAdded Override this method to handle addition of SqlModelCapability data. (Overrides DataSchemaModel.OnCustomDataAdded(CustomSchemaData).)
Protected method OnCustomDataRemoved Override this method to handle removal of extra names (from elements marked as AliasedToDbo or GloballyScoped) if a reference is removed. (Overrides DataSchemaModel.OnCustomDataRemoved(CustomSchemaData).)
Protected method OnModelElementChanged Called when a model element changes. (Inherited from DataSchemaModel.)
Public method OptimizeForInitialPopulation (Inherited from ModelStore.)
Public method OptimizeForQuery (Inherited from ModelStore.)
Public method RegisterForController Registers for a model controller. (Inherited from DataSchemaModel.)
Public method RemoveAnnotation Removes an annotation from the model. (Inherited from ModelStore.)
Public method RemoveCustomData Removes custom data. (Inherited from DataSchemaModel.)
Protected method RemoveScriptCacheForFile Removes the script cache that is associated with the specified file.
Public method Resolve() Resolves all of the elements in the model. (Overrides DataSchemaModel.Resolve().)
Public method Resolve(Int32) Resolves the specified number of elements. (Overrides DataSchemaModel.Resolve(Int32).)
Public method Serialize(TextWriter) (Inherited from DataSchemaModel.)
Public method Serialize(TextWriter, IEnumerable<Type>) (Inherited from DataSchemaModel.)
Public method Serialize(TextWriter, IEnumerable<Type>, Boolean) Writes the data schema model to the specified output. (Inherited from DataSchemaModel.)
Protected method SerializeExternalProperty Serializes any external properties that are supported by SqlSchemaModel. (Overrides ModelStore.SerializeExternalProperty(XmlWriter, ModelPropertyClass, Object).)
Protected method SetExternalProperty<TProperty>(IModelElement, ModelPropertyClass, TProperty) (Inherited from ModelStore.)
Protected method SetExternalProperty<TProperty>(IModelElement, ModelPropertyClass, TProperty) (Overrides ModelStore.SetExternalProperty<TProperty>(IModelElement, ModelPropertyClass, TProperty).)
Public method TestWriteCount Tests the write count with the given value. (Inherited from ModelStore.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method UnloadExternals Unloads external elements from the specified file. (Inherited from DataSchemaModel.)
Protected method UpdateSourceNamePrefixes (Inherited from ModelStore.)
Protected method ValidateWriteAccess Validates write access. (Inherited from DataSchemaModel.)
Protected method ValidReferenceTranslator Returns a value that indicates whether a reference translator can be used translate from another database schema provider to the current one. (Inherited from DataSchemaModel.)

Top

Events

  Name Description
Public event ModelChanged (Inherited from ModelStore.)
Public event ModelOptimizationChanged (Inherited from ModelStore.)

Top

Fields

  Name Description
Public fieldStatic member AnsiNullsCategory A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyIsCheckingDataDisabled A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyIsVisible A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyName A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyOwner A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyPermissionSet A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyPermissionSetExternalAccess A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyPermissionSetSafe A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyPermissionSetUnsafe A constant that is used by the schema model.
Public fieldStatic member ClrAssemblyType A constant that is used by the schema model.
Public fieldStatic member CompatibilityModeCategory A constant that is used by the schema model.
Public fieldStatic member ModelCapabilityCategory A constant that is used by the schema model.
Public fieldStatic member PermissionsCategory A constant that is used by the schema model.
Public fieldStatic member PermissionsType A constant that is used by the schema model.
Public fieldStatic member QuotedIdentifierCategory A constant that is used by the schema model.
Public fieldStatic member XsdRelationalSchema A constant that is used by the schema model.
Public fieldStatic member XsdType A constant that is used by the schema model.
Public fieldStatic member XsdXmlSchemaCollectionName A constant that is used by the schema model.

Top

Thread Safety

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

See Also

Reference

Microsoft.Data.Schema.Sql.SchemaModel Namespace