This section describes how to use templates to make your queries more flexible.
A statement template is one or more SQL statement which contains placeholders which are replaced at execution time by the template parameters. The placeholders have the format $param and a number. The number is the number of the parameter after the template name. The first parameter has the name $param1, the second one $param2 and so on.
It's possible to use a template inside of another template but there is no check to avoid endless loops.
The plugin uses the Velocity engine to create the statements from the template. More about Velocity can be found under http://jakarta.apache.org/velocity/index.html
To use a template you have to start your query with '@' followed by the template name and the template parameters.
Syntax:@<template name>[ <parameter>(, <parameter>)*]