This attribute should look similar to the following: This attribute is required so that contributors can be discovered. Build Contributors are identified by an ExportBuildContributor attribute. See the API documentation for more information.ĭuring the build process, custom contributors are loaded from a standard extension directory. ![]() There are a number of similar methods, such as GetReferencingRelationshipInstances, GetChildren, and GetParent. ![]() In this case, a ModelRelationshipClass filter can be used to specify exact relationships to query (for instance using the "Table.Columns" filter would ensure only columns were returned). For instance, for a table this will return objects like the Table's columns. If no ModelTypeClass filters are specified then all top level types will be returned.įinds relationships to elements referenced by the current TSqlObject. Only top-level types such as Table or View can be queried - types such as Columns can only be found by traversing the model. Queries the model for objects, and is the main entry point to the model API. Here are some of the commands used by the example contributor in this walkthrough: Class You will see examples of how this is used in the walkthrough code. There is a strongly-typed schema that can be used to query for specific types of elements and traverse interesting relationships. This is a logical representation of a database, including all the tables, view, and other elements, plus the relationships between them. The most useful object will be the database model, represented by a TSqlModel object. A BuildContributorContext object is passed to this method - this contains all the relevant data for the build, such as a model of the database, build properties, and arguments/files to be used by build contributors. All classes inheriting from BuildContributor must implement this method. The main entry point for build contributors is the OnExecute method. Generating model statistics and reporting to the user. This can be done by adding errors to a list passed as a parameter to the OnExecute method. ![]() Validating the model contents and reporting validation errors to the caller. They can be used for a number of scenarios, such as Build Contributor Backgroundīuild contributors are run during project build, after the model representing the project has been generated but before the project is saved to disk. You are also expected to be familiar with basic Visual Studio concepts, such as how to create a class library and how to use the code editor to add code to a class. This walkthrough is intended for users who are already familiar with the SQL features of SSDT.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |