CREATE DIRECTIVE (VALIDATE)

Purpose

Use CREATE DIRECTIVE to create a validate directive on a JSON relational duality view.

Prerequisites

You must have the CREATE ANY VALIDATION DIRECTIVE system privilege to create a directive in any schema, other than your own.

The CREATE ANY VALIDATION DIRECTIVE is a sensitive privilege because it allows a user to create validation directives on duality views in other schemas. A BEFORE and AFTER validation directive can access the affected row values through :OLD and :NEW pseudorecords during INSERT, UPDATE and SELECT operations. As a result, although CREATE ANY VALIDATION DIRECTIVE does not directly grant unrestricted SELECT access to a table, it can enable indirect read access to table data contained in the payloads when those validation directives are executed.

Syntax

Description of the illustration create_directive_validate.gif

action_list::=

Description of the illustration action_list.gif

processing_clause::=

Description of the illustration processing_clause.gif

validate_enable_option::=

Description of the illustration validate_enable_option.gif

directive_using_clause::=

Description of the illustration directive_using_clause.gif

Semantics

action_list

action_list specifies what actions on a duality view would lead to the directive being executed. You can use UPDATE, INSERT, and SELECT. You will not incur a latency penalty on DMLs on the duality view when you specify SELECT in the action_list. The overhead of validating an object is incurred at the time of read.

processing_clause

The processing_clause specifies when the validation logic is invoked.

BEFORE OBJECT and AFTER OBJECT processing is equivalent to before and after row processing for triggers.

validate_enable_option

validate_enable_option specifies whether application objects in the duality view should be validated when the directive is created.

directive_using_clause

directive_using_clause specifies the validation logic to be invoked for validating objects in a duality view.