Rewrites queries based on a query template.
In 6, 2.5, 2.4:
rewritefilter is a filter that can be configured to manipulate the SQL statements that are being run before they get to the backing database.
The filter is configured in the
maxscale.cnf file using the following parameters.
template_file parameter must be configured in the filter section. It specifies a string value path name of the template file to parse into rewrite rules. This setting has no default value.
The following optional parameters control the default setting for how the rules behave. Each rule can override the default value specified here:
regex_grammar- a string value that chooses which type of regex grammar to use in the template rules. The choices are:
Native(the default when unspecified)
case_sensitive- a boolean value that controls if uppercase/lowercase are distinct when matching. Defaults to true.
log_replacement- a boolean value that controls if replacements are logged at the NOTICE level or not logged. Defaults to false (no logging).
For details on creating the template file itself, see MaxScale Rewrite Filter.
[Rewrite] type = filter module = rewritefilter template_file = /path/to/template_file.rf regex_grammar = Native case_sensitive = true log_replacement = true