A query that executes unchanged (except for template preprocessing) "raw" SQL specified by the user.
Template Script
SQLTemplate stores a dynamic template for the SQL query that supports parameters and customization using Velocity scripting language. The most straightforward use of scripting abilities is to build parameterized queries. For example:
SELECT ID, NAME FROM SOME_TABLE WHERE NAME LIKE $a
For advanced scripting options see "Scripting SQLTemplate" chapter in the User Guide.
Per-Database Template Customization
SQLTemplate has a {@link #getDefaultTemplate() default template script}, but also it allows to configure multiple templates and switch them dynamically. This way a single query can have multiple "dialects" specific to a given database.
Parameter Sets
SQLTemplate supports multiple sets of parameters, so a single query can be executed multiple times with different parameters. "Scrolling" through parameter list is done by calling {@link #parametersIterator()}. This iterator goes over parameter sets, returning a Map on each call to "next()"
@since 1.1