rewritefilter

Overview

In 22.08:

Rewrites queries based on a query template.

In 6, 2.5, 2.4:

Not present

In 6:

Not present

DETAILS

The 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.

The 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)

    • ECMAScript

    • Posix

    • EPosix

    • Awk

    • Grep

    • EGrep

  • 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.

EXAMPLES

[Rewrite]
type = filter
module = rewritefilter
template_file = /path/to/template_file.rf
regex_grammar = Native
case_sensitive = true
log_replacement = true

CHANGE HISTORY

Release Series

History

22.08

  • Present starting in MariaDB MaxScale 22.08.1.

6

  • Not present.

2.5

  • Not present.

2.4

  • Not present.

Release Series

History

22.08

  • Present starting in MariaDB MaxScale 22.08.1.

6

  • Not present.