File trigger_manager.c
FileList > cubrid > src > object > trigger_manager.c
Go to the source code of this file
#include <assert.h>
#include "memory_alloc.h"
#include "error_manager.h"
#include "dbtype.h"
#include "trigger_manager.h"
#include "memory_hash.h"
#include "work_space.h"
#include "schema_manager.h"
#include "object_accessor.h"
#include "object_primitive.h"
#include "set_object.h"
#include "authenticate.h"
#include "db.h"
#include "parser.h"
#include "system_parameter.h"
#include "locator_cl.h"
#include "transaction_cl.h"
#include "execute_statement.h"
#include "string_opfunc.h"
Public Attributes
Public Static Attributes
Public Functions
| Type |
Name |
| char * |
remove_appended_trigger_evaluate (char * trigger_stmt_str, int with_evaluate)
|
| void |
tr_abort (TR_STATE * state)
|
| int |
tr_abort_to_savepoint (void * savepoint_id)
|
| int |
tr_active_schema_cache (MOP class_mop, TR_SCHEMA_CACHE * cache, DB_TRIGGER_EVENT event_type, bool * has_event_type_triggers)
|
| int |
tr_add_cache_trigger (TR_SCHEMA_CACHE * cache, DB_OBJECT * trigger_object)
|
| int |
tr_after (TR_STATE * state)
|
| int |
tr_after_object (TR_STATE * state, DB_OBJECT * current, DB_OBJECT * temp)
|
| int |
tr_before (TR_STATE * state)
|
| int |
tr_before_object (TR_STATE * state, DB_OBJECT * current, DB_OBJECT * temp)
|
| void |
tr_check_abort_triggers (void)
|
| int |
tr_check_authorization (DB_OBJECT * trigger_object, int alter_flag)
|
| int |
tr_check_commit_triggers (DB_TRIGGER_TIME time)
|
| void |
tr_check_rollback_triggers (DB_TRIGGER_TIME time)
|
| void |
tr_check_timeout_triggers (void)
|
| TR_SCHEMA_CACHE * |
tr_copy_schema_cache (TR_SCHEMA_CACHE * cache, MOP filter_class)
|
| DB_OBJECT * |
tr_create_trigger (const char * name, DB_TRIGGER_STATUS status, double priority, DB_TRIGGER_EVENT event, DB_OBJECT * class_mop, const char * attribute, DB_TRIGGER_TIME cond_time, const char * cond_source, DB_TRIGGER_TIME action_time, DB_TRIGGER_ACTION action_type, const char * action_source, const char * comment)
|
| int |
tr_delete_schema_cache (TR_SCHEMA_CACHE * cache, DB_OBJECT * class_object)
|
| int |
tr_delete_triggers_for_class (TR_SCHEMA_CACHE ** cache, DB_OBJECT * class_object)
|
| int |
tr_downcase_all_trigger_info (void)
|
| int |
tr_drop_cache_trigger (TR_SCHEMA_CACHE * cache, DB_OBJECT * trigger_object)
|
| int |
tr_drop_deferred_activities (DB_OBJECT * trigger_object, DB_OBJECT * target)
|
| int |
tr_drop_trigger (DB_OBJECT * obj, bool call_from_api)
|
| void |
tr_dump (FILE * fpp)
|
| int |
tr_dump_all_triggers (FILE * fp, bool quoted_id_flag)
|
| int |
tr_empty_schema_cache (TR_SCHEMA_CACHE * cache)
|
| const char * |
tr_event_as_string (DB_TRIGGER_EVENT event)
|
| int |
tr_execute_deferred_activities (DB_OBJECT * trigger_object, DB_OBJECT * target)
|
| void |
tr_final (void)
|
| int |
tr_find_all_triggers (DB_OBJLIST ** list)
|
| int |
tr_find_event_triggers (DB_TRIGGER_EVENT event, DB_OBJECT * class_mop, const char * attribute, bool active, DB_OBJLIST ** list)
|
| DB_OBJECT * |
tr_find_trigger (const char * name)
|
| void |
tr_free_schema_cache (TR_SCHEMA_CACHE * cache)
|
| void |
tr_free_trigger_list (TR_TRIGLIST * list)
|
| int |
tr_get_cache_objects (TR_SCHEMA_CACHE * cache, DB_OBJLIST ** list)
|
| const char * |
tr_get_class_name (void)
|
| int |
tr_get_depth (void)
|
| bool |
tr_get_execution_state (void)
|
| int |
tr_get_trace (void)
|
| int |
tr_has_user_trigger (bool * has_user_trigger)
|
| void |
tr_init (void)
|
| void |
tr_invalidate_user_cache (void)
|
| int |
tr_is_trigger (DB_OBJECT * trigger_object, int * status)
|
| TR_SCHEMA_CACHE * |
tr_make_schema_cache (TR_CACHE_TYPE type, DB_OBJLIST * objects)
|
| TR_TRIGGER * |
tr_map_trigger (DB_OBJECT * object, int fetch)
|
| int |
tr_merge_schema_cache (TR_SCHEMA_CACHE * destination, TR_SCHEMA_CACHE * source)
|
| int |
tr_prepare (TR_STATE ** state_p, TR_TRIGLIST * triggers)
|
| int |
tr_prepare_class (TR_STATE ** state_p, TR_SCHEMA_CACHE * cache, MOP class_mop, DB_TRIGGER_EVENT event)
|
| int |
tr_prepare_statement (TR_STATE ** state_p, DB_TRIGGER_EVENT event, DB_OBJECT * class_mop, int attcount, const char ** attnames)
|
| int |
tr_rename_trigger (DB_OBJECT * trigger_object, const char * name, bool call_from_api, bool deferred_flush)
|
| int |
tr_reset_schema_cache (TR_SCHEMA_CACHE * cache)
|
| int |
tr_set_comment (DB_OBJECT * trigger_object, const char * comment, bool call_from_api)
|
| int |
tr_set_depth (int depth)
|
| bool |
tr_set_execution_state (bool new_state)
|
| int |
tr_set_priority (DB_OBJECT * trigger_object, double priority, bool call_from_api)
|
| int |
tr_set_savepoint (void * savepoint_id)
|
| int |
tr_set_status (DB_OBJECT * trigger_object, DB_TRIGGER_STATUS status, bool call_from_api)
|
| int |
tr_set_trace (bool trace)
|
| const char * |
tr_status_as_string (DB_TRIGGER_STATUS status)
|
| const char * |
tr_time_as_string (DB_TRIGGER_TIME time)
|
| int |
tr_trigger_action (DB_OBJECT * trigger_object, char ** action)
|
| int |
tr_trigger_action_time (DB_OBJECT * trigger_object, DB_TRIGGER_TIME * tr_time)
|
| int |
tr_trigger_action_type (DB_OBJECT * trigger_object, DB_TRIGGER_ACTION * type)
|
| int |
tr_trigger_attribute (DB_OBJECT * trigger_object, char ** attribute)
|
| int |
tr_trigger_class (DB_OBJECT * trigger_object, DB_OBJECT ** class_mop_p)
|
| int |
tr_trigger_comment (DB_OBJECT * trigger_object, char ** comment)
|
| int |
tr_trigger_condition (DB_OBJECT * trigger_object, char ** condition)
|
| int |
tr_trigger_condition_time (DB_OBJECT * trigger_object, DB_TRIGGER_TIME * tr_time)
|
| int |
tr_trigger_event (DB_OBJECT * trigger_object, DB_TRIGGER_EVENT * event)
|
| int |
tr_trigger_name (DB_OBJECT * trigger_object, char ** name)
|
| int |
tr_trigger_priority (DB_OBJECT * trigger_object, double * priority)
|
| int |
tr_trigger_status (DB_OBJECT * trigger_object, DB_TRIGGER_STATUS * status)
|
| int |
tr_unmap_trigger (TR_TRIGGER * trigger)
|
| int |
tr_update_trigger_timestamp (DB_OBJECT * obj)
|
| int |
tr_update_user_cache (void)
|
| int |
tr_validate_schema_cache (TR_SCHEMA_CACHE * cache, MOP class_mop)
|
Public Static Functions
| Type |
Name |
| int |
add_deferred_activities (TR_TRIGLIST * triggers, MOP current)
|
| TR_DEFERRED_CONTEXT * |
add_deferred_activity_context (void)
|
| bool |
check_authorization (TR_TRIGGER * trigger, bool alter_flag)
|
| int |
check_semantics (TR_TRIGGER * trigger)
|
| bool |
check_target (DB_TRIGGER_EVENT event, DB_OBJECT * class_mop, const char * attribute)
|
| int |
compare_recursion_levels (int rl_1, int rl_2)
|
| int |
compile_trigger_activity (TR_TRIGGER * trigger, TR_ACTIVITY * activity, int with_evaluate)
|
| int |
eval_action (TR_TRIGGER * trigger, DB_OBJECT * current, DB_OBJECT * temp, bool * reject)
|
| int |
eval_condition (TR_TRIGGER * trigger, DB_OBJECT * current, DB_OBJECT * temp, bool * status)
|
| int |
execute_activity (TR_TRIGGER * trigger, DB_TRIGGER_TIME tr_time, DB_OBJECT * current, DB_OBJECT * temp, bool * rejected)
|
| int |
find_all_triggers (bool active_filter, bool alter_filter, DB_OBJLIST ** list)
|
| int |
find_event_triggers (DB_TRIGGER_EVENT event, DB_OBJECT * class_mop, const char * attribute, bool active_filter, DB_OBJLIST ** list)
|
| void |
flush_deferred_activities (void)
|
| void |
free_activity (TR_ACTIVITY * act)
|
| void |
free_state (TR_STATE * state)
|
| void |
free_trigger (TR_TRIGGER * trigger)
|
| void |
get_reference_names (TR_TRIGGER * trigger, TR_ACTIVITY * activity, const char ** curname, const char ** tempname)
|
| int |
get_schema_trigger_objects (DB_OBJECT * class_mop, const char * attribute, DB_TRIGGER_EVENT event, bool active_flag, DB_OBJLIST ** objlist)
|
| int |
get_user_trigger_objects (DB_TRIGGER_EVENT event, bool active_filter, DB_OBJLIST ** trigger_list)
|
| int |
insert_trigger_list (TR_TRIGLIST ** list, TR_TRIGGER * trigger)
|
| int |
its_deleted (DB_OBJECT * object)
|
| TR_ACTIVITY * |
make_activity (void)
|
| TR_STATE * |
make_state (void)
|
| int |
map_flush_helper (const void * key, void * data, void * args)
|
| int |
merge_trigger_list (TR_TRIGLIST ** list, TR_TRIGLIST * more, int destructive)
|
| int |
object_to_trigger (DB_OBJECT * object, TR_TRIGGER * trigger)
|
| int |
register_user_trigger (DB_OBJECT * object)
|
| void |
reinsert_trigger_list (TR_TRIGLIST ** list, TR_TRIGGER * trigger)
|
| void |
remove_deferred_activity (TR_DEFERRED_CONTEXT * context, TR_TRIGLIST * element)
|
| void |
remove_deferred_context (TR_DEFERRED_CONTEXT * c)
|
| void |
remove_trigger_list (TR_TRIGLIST ** list, TR_TRIGGER * trigger)
|
| void |
remove_trigger_list_element (TR_TRIGLIST ** list, TR_TRIGLIST * element)
|
| void |
reorder_schema_caches (TR_TRIGGER * trigger)
|
| int |
run_user_triggers (DB_TRIGGER_EVENT event, DB_TRIGGER_TIME time)
|
| int |
signal_evaluation_error (TR_TRIGGER * trigger, int error)
|
| TR_STATE * |
start_state (TR_STATE ** current, const char * name)
|
| const char * |
time_as_string (DB_TRIGGER_TIME tr_time)
|
| PT_NODE * |
tr_check_correlation (PARSER_CONTEXT * parser, PT_NODE * node, void * arg, int * walk_on)
|
| TR_RECURSION_DECISION |
tr_check_recursivity (OID oid, OID stack, int stack_size, bool is_statement)
|
| void |
tr_clear_trigger (TR_TRIGGER * trigger)
|
| int |
tr_drop_trigger_internal (TR_TRIGGER * trigger, int rollback, bool need_savepoint)
|
| int |
tr_execute_activities (TR_STATE * state, DB_TRIGGER_TIME tr_time, DB_OBJECT * current, DB_OBJECT * temp)
|
| void |
tr_finish (TR_STATE * state)
|
| TR_TRIGGER * |
tr_make_trigger (void)
|
| char * |
tr_process_name (const char * name_string)
|
| int |
tr_set_trigger_timestamps (TR_TRIGGER * trigger)
|
| int |
trigger_table_add (const char * name, DB_OBJECT * trigger)
|
| int |
trigger_table_drop (const char * name)
|
| int |
trigger_table_find (const char * name, DB_OBJECT ** trigger_p)
|
| int |
trigger_table_rename (DB_OBJECT * trigger_object, const char * newname)
|
| DB_OBJECT * |
trigger_to_object (TR_TRIGGER * trigger)
|
| int |
unregister_user_trigger (TR_TRIGGER * trigger, int rollback)
|
| int |
validate_trigger (TR_TRIGGER * trigger)
|
| bool |
value_as_boolean (DB_VALUE * value)
|
Macros
Public Attributes Documentation
variable EVAL_PREFIX
variable EVAL_SUFFIX
variable TR_ATT_ACTION
const char* TR_ATT_ACTION;
variable TR_ATT_ACTION_OLD
const char* TR_ATT_ACTION_OLD;
variable TR_ATT_ACTION_TIME
const char* TR_ATT_ACTION_TIME;
variable TR_ATT_ACTION_TYPE
const char* TR_ATT_ACTION_TYPE;
variable TR_ATT_ATTRIBUTE
const char* TR_ATT_ATTRIBUTE;
variable TR_ATT_CLASS
const char* TR_ATT_CLASS;
variable TR_ATT_CLASS_ATTRIBUTE
const char* TR_ATT_CLASS_ATTRIBUTE;
const char* TR_ATT_COMMENT;
variable TR_ATT_CONDITION
const char* TR_ATT_CONDITION;
variable TR_ATT_CONDITION_TIME
const char* TR_ATT_CONDITION_TIME;
variable TR_ATT_CONDITION_TYPE
const char* TR_ATT_CONDITION_TYPE;
variable TR_ATT_CREATED_TIME
const char* TR_ATT_CREATED_TIME;
variable TR_ATT_EVENT
const char* TR_ATT_EVENT;
variable TR_ATT_NAME
variable TR_ATT_OWNER
const char* TR_ATT_OWNER;
variable TR_ATT_PRIORITY
const char* TR_ATT_PRIORITY;
variable TR_ATT_PROPERTIES
const char* TR_ATT_PROPERTIES;
variable TR_ATT_STATUS
const char* TR_ATT_STATUS;
variable TR_ATT_UNIQUE_NAME
const char* TR_ATT_UNIQUE_NAME;
variable TR_ATT_UPDATED_TIME
const char* TR_ATT_UPDATED_TIME;
variable TR_CLASS_NAME
const char* TR_CLASS_NAME;
variable tr_Current_depth
variable tr_Deferred_activities
TR_DEFERRED_CONTEXT* tr_Deferred_activities;
variable tr_Deferred_activities_tail
TR_DEFERRED_CONTEXT* tr_Deferred_activities_tail;
variable tr_Invalid_transaction
bool tr_Invalid_transaction;
variable tr_Invalid_transaction_trigger
char tr_Invalid_transaction_trigger[SM_MAX_IDENTIFIER_LENGTH+2];
variable tr_Maximum_depth
variable tr_Stack
variable tr_Trace
Public Static Attributes Documentation
variable NEW_REFERENCE_NAME
const char* NEW_REFERENCE_NAME;
variable OBJ_REFERENCE_NAME
const char* OBJ_REFERENCE_NAME;
variable OLD_REFERENCE_NAME
const char* OLD_REFERENCE_NAME;
variable TR_EST_MAP_SIZE
const int TR_EST_MAP_SIZE;
variable TR_RETURN_ERROR
const int TR_RETURN_ERROR;
variable TR_RETURN_FALSE
const int TR_RETURN_FALSE;
variable TR_RETURN_TRUE
const int TR_RETURN_TRUE;
variable tr_Execution_enabled
bool tr_Execution_enabled;
variable tr_Schema_caches
TR_SCHEMA_CACHE* tr_Schema_caches;
variable tr_Uncommitted_triggers
TR_TRIGLIST* tr_Uncommitted_triggers;
variable tr_User_triggers
TR_TRIGLIST* tr_User_triggers;
variable tr_User_triggers_modified
int tr_User_triggers_modified;
variable tr_User_triggers_valid
int tr_User_triggers_valid;
variable tr_object_map
MHT_TABLE* tr_object_map;
Public Functions Documentation
function remove_appended_trigger_evaluate
char * remove_appended_trigger_evaluate (
char * trigger_stmt_str,
int with_evaluate
)
function tr_abort
void tr_abort (
TR_STATE * state
)
function tr_abort_to_savepoint
int tr_abort_to_savepoint (
void * savepoint_id
)
function tr_active_schema_cache
int tr_active_schema_cache (
MOP class_mop,
TR_SCHEMA_CACHE * cache,
DB_TRIGGER_EVENT event_type,
bool * has_event_type_triggers
)
function tr_add_cache_trigger
int tr_add_cache_trigger (
TR_SCHEMA_CACHE * cache,
DB_OBJECT * trigger_object
)
function tr_after
int tr_after (
TR_STATE * state
)
function tr_after_object
int tr_after_object (
TR_STATE * state,
DB_OBJECT * current,
DB_OBJECT * temp
)
function tr_before
int tr_before (
TR_STATE * state
)
function tr_before_object
int tr_before_object (
TR_STATE * state,
DB_OBJECT * current,
DB_OBJECT * temp
)
function tr_check_abort_triggers
void tr_check_abort_triggers (
void
)
function tr_check_authorization
int tr_check_authorization (
DB_OBJECT * trigger_object,
int alter_flag
)
function tr_check_commit_triggers
int tr_check_commit_triggers (
DB_TRIGGER_TIME time
)
function tr_check_rollback_triggers
void tr_check_rollback_triggers (
DB_TRIGGER_TIME time
)
function tr_check_timeout_triggers
void tr_check_timeout_triggers (
void
)
function tr_copy_schema_cache
TR_SCHEMA_CACHE * tr_copy_schema_cache (
TR_SCHEMA_CACHE * cache,
MOP filter_class
)
function tr_create_trigger
DB_OBJECT * tr_create_trigger (
const char * name,
DB_TRIGGER_STATUS status,
double priority,
DB_TRIGGER_EVENT event,
DB_OBJECT * class_mop,
const char * attribute,
DB_TRIGGER_TIME cond_time,
const char * cond_source,
DB_TRIGGER_TIME action_time,
DB_TRIGGER_ACTION action_type,
const char * action_source,
const char * comment
)
function tr_delete_schema_cache
int tr_delete_schema_cache (
TR_SCHEMA_CACHE * cache,
DB_OBJECT * class_object
)
function tr_delete_triggers_for_class
int tr_delete_triggers_for_class (
TR_SCHEMA_CACHE ** cache,
DB_OBJECT * class_object
)
function tr_downcase_all_trigger_info
int tr_downcase_all_trigger_info (
void
)
function tr_drop_cache_trigger
int tr_drop_cache_trigger (
TR_SCHEMA_CACHE * cache,
DB_OBJECT * trigger_object
)
function tr_drop_deferred_activities
int tr_drop_deferred_activities (
DB_OBJECT * trigger_object,
DB_OBJECT * target
)
function tr_drop_trigger
int tr_drop_trigger (
DB_OBJECT * obj,
bool call_from_api
)
function tr_dump
void tr_dump (
FILE * fpp
)
function tr_dump_all_triggers
int tr_dump_all_triggers (
FILE * fp,
bool quoted_id_flag
)
function tr_empty_schema_cache
int tr_empty_schema_cache (
TR_SCHEMA_CACHE * cache
)
function tr_event_as_string
const char * tr_event_as_string (
DB_TRIGGER_EVENT event
)
function tr_execute_deferred_activities
int tr_execute_deferred_activities (
DB_OBJECT * trigger_object,
DB_OBJECT * target
)
function tr_final
function tr_find_all_triggers
int tr_find_all_triggers (
DB_OBJLIST ** list
)
function tr_find_event_triggers
int tr_find_event_triggers (
DB_TRIGGER_EVENT event,
DB_OBJECT * class_mop,
const char * attribute,
bool active,
DB_OBJLIST ** list
)
function tr_find_trigger
DB_OBJECT * tr_find_trigger (
const char * name
)
function tr_free_schema_cache
void tr_free_schema_cache (
TR_SCHEMA_CACHE * cache
)
function tr_free_trigger_list
void tr_free_trigger_list (
TR_TRIGLIST * list
)
function tr_get_cache_objects
int tr_get_cache_objects (
TR_SCHEMA_CACHE * cache,
DB_OBJLIST ** list
)
function tr_get_class_name
const char * tr_get_class_name (
void
)
function tr_get_depth
int tr_get_depth (
void
)
function tr_get_execution_state
bool tr_get_execution_state (
void
)
function tr_get_trace
int tr_get_trace (
void
)
function tr_has_user_trigger
int tr_has_user_trigger (
bool * has_user_trigger
)
function tr_init
function tr_invalidate_user_cache
void tr_invalidate_user_cache (
void
)
function tr_is_trigger
int tr_is_trigger (
DB_OBJECT * trigger_object,
int * status
)
function tr_make_schema_cache
TR_SCHEMA_CACHE * tr_make_schema_cache (
TR_CACHE_TYPE type,
DB_OBJLIST * objects
)
function tr_map_trigger
TR_TRIGGER * tr_map_trigger (
DB_OBJECT * object,
int fetch
)
function tr_merge_schema_cache
int tr_merge_schema_cache (
TR_SCHEMA_CACHE * destination,
TR_SCHEMA_CACHE * source
)
function tr_prepare
int tr_prepare (
TR_STATE ** state_p,
TR_TRIGLIST * triggers
)
function tr_prepare_class
int tr_prepare_class (
TR_STATE ** state_p,
TR_SCHEMA_CACHE * cache,
MOP class_mop,
DB_TRIGGER_EVENT event
)
function tr_prepare_statement
int tr_prepare_statement (
TR_STATE ** state_p,
DB_TRIGGER_EVENT event,
DB_OBJECT * class_mop,
int attcount,
const char ** attnames
)
function tr_rename_trigger
int tr_rename_trigger (
DB_OBJECT * trigger_object,
const char * name,
bool call_from_api,
bool deferred_flush
)
function tr_reset_schema_cache
int tr_reset_schema_cache (
TR_SCHEMA_CACHE * cache
)
int tr_set_comment (
DB_OBJECT * trigger_object,
const char * comment,
bool call_from_api
)
function tr_set_depth
int tr_set_depth (
int depth
)
function tr_set_execution_state
bool tr_set_execution_state (
bool new_state
)
function tr_set_priority
int tr_set_priority (
DB_OBJECT * trigger_object,
double priority,
bool call_from_api
)
function tr_set_savepoint
int tr_set_savepoint (
void * savepoint_id
)
function tr_set_status
int tr_set_status (
DB_OBJECT * trigger_object,
DB_TRIGGER_STATUS status,
bool call_from_api
)
function tr_set_trace
int tr_set_trace (
bool trace
)
function tr_status_as_string
const char * tr_status_as_string (
DB_TRIGGER_STATUS status
)
function tr_time_as_string
const char * tr_time_as_string (
DB_TRIGGER_TIME time
)
function tr_trigger_action
int tr_trigger_action (
DB_OBJECT * trigger_object,
char ** action
)
function tr_trigger_action_time
int tr_trigger_action_time (
DB_OBJECT * trigger_object,
DB_TRIGGER_TIME * tr_time
)
function tr_trigger_action_type
int tr_trigger_action_type (
DB_OBJECT * trigger_object,
DB_TRIGGER_ACTION * type
)
function tr_trigger_attribute
int tr_trigger_attribute (
DB_OBJECT * trigger_object,
char ** attribute
)
function tr_trigger_class
int tr_trigger_class (
DB_OBJECT * trigger_object,
DB_OBJECT ** class_mop_p
)
int tr_trigger_comment (
DB_OBJECT * trigger_object,
char ** comment
)
function tr_trigger_condition
int tr_trigger_condition (
DB_OBJECT * trigger_object,
char ** condition
)
function tr_trigger_condition_time
int tr_trigger_condition_time (
DB_OBJECT * trigger_object,
DB_TRIGGER_TIME * tr_time
)
function tr_trigger_event
int tr_trigger_event (
DB_OBJECT * trigger_object,
DB_TRIGGER_EVENT * event
)
function tr_trigger_name
int tr_trigger_name (
DB_OBJECT * trigger_object,
char ** name
)
function tr_trigger_priority
int tr_trigger_priority (
DB_OBJECT * trigger_object,
double * priority
)
function tr_trigger_status
int tr_trigger_status (
DB_OBJECT * trigger_object,
DB_TRIGGER_STATUS * status
)
function tr_unmap_trigger
int tr_unmap_trigger (
TR_TRIGGER * trigger
)
function tr_update_trigger_timestamp
int tr_update_trigger_timestamp (
DB_OBJECT * obj
)
function tr_update_user_cache
int tr_update_user_cache (
void
)
function tr_validate_schema_cache
int tr_validate_schema_cache (
TR_SCHEMA_CACHE * cache,
MOP class_mop
)
Public Static Functions Documentation
function add_deferred_activities
static int add_deferred_activities (
TR_TRIGLIST * triggers,
MOP current
)
function add_deferred_activity_context
static TR_DEFERRED_CONTEXT * add_deferred_activity_context (
void
)
function check_authorization
static bool check_authorization (
TR_TRIGGER * trigger,
bool alter_flag
)
function check_semantics
static int check_semantics (
TR_TRIGGER * trigger
)
function check_target
static bool check_target (
DB_TRIGGER_EVENT event,
DB_OBJECT * class_mop,
const char * attribute
)
function compare_recursion_levels
static int compare_recursion_levels (
int rl_1,
int rl_2
)
function compile_trigger_activity
static int compile_trigger_activity (
TR_TRIGGER * trigger,
TR_ACTIVITY * activity,
int with_evaluate
)
function eval_action
static int eval_action (
TR_TRIGGER * trigger,
DB_OBJECT * current,
DB_OBJECT * temp,
bool * reject
)
function eval_condition
static int eval_condition (
TR_TRIGGER * trigger,
DB_OBJECT * current,
DB_OBJECT * temp,
bool * status
)
function execute_activity
static int execute_activity (
TR_TRIGGER * trigger,
DB_TRIGGER_TIME tr_time,
DB_OBJECT * current,
DB_OBJECT * temp,
bool * rejected
)
function find_all_triggers
static int find_all_triggers (
bool active_filter,
bool alter_filter,
DB_OBJLIST ** list
)
function find_event_triggers
static int find_event_triggers (
DB_TRIGGER_EVENT event,
DB_OBJECT * class_mop,
const char * attribute,
bool active_filter,
DB_OBJLIST ** list
)
function flush_deferred_activities
static void flush_deferred_activities (
void
)
function free_activity
static void free_activity (
TR_ACTIVITY * act
)
function free_state
static void free_state (
TR_STATE * state
)
function free_trigger
static void free_trigger (
TR_TRIGGER * trigger
)
function get_reference_names
static void get_reference_names (
TR_TRIGGER * trigger,
TR_ACTIVITY * activity,
const char ** curname,
const char ** tempname
)
function get_schema_trigger_objects
static int get_schema_trigger_objects (
DB_OBJECT * class_mop,
const char * attribute,
DB_TRIGGER_EVENT event,
bool active_flag,
DB_OBJLIST ** objlist
)
function get_user_trigger_objects
static int get_user_trigger_objects (
DB_TRIGGER_EVENT event,
bool active_filter,
DB_OBJLIST ** trigger_list
)
function insert_trigger_list
static int insert_trigger_list (
TR_TRIGLIST ** list,
TR_TRIGGER * trigger
)
function its_deleted
static int its_deleted (
DB_OBJECT * object
)
function make_activity
static TR_ACTIVITY * make_activity (
void
)
function make_state
static TR_STATE * make_state (
void
)
function map_flush_helper
static int map_flush_helper (
const void * key,
void * data,
void * args
)
function merge_trigger_list
static int merge_trigger_list (
TR_TRIGLIST ** list,
TR_TRIGLIST * more,
int destructive
)
function object_to_trigger
static int object_to_trigger (
DB_OBJECT * object,
TR_TRIGGER * trigger
)
function register_user_trigger
static int register_user_trigger (
DB_OBJECT * object
)
function reinsert_trigger_list
static void reinsert_trigger_list (
TR_TRIGLIST ** list,
TR_TRIGGER * trigger
)
function remove_deferred_activity
static void remove_deferred_activity (
TR_DEFERRED_CONTEXT * context,
TR_TRIGLIST * element
)
function remove_deferred_context
static void remove_deferred_context (
TR_DEFERRED_CONTEXT * c
)
function remove_trigger_list
static void remove_trigger_list (
TR_TRIGLIST ** list,
TR_TRIGGER * trigger
)
function remove_trigger_list_element
static void remove_trigger_list_element (
TR_TRIGLIST ** list,
TR_TRIGLIST * element
)
function reorder_schema_caches
static void reorder_schema_caches (
TR_TRIGGER * trigger
)
function run_user_triggers
static int run_user_triggers (
DB_TRIGGER_EVENT event,
DB_TRIGGER_TIME time
)
function signal_evaluation_error
static int signal_evaluation_error (
TR_TRIGGER * trigger,
int error
)
function start_state
static TR_STATE * start_state (
TR_STATE ** current,
const char * name
)
function time_as_string
static const char * time_as_string (
DB_TRIGGER_TIME tr_time
)
function tr_check_correlation
static PT_NODE * tr_check_correlation (
PARSER_CONTEXT * parser,
PT_NODE * node,
void * arg,
int * walk_on
)
function tr_check_recursivity
static TR_RECURSION_DECISION tr_check_recursivity (
OID oid,
OID stack,
int stack_size,
bool is_statement
)
function tr_clear_trigger
static void tr_clear_trigger (
TR_TRIGGER * trigger
)
function tr_drop_trigger_internal
static int tr_drop_trigger_internal (
TR_TRIGGER * trigger,
int rollback,
bool need_savepoint
)
function tr_execute_activities
static int tr_execute_activities (
TR_STATE * state,
DB_TRIGGER_TIME tr_time,
DB_OBJECT * current,
DB_OBJECT * temp
)
function tr_finish
static void tr_finish (
TR_STATE * state
)
function tr_make_trigger
static TR_TRIGGER * tr_make_trigger (
void
)
function tr_process_name
static char * tr_process_name (
const char * name_string
)
function tr_set_trigger_timestamps
static int tr_set_trigger_timestamps (
TR_TRIGGER * trigger
)
function trigger_table_add
static int trigger_table_add (
const char * name,
DB_OBJECT * trigger
)
function trigger_table_drop
static int trigger_table_drop (
const char * name
)
function trigger_table_find
static int trigger_table_find (
const char * name,
DB_OBJECT ** trigger_p
)
function trigger_table_rename
static int trigger_table_rename (
DB_OBJECT * trigger_object,
const char * newname
)
function trigger_to_object
static DB_OBJECT * trigger_to_object (
TR_TRIGGER * trigger
)
function unregister_user_trigger
static int unregister_user_trigger (
TR_TRIGGER * trigger,
int rollback
)
function validate_trigger
static int validate_trigger (
TR_TRIGGER * trigger
)
function value_as_boolean
static bool value_as_boolean (
DB_VALUE * value
)
Macro Definition Documentation
define COMPARE_TRIGGER_NAMES
#define COMPARE_TRIGGER_NAMES `intl_identifier_casecmp`
define IS_CLASS_EVENT
#define IS_CLASS_EVENT (
event
) `(! IS_USER_EVENT (event))`
define IS_USER_EVENT
#define IS_USER_EVENT (
event
) `/* multi line expression */`
define MAX_ERROR_STRING
#define MAX_ERROR_STRING `2048`
define TR_EXECUTION_ENABLED
#define TR_EXECUTION_ENABLED `( tr_Execution_enabled == true )`
define UNIQUE_SAVEPOINT_CREATE_TRIGGER
#define UNIQUE_SAVEPOINT_CREATE_TRIGGER `"cREATEtRIGGER"`
define UNIQUE_SAVEPOINT_DROP_TRIGGER
#define UNIQUE_SAVEPOINT_DROP_TRIGGER `"dROPtRIGGER"`
define UNIQUE_SAVEPOINT_RENAME_TRIGGER
#define UNIQUE_SAVEPOINT_RENAME_TRIGGER `"rENAMEtRIGGER"`
The documentation for this class was generated from the following file cubrid/src/object/trigger_manager.c