Oracle DBMS_RULE
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose This package contains subprograms that support the evaluation of rule sets
AUTHID CURRENT_USER
Dependencies
DBMS_RULES_LIB RE$NV_LIST RE$TABLE_VALUE_LIST
DBMS_RULE_INTERNAL RE$RULE_HIT RE$VARIABLE_TYPE_LIST
RE$ATTRIBUTE_VALUE_LIST RE$RULE_HIT_LIST RE$VARIABLE_VALUE_LIST
RE$COLUMN_VALUE_LIST RE$TABLE_ALIAS_LIST  
Documented Yes
Exceptions
Error Code Reason
ORA-25453 Invalid Iterator
First Available Not Known
Pragmas PRAGMA SUPPLEMENTAL_LOG_DATA(default, READ_ONLY);
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmsread.sql
Subprograms
 
CLOSE_ITERATOR
Closes an open iterator  dbms_rule.close_iterator(iterator IN BINARY_INTEGER);
exec dbms_rule.close_iterator(1);
 
EVALUATE
Evaluates the rules in the specified rule set that use the evaluation context specified

Overload 1
dbms_rule.evaluate(
rule_set_name IN VARCHAR2,
evaluation_context IN  VARCHAR2,
event_context      IN  sys.re$nv_list              := NULL,
table_values       IN  sys.re$table_value_list     := NULL,
column_values      IN  sys.re$column_value_list    := NULL,
variable_values    IN  sys.re$variable_value_list  := NULL,
attribute_values   IN  sys.re$attribute_value_list := NULL,
stop_on_first_hit  IN  BOOLEAN := FALSE,
simple_rules_only  IN  BOOLEAN := FALSE,
result_cache       IN  BOOLEAN := TRUE,
true_rules         OUT sys.re$rule_hit_list,
maybe_rules        OUT sys.re$rule_hit_list);
TBD
Overload 2 dbms_rule.evaluate(
rule_set_name        IN  VARCHAR2,
evaluation_context   IN  VARCHAR2,
event_context        IN  sys.re$nv_list              := NULL,
table_values         IN  sys.re$table_value_list     := NULL,
column_values        IN  sys.re$column_value_list    := NULL,
variable_values      IN  sys.re$variable_value_list  := NULL,
attribute_values     IN  sys.re$attribute_value_list := NULL,
simple_rules_only    IN  BOOLEAN := FALSE,
true_rules_iterator  OUT BINARY_INTEGER,
maybe_rules_iterator OUT BINARY_INTEGER);
TBD
 
EVALUATE_EXPRESSION
Evaluates an expression under the logged in user in a session dbms_rule.evaluate_expression(
rule_expression  IN  VARCHAR2,
table_aliases    IN  sys.re$table_alias_list     := NULL,
variable_types   IN  sys.re$variable_type_list   := NULL,
table_values     IN  sys.re$table_value_list     := NULL,
column_values    IN  sys.re$column_value_list    := NULL,
variable_values  IN  sys.re$variable_value_list  := NULL,
attribute_values IN  sys.re$attribute_value_list := NULL,
cache            IN  BOOLEAN                     := FALSE,
result_val       OUT BOOLEAN);
TBD
 
GET_NEXT_HIT
Returns the next rule that evaluated to TRUE from a true rules iterator, or returns the next rule that evaluated to MAYBE from a maybe rules iterator dbms_rule.get_next_hit(iterator IN BINARY_INTEGER) RETURN sys.re$rule_hit;
SELECT dbms_rule.get_next_hit(1)
FROM dual;
SELECT dbms_rule.get_next_hit(0)
*
ERROR at line 1:
ORA-25453: invalid iterator: 1
ORA-06512: at "SYS.DBMS_RULE", line 108
 
IS_FAST
Returns TRUE if the expression can be evaluated quickly dbms_rule.is_fast(
expression     IN  VARCHAR2,
table_aliases  IN  sys.re$table_alias_list   := NULL,
variable_types IN  sys.re$variable_type_list := NULL,
result_val     OUT BOOLEAN);
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_RULEADM_INTERNAL
DBMS_RULE_ADM
DBMS_RULE_EXPIMP
DBMS_RULE_EXP_EC_INTERNAL
DBMS_RULE_EXP_EV_CTXS
DBMS_RULE_EXP_RL_INTERNAL
DBMS_RULE_EXP_RS_INTERNAL
DBMS_RULE_EXP_RULES
DBMS_RULE_EXP_RULE_SETS
DBMS_RULE_EXP_UTL
DBMS_RULE_EXP_UTLI
DBMS_RULE_IMP_OBJ
DBMS_RULE_INTERNAL
DBMS_SUM_RWEQ_EXPORT
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2019 Daniel A. Morgan All Rights Reserved
  DBSecWorx