Use of custom tags on sql files

May 28, 2012 at 11:11 AM


The plugin adds custom flags to all SQL files: "Generate CRUD procedures", "Generate History table" etc. How do I actually use them to make the generation conditional? So, if I actually wanted to generate an audit table only for those tables which have "Generate History table" = true, how do I do it? Is it possible? If it is not, what are the flags for?


Igor Samoylenko.

May 31, 2012 at 2:21 PM

I've looked at the source and as far as I can see these custom flags are not actually used anywhere. What is their purpose then?

Nov 9, 2012 at 5:05 PM

Hi Igor,

these properties are used in the templates to figure out if something has to be generated.
You can use them by using the ItemProperty(string propertyName) extension method on the Node property of the template. The ItemProperty method  will return a boolean value indicating true or false for the given property.

To get to the properties check the CommonProperties class or the SimpleProcessorProperties class.