The following objects are available to the code in filters.
context.connectionContext
An object containing variables that exist as long as the database connection is open. This object disappears when the database connection is closed.
The following values are predefined:
username (string): the name of the current MySQL user.
clientIP (string): the IP of the database client -- can be IP4 or IP6.
loginRequest (LoginRequest packet): the login request used to establish this connection.
currentQuery (string): the SQL currently executing. Can be null if the filter is invoked while there is no SQL query executing.
context.filterContext
An object containing variables accessible to all invocations of the filter.
This object does not have any predefined values.
Because this object is long-lived, you should be careful not to store too much data into it.
context.projectContext
An object containing variables accessible to all filters in the project.
This object does not have any predefined values.
Because this object is long-lived, you should be careful not to store too much data into it.