The format of the JSON configuraiton and the selection of the schema, table, and column information is in the form of nested structure of JSON objects. The schema first, then the table, then optionally the column within a nested JSON structure. For example:
"test" : { "msg" : { "id" : "pkey" } }
In the above example:
test
is the schema name
msg
is the table name within the
test
schema
id
is the column name within the
test.msg
table
For different tables within the same schema, place another entry at the same level:
"test" : { "msg" : { "id" : "pkey" }, "orders" : { "id" : "pkey" }, }
The above now handles the tables msg
and orders
within the
test
schema.
Wildcards are also supported, using the
*
operator. For example:
"orders" : { "*" : { "INSERT" : "allow", "DELETE" : "deny", "UPDATE" : "deny" } }
Would match all tables within the
orders
schema. If multiple
definitions exist, then the matching operates on the closest match first.
For example:
"orders" : { "sales" : { "INSERT" : "deny", "DELETE" : "deny", "UPDATE" : "deny" }, "*" : { "INSERT" : "allow", "DELETE" : "deny", "UPDATE" : "deny" } }
In the above, if the schema/table combination
orders.sales
is seen, the rule for
that is always used first as it is explicitly stated. Only tables that do
not match the wildcards will use the wildcard entry. If neither an
explicit schema/table or wildcard exist, the default is used.