Use of custom tags on sql files

May 28, 2012 at 10:11 AM

Hi,

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?

Regards,

Igor Samoylenko.

May 31, 2012 at 1: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?

Coordinator
Nov 9, 2012 at 4: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.

Regards,
Sander