Annotation Interface TemplateStringArgsMustBeQuoted
Template methods with this annotation reject raw String template parameters to prevent programmer
intention ambiguity, because the programmer may intend to use a string as either an identifier
(table/column name) or as a string value.
Instead, the template should backtick-quote (or double-quote) the placeholder to explicitly indicate an identifier, for example:
ParameterizedQuery.of("SELECT * FROM `{table}`", table);
Or single-quote the placeholder to indicate that it's a string value, as in:
ParameterizedQuery.of("SELECT * FROM Users WHERE name = '{user_name}'", user.name());
The single quotes will be elided when the placeholder value is sent through the underlying parameterization API.
- Since:
- 9.0