27.2 Global Constants
The APEX_EXEC package uses the following constants.
Query or DML Location Constants
subtype t_location is varchar2(12);
c_location_local_db constant t_location := 'LOCAL';
c_location_remote_db constant t_location := 'REMOTE';
c_location_rest_source constant t_location := 'REST_SOURCE';
c_location_region_source constant t_location := 'REGION_SOURCE';
c_location_duality_view constant t_location := 'DUALITY_VIEW';
c_location_json_source constant t_location := 'JSON_COLLECTION';
c_lov_shared constant t_lov_type := 1;
c_lov_sql_query constant t_lov_type := 2;
c_lov_static constant t_lov_type := 3;
subtype t_query_type is varchar2(23);
c_query_type_table constant t_query_type := 'TABLE';
c_query_type_sql_query constant t_query_type := 'SQL';
c_query_type_func_return_sql constant t_query_type := 'FUNC_BODY_RETURNING_SQL';
subtype t_dml_operation is pls_integer range 1..3;
c_dml_operation_insert constant t_dml_operation := 1;
c_dml_operation_update constant t_dml_operation := 2;
c_dml_operation_delete constant t_dml_operation := 3;
subtype t_target_type is varchar2(13);
c_target_type_region_source constant t_target_type := 'REGION_SOURCE';
c_target_type_table constant t_target_type := 'TABLE';
c_target_type_sql_query constant t_target_type := 'SQL';
c_target_type_plsql constant t_target_type := 'PLSQL_CODE';
subtype t_post_processing is pls_integer range 1..3;
c_postprocess_where_orderby constant t_post_processing := 1;
c_postprocess_sql constant t_post_processing := 2;
c_postprocess_func_return_sql constant t_post_processing := 3;
Column Data Type Constants
Data type constants to be used in the ADD_FILTER
or ADD_COLUMN
procedures.
subtype t_data_type is pls_integer range 1..18;
c_data_type_varchar2 constant t_data_type := 1;
c_data_type_number constant t_data_type := 2;
c_data_type_date constant t_data_type := 3;
c_data_type_timestamp constant t_data_type := 4;
c_data_type_timestamp_tz constant t_data_type := 5;
c_data_type_timestamp_ltz constant t_data_type := 6;
c_data_type_interval_y2m constant t_data_type := 7;
c_data_type_interval_d2s constant t_data_type := 8;
c_data_type_blob constant t_data_type := 9;
c_data_type_bfile constant t_data_type := 10;
c_data_type_clob constant t_data_type := 11;
c_data_type_rowid constant t_data_type := 12;
c_data_type_user_defined constant t_data_type := 13;
c_data_type_binary_number constant t_data_type := 14;
c_data_type_sdo_geometry constant t_data_type := 15;
c_data_type_boolean constant t_data_type := 16; -- only available for PL/SQL.
c_data_type_array constant t_data_type := 17;
c_data_type_vector constant t_data_type := 18;
--
-- Use this data type for columns of the JSON data type (Database 21c or higher) ONLY.
-- Has currently the same functionality as CLOB columns, but may be extended in the
-- future.
c_data_type_json constant t_data_type := 11;
Filter Type Constants
Filter type constants to be used in the ADD_FILTER
procedures.
c_filter_eq constant t_filter_type := 1;
c_filter_not_eq constant t_filter_type := 2;
c_filter_gt constant t_filter_type := 3;
c_filter_gte constant t_filter_type := 4;
c_filter_lt constant t_filter_type := 5;
c_filter_lte constant t_filter_type := 6;
c_filter_null constant t_filter_type := 7;
c_filter_not_null constant t_filter_type := 8;
c_filter_starts_with constant t_filter_type := 9;
c_filter_not_starts_with constant t_filter_type := 10;
c_filter_ends_with constant t_filter_type := 11;
c_filter_not_ends_with constant t_filter_type := 12;
c_filter_contains constant t_filter_type := 13;
c_filter_not_contains constant t_filter_type := 14;
c_filter_in constant t_filter_type := 15;
c_filter_not_in constant t_filter_type := 16;
c_filter_between constant t_filter_type := 17;
c_filter_between_lbe constant t_filter_type := 29; -- Interactive report filter.
c_filter_between_ube constant t_filter_type := 30; -- Interactive report filter.
c_filter_not_between constant t_filter_type := 18;
c_filter_regexp constant t_filter_type := 19;
c_filter_last constant t_filter_type := 20; -- date filter: days/months/...
c_filter_not_last constant t_filter_type := 21; -- date filter: days/months/...
c_filter_next constant t_filter_type := 22; -- date filter: days/months/...
c_filter_not_next constant t_filter_type := 23; -- date filter: days/months/...
c_filter_like constant t_filter_type := 24; -- Interactive report filter.
c_filter_not_like constant t_filter_type := 25; -- Interactive report filter.
c_filter_search constant t_filter_type := 26; -- Interactive report filter.
c_filter_sql_expression constant t_filter_type := 27; -- Interactive report filter.
c_filter_oracletext constant t_filter_type := 28; -- Oracle TEXT CONTAINS filter.
c_filter_sdo_filter constant t_filter_type := 31; -- Spatial filter.
c_filter_sdo_anyinteract constant t_filter_type := 32; -- Spatial filter.
c_filter_dbms_search constant t_filter_type := 33; -- Oracle Ubiquitous Search CONTAINS Filter.
c_filter_vector_type constant t_filter_type := 34;
Order By Constants
Order by constants to be used in the ADD_FILTER
procedures.
c_order_asc constant t_order_direction := 1;
c_order_desc constant t_order_direction := 2;
c_order_nulls_first constant t_order_nulls := 1;
c_order_nulls_last constant t_order_nulls := 2;
Order By Nulls Constants
Order By Nulls constants to use within REST Source Plug-Ins.
subtype t_supports_orderby_nulls_as is pls_integer range 1..5;
c_orderby_nulls_flexible constant t_supports_orderby_nulls_as := 1;
c_orderby_nulls_are_lowest constant t_supports_orderby_nulls_as := 2;
c_orderby_nulls_are_highest constant t_supports_orderby_nulls_as := 3;
c_orderby_nulls_always_last constant t_supports_orderby_nulls_as := 4;
c_orderby_nulls_always_first constant t_supports_orderby_nulls_as := 5;
Empty Constants
Constants for empty filter, order by, columns or parameter arrays.
c_empty_columns t_columns;
c_empty_filters t_filters;
c_empty_order_bys t_order_bys;
c_empty_parameters t_parameters;
Database Vendor Constants
subtype t_database_type is pls_integer range 1..2;
c_database_oracle constant t_database_type := 1;
c_database_mysql constant t_database_type := 2;
Aggregation Type Constants
subtype t_aggregation_type is pls_integer range 1..3;
c_aggregation_none constant t_aggregation_type := 1;
c_aggregation_group_by constant t_aggregation_type := 2;
c_aggregation_distinct constant t_aggregation_type := 3;
Aggregation Column Role Constants
subtype t_column_role is pls_integer range 1..2;
c_column_role_aggregate constant t_column_role := 1;
c_column_role_group_by constant t_column_role := 2;
Aggregation Function Constants
subtype t_aggregate_function is pls_integer range 1..11;
c_aggregate_sum constant t_aggregate_function := 1;
c_aggregate_avg constant t_aggregate_function := 2;
c_aggregate_median constant t_aggregate_function := 3;
c_aggregate_cnt constant t_aggregate_function := 4;
c_aggregate_distinct_cnt constant t_aggregate_function := 5;
c_aggregate_approx_dist_cnt constant t_aggregate_function := 6;
c_aggregate_min constant t_aggregate_function := 7;
c_aggregate_max constant t_aggregate_function := 8;
c_aggregate_ratio_report_sum constant t_aggregate_function := 9;
c_aggregate_ratio_report_cnt constant t_aggregate_function := 10;
c_aggregate_listagg constant t_aggregate_function := 11;
Aggregation Columns
type t_aggregation_column is record(
attributes t_column,
aggr_role t_column_role,
aggr_function t_aggregate_function,
total_column_name t_column_name,
total_function t_aggregate_function );
Collection of Aggregation Columns
type t_aggregation_columns is table of t_aggregation_column index by pls_integer;
Aggregation
type t_aggregation is record(
aggregation_type t_aggregation_type,
column_info t_aggregation_columns,
order_bys t_order_bys,
order_by_expr varchar2(32767),
row_count_column t_column_name );
c_empty_aggregation t_aggregation;
Vector Search Subtypes
subtype t_vector_search_type is pls_integer range 1..3;
c_vector_search_exact constant t_vector_search_type := 1;
c_vector_search_approx constant t_vector_search_type := 2;
c_vector_search_multi constant t_vector_search_type := 3;
--
subtype t_vector_distance_type is pls_integer range 1..6;
c_vector_distance_cosine constant t_vector_distance_type := 1;
c_vector_distance_dot constant t_vector_distance_type := 2;
c_vector_distance_euclidean constant t_vector_distance_type := 3;
c_vector_distance_eucl_squared constant t_vector_distance_type := 4;
c_vector_distance_hamming constant t_vector_distance_type := 5;
c_vector_distance_manhattan constant t_vector_distance_type := 6;
--
subtype t_vector_distance is varchar2(17);
c_vector_dist_str_cosine constant t_vector_distance := 'COSINE';
c_vector_dist_str_dot constant t_vector_distance := 'DOT';
c_vector_dist_str_euclidean constant t_vector_distance := 'EUCLIDEAN';
c_vector_dist_str_eucl_squared constant t_vector_distance := 'EUCLIDEAN_SQUARED';
c_vector_dist_str_hamming constant t_vector_distance := 'HAMMING';
c_vector_dist_str_manhattan constant t_vector_distance := 'MANHATTAN';
Parent topic: APEX_EXEC