Oracle OPG_APIS
Version 21c

General Information
Library Note Morgan's Library Page Header
ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling complimentary technical Workshops on Database Security for the first 30 Oracle Database customers located in North America that send an email to asra_us@oracle.com. Request a Workshop for your organization today.
Purpose Provides support for Graph Database Operations on property graphs in the Oracle Database.
Acronyms GE - Graph Edge
PG - Property Graph
PR - Page Rank
SP - Shortest Path
VT - Vertex
WKT - Well Known Text
AUTHID CURRENT_USER
Constants
Name Data Type Value
 Error Codes
ECODE_INVALID_NAME INTEGER -20900
ECODE_INVALID_NUM_PTNS INTEGER -20901
ECODE_INVALID_MARKER_TOO_LONG INTEGER -20902
ECODE_INVALID_ARGUMENT INTEGER -20903
ECODE_GET_LOCK INTEGER -20904
ECODE_RELEASE_LOCK INTEGER -20905
 Table Prefix
OPG_TMP_TAB_PREFIX VARCHAR2(200) 'opg_tmptab_'
Dependencies
DBMS_ASSERT OPG_LOG SDO_CS
DBMS_LOCK OPG_METRICS SDO_GEOMETRY
DBMS_STANDARD OPG_PATH SDO_POINT_TYPE
DBMS_STATS OPG_RANK SDO_UTIL
DBMS_UTILITY OPG_UTL T_VARCHAR2_ARRAY
OPG_GRAPHOP PLITBLM  
Documented Yes
First Available 19c
Pragmas PRAGMA SUPPLEMENTAL_LOG_DATA(default, NONE);
Security Model Owned by MDSYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/mdsys/admin/opgapih.sql
{ORACLE_HOME}/mdsys/admin/opgapih.plb
Subprograms
ADD_INDEX_METADATA_LUCENE END_FTSL GET_VERTEX_TAB_COL_DEF
ADD_INDEX_METADATA_ORATEXT ESTIMATE_TRIANGLE_RENUM GET_WKTGEOMETRY_FROM_V_COL
ADD_INDEX_METADATA_SOLRCLOUD EXP_EDGE_TAB_STATS GET_WKTGEOMETRY_FROM_V_T_COLS
ANALYZE_PG EXP_VERTEX_TAB_STATS GET_WORK_TAB_NAME_IF_EMPTY
CF FIND_CC_MAPPING_BASED GRANT_ACCESS
CF_CLEANUP FIND_CLUSTERS_CLEANUP IMP_EDGE_TAB_STATS
CF_PREP FIND_CLUSTERS_PREP IMP_VERTEX_TAB_STATS
CHECK_COL_TYPE FIND_SP LOCK_EDGES
CLEAR_PG FIND_SP_CLEANUP LOCK_INDEX_MATA
CLEAR_PG_INDICES FIND_SP_PREP LOCK_SKEL
CLEAR_TWOTABLES_GRAPH_TABLE FORMAT_NUM_FOR_SQL LOCK_VERTICES
CLONE_GRAPH GENERATE_GRAPH_TMP_WORK_TAB NOT_NULL_OR_EMPTY
COUNT_TRIANGLE GET_BUILD_ID PLAN_DONE
COUNT_TRIANGLE_CLEANUP GET_COMPRESS_STR PLAN_START
COUNT_TRIANGLE_PREP GET_EDGE_TAB_COL_DEF PR
COUNT_TRIANGLE_RENUM GET_ELAPSED_TIME PREPARE_TEXT_INDEX
CREATE_EDGES_TEXT_IDX GET_GEOMETRY_FROM_V_COL PROCESS_TRACE_SETTING
CREATE_PG GET_GEOMETRY_FROM_V_T_COLS PR_CLEANUP
CREATE_PG_SNAPSHOT_TAB GET_INT_IN_BRACKETS PR_PREP
CREATE_PG_TEXTIDX_TAB GET_LATLONG_FROM_V_COL RELEASE_LOCK
CREATE_STAT_TABLE GET_LATLONG_FROM_V_T_COLS RENAME_PG
CREATE_SUB_GRAPH GET_LOGLINE_HEADER REVOKE_ACCESS
CREATE_TWO_TABLES_EDGE GET_LONGLAT_FROM_V_COL SET_SESSION_PARAM
CREATE_TWO_TABLES_VERTEX GET_LONGLAT_FROM_V_T_COLS SHOW_PATH_BD
CREATE_VERTICES_TEXT_IDX GET_LONG_LAT_GEOMETRY SPARSIFY_GRAPH
CURRENTTIMEMILLIS GET_OPTION_VAL SPARSIFY_GRAPH_CLEANUP
DELETE_INDEX_METADATA GET_PARALLEL_CLAUSE_FOR_CTAS SPARSIFY_GRAPH_PREP
DELETE_INDEX_METADATA_KEY GET_PARTITIONS_LIST START_FTSL
DROP_EDGES_TEXT_IDX GET_SCN TRUNCATE_AND_DROP_IGNORE
DROP_ELEMENT_TEXT_IDX GET_SESSION_ID VALIDATE_NAME
DROP_PG GET_SPATIAL_PROPERTY_KEY VALIDATE_NON_GRAPHNAME
DROP_PG_VIEW GET_TMP_WORK_TAB_NAME VALIDATE_TAB_VIEW_NAME
DROP_VERTICES_TEXT_IDX GET_VERSION  
 
ADD_INDEX_METADATA_LUCENE
Adds the metadata information from an Apache Lucene Text index into the IT$ table opg_apis.add_index_metadata_lucene(
indexName    IN NVARCHAR2,
entityType   IN INT,
indexType    IN INT,
searchEngine IN INT,
dirType      IN INT,
location     IN NVARCHAR2,
strKey       IN NVARCHAR2,
numdirs      IN INT,
version      IN NVARCHAR2,
usedt        IN INT,
graph_owner  IN NVARCHAR2,
graph_name   IN NVARCHAR2);
TBD
 
ADD_INDEX_METADATA_ORATEXT
Adds the metadata information from an Oracle Text index into the IT$ table opg_apis.add_index_metadata_oratext(
indexName    IN NVARCHAR2,
entityType   IN INT,
indexType    IN INT,
searchEngine IN INT,
strKey       IN NVARCHAR2,
prefOwner    IN NVARCHAR2,
datastore    IN NVARCHAR2,
filter       IN NVARCHAR2,
storage      IN NVARCHAR2,
wordlist     IN NVARCHAR2,
stoplist     IN NVARCHAR2,
lexer        IN NVARCHAR2,
options      IN NVARCHAR2,
graph_owner  IN NVARCHAR2,
graph_name   IN NVARCHAR2);
TBD
 
ADD_INDEX_METADATA_SOLRCLOUD
Adds the metadata information from a SolrCloud Text index into the IT$ table opg_apis.add_index_metadata_solrcloud(
indexName     IN NVARCHAR2,
entityType    IN INT,
indexType     IN INT,
searchEngine  IN INT,
configName    IN NVARCHAR2,
solrServerUrl IN NVARCHAR2,
solrAdminUrl  IN NVARCHAR2,
zkTimeout     IN INT,
numShards     IN INT,
repFactor     IN INT,
maxShards     IN INT,
strKey        IN NVARCHAR2,
graph_owner   IN NVARCHAR2,
graph_name    IN NVARCHAR2);
TBD
 
ANALYZE_PG
Gathers statistics for the VT$, GE$, IT$, and GT$ tables from a graph

Overload 1
opg_apis.analyze_pg(
graph_name       IN VARCHAR2,
estimate_percent IN NUMBER,
method_opt       IN VARCHAR2,
degree           IN NUMBER,
cascade          IN BOOLEAN,
no_invalidate    IN BOOLEAN,
force            IN BOOLEAN DEFAULT FALSE);
TBD
Overload 2 opg_apis.analyze_pg(
graph_name       IN VARCHAR2,
estimate_percent IN NUMBER,
method_opt       IN VARCHAR2,
degree           IN NUMBER,
cascade          IN BOOLEAN,
no_invalidate    IN BOOLEAN,
force            IN BOOLEAN  DEFAULT FALSE,
options          IN VARCHAR2 DEFAULT 'GATHER');
TBD
Overload 3 opg_apis.analyze_pg(
graph_name       IN VARCHAR2,
degree           IN NUMBER,
cascade          IN BOOLEAN,
no_invalidate    IN BOOLEAN,
force            IN BOOLEAN  DEFAULT FALSE);
TBD
Overload 4 opg_apis.analyze_pg(
graph_name       IN VARCHAR2,
degree           IN NUMBER,
cascade          IN BOOLEAN,
no_invalidate    IN BOOLEAN,
force            IN BOOLEAN  DEFAULT FALSE,
options          IN VARCHAR2 DEFAULT 'GATHER');
TBD
 
CF
Runs collaborative filtering on a graph using matrix factorization opg_apis.cf(
edge_tab_name   IN     VARCHAR2,
edge_label      IN     VARCHAR2,
rating_property IN     VARCHAR2,
iterations      IN     INTEGER  DEFAULT 10,
min_error       IN     NUMBER   DEFAULT 0.001,
k               IN     INTEGER  DEFAULT 5,
learning_rate   IN     NUMBER   DEFAULT 0.0002,
decrease_rate   IN     NUMBER   DEFAULT 0.95,
regularization  IN     NUMBER   DEFAULT 0.02,
dop             IN     NUMBER   DEFAULT 8,
wt_l            IN OUT VARCHAR2,
wt_r            IN OUT VARCHAR2,
wt_l1           IN OUT VARCHAR2,
wt_r1           IN OUT VARCHAR2,
wt_i            IN OUT VARCHAR2,
wt_ld           IN OUT VARCHAR2,
wt_rd           IN OUT VARCHAR2,
tbs             IN     VARCHAR2 DEFAULT NULL,
options         IN     VARCHAR2 DEFAULT NULL);
TBD
 
CF_CLEANUP
Performs cleanup work after graph collaborative filtering is completed opg_apis.cf_cleanup(
edge_tab_name IN     VARCHAR2,
wt_l          IN OUT VARCHAR2,
wt_r          IN OUT VARCHAR2,
wt_l1         IN OUT VARCHAR2,
wt_r1         IN OUT VARCHAR2,
wt_i          IN OUT VARCHAR2,
wt_ld         IN OUT VARCHAR2,
wt_rd         IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
CF_PREP
Performs preparation work, including creating intermediate tables, for a later call to the OPG_APIS.CF opg_apis.cf_prep(
edge_tab_name IN     VARCHAR2,
wt_l          IN OUT VARCHAR2,
wt_r          IN OUT VARCHAR2,
wt_l1         IN OUT VARCHAR2,
wt_r1         IN OUT VARCHAR2,
wt_i          IN OUT VARCHAR2,
wt_ld         IN OUT VARCHAR2,
wt_rd         IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
CHECK_COL_TYPE
Validates the column type opg_apis.check_col_type(t IN VARCHAR2) RETURN VARCHAR2;
TBD
 
CLEAR_PG
Clears all data from a property graph opg_apis.clear_pg(graph_name IN VARCHAR2);
TBD
 
CLEAR_PG_INDICES
Removes all text index metadata in the IT$ table of the property graph opg_apis.clear_pg_indices(graph_name IN VARCHAR2);
TBD
 
CLEAR_TWOTABLES_GRAPH_TABLE
Clears the schema tables of a property graph opg_apis.clear_twotables_graph_table(table_name IN VARCHAR2);
TBD
 
CLONE_GRAPH
Makes a clone of the original graph, giving the new graph a new name opg_apis.clone_graph(
orgGraph      IN VARCHAR2,
newGraph      IN VARCHAR2,
dop           IN INTEGER  DEFAULT 4,
num_hash_ptns IN INTEGER  DEFAULT 8,
tbs           IN VARCHAR2 DEFAULT NULL,
options       IN VARCHAR2 DEFAULT NULL);
TBD
 
COUNT_TRIANGLE
Performs triangle counting in a property graph opg_apis.count_triangle(
edge_tab_name IN VARCHAR2,
wt_und        IN VARCHAR2,
num_sub_ptns  IN INTEGER  DEFAULT 1,
dop           IN INTEGER  DEFAULT 1,
tbs           IN VARCHAR2 DEFAULT NULL,
options       IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
 
COUNT_TRIANGLE_CLEANUP
Cleans up and drops the temporary working tables used for triangle counting opg_apis.count_triangle_cleanup(
edge_tab_name IN     VARCHAR2,
wt_undBM      IN OUT VARCHAR2,
wt_rnmap      IN OUT VARCHAR2,
wt_undAM      IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
COUNT_TRIANGLE_PREP
Prepares for running triangle counting opg_apis.count_triangle_prep(
edge_tab_name IN     VARCHAR2,
wt_undBM      IN OUT VARCHAR2,
wt_rnmap      IN OUT VARCHAR2,
wt_undAM      IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
COUNT_TRIANGLE_RENUM
Performs triangle counting with the optimization of reNUMBERing the vertices by their degree opg_apis.count_triangle_renum(
edge_tab_name IN VARCHAR2,
wt_undBM      IN VARCHAR2,
wt_rnmap      IN VARCHAR2,
wt_undAM      IN VARCHAR2,
num_sub_ptns  IN INTEGER  DEFAULT 1,
dop           IN INTEGER  DEFAULT 1,
tbs           IN VARCHAR2 DEFAULT NULL,
options       IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
 
CREATE_EDGES_TEXT_IDX
Creates a text index on a property graph edge table opg_apis.create_edges_text_idx(
graph_owner IN VARCHAR2,
graph_name  IN VARCHAR2,
pref_owner  IN VARCHAR2 DEFAULT NULL,
datastore   IN VARCHAR2 DEFAULT NULL,
filter      IN VARCHAR2 DEFAULT NULL,
storage     IN VARCHAR2 DEFAULT NULL,
wordlist    IN VARCHAR2 DEFAULT NULL,
stoplist    IN VARCHAR2 DEFAULT NULL,
lexer       IN VARCHAR2 DEFAULT NULL,
dop         IN INTEGER  DEFAULT NULL,
options     IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATE_PG
Creates the property graph schema tables required to store data about vertices, edges, text indexes, and snapshots

Overload 1
opg_apis.create_pg(
graph_name    IN VARCHAR2,
dop           IN INTEGER  DEFAULT NULL,
num_hash_ptns IN INTEGER  DEFAULT 8,
tbs           IN VARCHAR2 DEFAULT NULL,
options       IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 opg_apis.create_pg(
graph_owner   IN VARCHAR2,
graph_name    IN VARCHAR2,
dop           IN INTEGER  DEFAULT NULL,
num_hash_ptns IN INTEGER  DEFAULT 8,
tbs           IN VARCHAR2 DEFAULT NULL,
tbs_set       IN VARCHAR2 DEFAULT NULL,
options       IN VARCHAR2 DEFAULT NULL);
TBD
Overload 3 opg_apis.create_pg(
graph_owner   IN VARCHAR2,
graph_name    IN VARCHAR2,
dop           IN INTEGER  DEFAULT NULL,
num_hash_ptns IN INTEGER  DEFAULT 8,
tbs           IN VARCHAR2 DEFAULT NULL,
options       IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATE_PG_SNAPSHOT_TAB
Creates the property graph schema table (<graph_name>SS$) snapshot metadata

Overload 1
opg_apis.create_pg_snapshot_tab(
graph_name IN VARCHAR2,
dop        IN INTEGER  DEFAULT NULL,
tbs        IN VARCHAR2 DEFAULT NULL,
options    IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 opg_apis.create_pg_snapshot_tab(
graph_owner IN VARCHAR2,
graph_name  IN VARCHAR2,
dop         IN INTEGER  DEFAULT NULL,
tbs         IN VARCHAR2 DEFAULT NULL,
options     IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATE_PG_TEXTIDX_TAB
Creates the necessary property graph text index schema table (<graph_name>IT$) to store text index metadata

Overload 1
opg_apis.create_pg_textidx_tab(
graph_name IN VARCHAR2,
dop        IN INTEGER  DEFAULT NULL,
tbs        IN VARCHAR2 DEFAULT NULL,
options    IN VARCHAR2 DEFAULT NULL);
TBD
Overload 2 opg_apis.create_pg_textidx_tab(
graph_owner IN VARCHAR2,
graph_name  IN VARCHAR2,
dop         IN INTEGER  DEFAULT NULL,
tbs         IN VARCHAR2 DEFAULT NULL,
options     IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATE_STAT_TABLE
Creates a table to store property graph statistics opg_apis.create_stat_table(
stattab  IN VARCHAR2,
tblspace IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATE_SUB_GRAPH
Creates a subgraph, which is an expansion from a given vertex opg_apis.create_sub_graph(
graph_owner  IN VARCHAR2,
orgGraph     IN VARCHAR2,
newGraph     IN VARCHAR2,
nSrc         IN NUMBER,
depth        IN INTEGER,
dop          IN INTEGER  DEFAULT 4,
nPQThreshold IN INTEGER  DEFAULT 10000,
tbs          IN VARCHAR2 DEFAULT NULL,
options      IN VARCHAR2 DEFAULT NULL);
TBD
 
CREATE_TWO_TABLES_EDGE
Create the schema table for the two tables edge table

Overload 1
opg_apis.create_two_tables_edge(
table_owner    IN VARCHAR2,
table_name     IN VARCHAR2,
vid_colname    IN VARCHAR2,
property_names IN t_varchar2_array,
property_types IN t_varchar2_array,
tbs            IN VARCHAR2         DEFAULT NULL,
options        IN VARCHAR2         DEFAULT NULL);
TBD
Overload 2 opg_apis.create_two_tables_edge(
table_owner    IN VARCHAR2,
table_name     IN VARCHAR2,
property_names IN t_varchar2_array,
property_types IN t_varchar2_array,
tbs            IN VARCHAR2         DEFAULT NULL,
options        IN VARCHAR2         DEFAULT NULL);
TBD
Overload 3 opg_apis.create_two_tables_edge(
table_owner    IN VARCHAR2,
table_name     IN VARCHAR2,
eid_colname    IN VARCHAR2,
el_colname     IN VARCHAR2,
svid_colname   IN VARCHAR2,
dvid_colname   IN VARCHAR2,
property_names IN t_varchar2_array,
property_types IN t_varchar2_array,
tbs            IN VARCHAR2         DEFAULT NULL,
options        IN VARCHAR2         DEFAULT NULL);
TBD
Overload 4 opg_apis.create_two_tables_edge(
table_owner       IN VARCHAR2,
table_name        IN VARCHAR2,
eid_colname       IN VARCHAR2,
el_colname        IN VARCHAR2,
svid_colname      IN VARCHAR2,
dvid_colname      IN VARCHAR2,
vid_property_type IN VARCHAR2,
eid_property_type IN VARCHAR2,
property_names    IN t_varchar2_array,
property_types    IN t_varchar2_array,
tbs               IN VARCHAR2         DEFAULT NULL,
options           IN VARCHAR2         DEFAULT NULL);
TBD
 
CREATE_TWO_TABLES_VERTEX
Create the schema table for the two tables vertex table

Overload 1
opg_apis.create_two_tables_vertex(
table_owner    IN VARCHAR2,
table_name     IN VARCHAR2,
property_names IN t_varchar2_array,
property_types IN t_varchar2_array,
tbs            IN VARCHAR2          DEFAULT NULL,
options        IN VARCHAR2          DEFAULT NULL);
TBD
Overload 2 opg_apis.create_two_tables_vertex(
table_owner       IN VARCHAR2,
table_name        IN VARCHAR2,
vid_colname       IN VARCHAR2,
vid_property_type IN VARCHAR2,
property_names    IN t_varchar2_array,
property_types    IN t_varchar2_array,
tbs               IN VARCHAR2          DEFAULT NULL,
options           IN VARCHAR2          DEFAULT NULL);
TBD
Overload 3 opg_apis.create_two_tables_vertex(
table_owner       IN VARCHAR2,
table_name        IN VARCHAR2,
vid_colname       IN VARCHAR2,
property_names    IN t_varchar2_array,
property_types    IN t_varchar2_array,
tbs               IN VARCHAR2          DEFAULT NULL,
options           IN VARCHAR2          DEFAULT NULL);
TBD
 
CREATE_VERTICES_TEXT_IDX
Creates a text index on a property graph vertex table opg_apis.create_vertices_text_idx(
graph_owner IN VARCHAR2,
graph_name  IN VARCHAR2,
pref_owner  IN VARCHAR2 DEFAULT NULL,
datastore   IN VARCHAR2 DEFAULT NULL,
filter      IN VARCHAR2 DEFAULT NULL,
storage     IN VARCHAR2 DEFAULT NULL,
wordlist    IN VARCHAR2 DEFAULT NULL,
stoplist    IN VARCHAR2 DEFAULT NULL,
lexer       IN VARCHAR2 DEFAULT NULL,
dop         IN INTEGER  DEFAULT NULL,
options     IN VARCHAR2 DEFAULT NULL);
TBD
 
CURRENTTIMEMILLIS
Undocumented opg_apis.currenttimemillis RETURN NUMBER;
SELECT opg_apis.currenttimemillis
FROM dual;

CURRENTTIMEMILLIS
-----------------
1.6694E+12
 
DELETE_INDEX_METADATA
Deletes metadata information of the given Text index from the IT$ table opg_apis.delete_index_metadata(
indexName   IN NVARCHAR2,
graph_owner IN NVARCHAR2,
graph_name  IN NVARCHAR2);
TBD
 
DELETE_INDEX_METADATA_KEY
Deletes metadata information of the given Text index from the IT$ table opg_apis.delete_index_metadata_key(
indexName   IN NVARCHAR2,
strKey      IN NVARCHAR2,
graph_owner IN NVARCHAR2,
graph_name  IN NVARCHAR2);
TBD
 
DROP_EDGES_TEXT_IDX
Drops a text index on a property graph edge table opg_apis.drop_edges_text_idx(
graph_owner IN VARCHAR2,
graph_name  IN VARCHAR2,
options     IN VARCHAR2 DEFAULT NULL);
TBD
 
DROP_ELEMENT_TEXT_IDX
Drops a text index on a property graph table opg_apis.drop_element_text_idx(
element_type IN VARCHAR2,
graph_owner  IN VARCHAR2,
graph_name   IN VARCHAR2,
options      IN VARCHAR2 DEFAULT NULL);
TBD
 
DROP_PG
Deletes a property graph

Overload 1
opg_apis.drop_pg(graph_name IN VARCHAR2);
TBD
Overload 2 opg_apis.drop_pg(
graph_name IN VARCHAR2,
options    IN VARCHAR2);
TBD
 
DROP_PG_VIEW
Deletes the view definition of a property graph opg_apis.drop_pg_view(
graph_name IN VARCHAR2,
options    IN VARCHAR2);
TBD
 
DROP_VERTICES_TEXT_IDX
Drops a text index on a property graph vertex table opg_apis.drop_vertices_text_idx(
graph_owner IN VARCHAR2,
graph_name  IN VARCHAR2,
options     IN VARCHAR2 DEFAULT NULL);
TBD
 
END_FTSL
Turn off force tmp segment loads opg_apis.end_ftsl;
exec opg_apis.end_ftsl;

PL/SQL procedure successfully completed.
 
ESTIMATE_TRIANGLE_RENUM
Estimates the number of triangles in a property graph opg_apis.estimate_triangle_renum(
edge_tab_name IN VARCHAR2,
wt_undBM      IN VARCHAR2,
wt_rnmap      IN VARCHAR2,
wt_undAM      IN VARCHAR2,
num_sub_ptns  IN INTEGER  DEFAULT 1,
chunk_id      IN INTEGER  DEFAULT 1,
dop           IN INTEGER  DEFAULT 1,
tbs           IN VARCHAR2 DEFAULT NULL,
options       IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
 
EXP_EDGE_TAB_STATS
Retrieves statistics for the edge table of a given property graph and stores them in the user-created statistics table opg_apis.exp_edge_tab_stats(
graph_name    IN VARCHAR2,
stattab       IN VARCHAR2,
statid        IN VARCHAR2 DEFAULT NULL,
cascade       IN BOOLEAN  DEFAULT TRUE,
statown       IN VARCHAR2 DEFAULT NULL,
stat_category IN VARCHAR2 DEFAULT 'OBJECT_STATS');
TBD
 
EXP_VERTEX_TAB_STATS
Retrieves statistics for the vertex table of a given property graph and stores them in the user-created statistics table opg_apis.exp_vertex_tab_stats(
graph_name    IN VARCHAR2,
stattab       IN VARCHAR2,
statid        IN VARCHAR2 DEFAULT NULL,
cascade       IN BOOLEAN  DEFAULT TRUE,
statown       IN VARCHAR2 DEFAULT NULL,
stat_category IN VARCHAR2 DEFAULT 'OBJECT_STATS'
TBD
 
FIND_CC_MAPPING_BASED
Finds connected components in a property graph and stores them in the wt_clusters table opg_apis.find_cc_mapping_based(
edge_tab_name IN     VARCHAR2,
wt_clusters   IN OUT VARCHAR2,
wt_undir      IN OUT VARCHAR2,
wt_cluas      IN OUT VARCHAR2,
wt_newas      IN OUT VARCHAR2,
wt_delta      IN OUT VARCHAR2,
dop           IN     INTEGER  DEFAULT 4,
rounds        IN     INTEGER  DEFAULT 0, -- continue until all components found
tbs           IN     VARCHAR2 DEFAULT NULL,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
FIND_CLUSTERS_CLEANUP
Cleans up after running weakly connected components (WCC) cluster detection opg_apis.find_clusters_cleanup(
edge_tab_name IN     VARCHAR2,
wt_clusters   IN OUT VARCHAR2,
wt_undir      IN OUT VARCHAR2,
wt_cluas      IN OUT VARCHAR2,
wt_newas      IN OUT VARCHAR2,
wt_delta      IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
FIND_CLUSTERS_PREP
Prepares for running weakly connected components (WCC) cluster detection opg_apis.find_clusters_prep(
edge_tab_name IN     VARCHAR2,
wt_clusters   IN OUT VARCHAR2,
wt_undir      IN OUT VARCHAR2,
wt_cluas      IN OUT VARCHAR2,
wt_newas      IN OUT VARCHAR2,
wt_delta      IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
FIND_SP
Finds the shortest path between given source vertex and destination vertex in the property graph opg_apis.find_sp(
edge_tab_name  IN  VARCHAR2,
source         IN  NUMBER,
dest           IN  NUMBER,
exp_tab        IN  VARCHAR2,
dop            IN  INTEGER,
stats_freq     IN  INTEGER  DEFAULT 20000,
path_output    OUT VARCHAR2,
weights_output OUT VARCHAR2,
options        IN  VARCHAR2 DEFAULT NULL,
scn            IN  NUMBER   DEFAULT NULL);
TBD
 
FIND_SP_CLEANUP
Cleans up after running one or more shortest path calculations opg_apis.find_sp_cleanup(
edge_tab_name IN     VARCHAR2,
exp_tab       IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
FIND_SP_PREP
Prepares for shortest path calculations opg_apis.find_sp_prep(
edge_tab_name IN     VARCHAR2,
exp_tab       IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
FORMAT_NUM_FOR_SQL
This function formats 1.2 as 1.2, 1,2 (in certain NLS_LANG) as 1.2 opg_apis.format_num_for_sql(n IN NUMBER) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE;;
SELECT opg_apis.format_num_for_sql(4.2)
FROM dual;

OPG_APIS.FORMAT_NUM_FOR_SQL(4.2)
--------------------------------
4.2
 
GENERATE_GRAPH_TMP_WORK_TAB
Returns a unique name that can be used to create an intermediate working table opg_apis.generate_graph_tmp_work_tab(
graph  IN VARCHAR2,
marker IN VARCHAR2 DEFAULT '$TW')
RETURN VARCHAR2;
TBD
 
GET_BUILD_ID
Returns the build ID of the Oracle Spatial and Graph property graph support, in YYYYMMDD format opg_apis.get_build_id RETURN VARCHAR2;
SELECT opg_apis.get_build_id
FROM dual;

GET_BUILD_ID
-------------
20180710
 
GET_COMPRESS_STR
Undocumented opg_apis.get_compress_str(options IN VARCHAR2) RETURN VARCHAR2;
TBD
 
GET_EDGE_TAB_COL_DEF
helper function getS the column definitions in case one needs to create GE$ opg_apis.get_edge_tab_col_def RETURN VARCHAR2;
TBD
 
GET_ELAPSED_TIME
Undocumented opg_apis.get_elapsed_time(
vcTimeSec        OUT VARCHAR2,
tsCurrent        OUT TIMESTAMP,
m_tsStartTime IN OUT TIMESTAMP);
TBD
 
GET_GEOMETRY_FROM_V_COL
Returns an SDO_GEOMETRY object constructed using spatial data and optionally an SRID value opg_apis.get_geometry_from_v_col(
v    IN NVARCHAR2,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_GEOMETRY_FROM_V_T_COLS
Returns an SDO_GEOMETRY object constructed using spatial data, a type value, and optionally an SRID value opg_apis.get_geometry_from_v_t_cols(
v    IN NVARCHAR2,
t    IN INT,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_INT_IN_BRACKETS
helper function to get the column definitions in case one needs to  create VT$ or GE$ opg_apis.get_int_in_brackets(
t IN VARCHAR2,
d IN INTEGER)
RETURN INTEGER;
TBD
 
GET_LATLONG_FROM_V_COL
Returns an SDO_GEOMETRY object constructed using spatial data and optionally an SRID value opg_apis.get_latlong_from_v_col(
v    IN NVARCHAR2,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_LATLONG_FROM_V_T_COLS
Returns an SDO_GEOMETRY object constructed using spatial data, a type value, and optionally an SRID value opg_apis.get_latlong_from_v_t_cols(
v    IN NVARCHAR2,
t    IN INT,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_LOGLINE_HEADER
Undocumented opg_apis.get_logline_header(m_tsStartTime IN OUT TIMESTAMP) RETURN VARCHAR2;
TBD
 
ET_LONGLAT_FROM_V_COL
Returns an SDO_GEOMETRY object constructed using spatial data, a type value, and optionally anSRID value opg_apis.get_longlat_from_v_col(
v    IN NVARCHAR2,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_LONGLAT_FROM_V_T_COLS
Returns an SDO_GEOMETRY object constructed using spatial data, a type value, and optionally an SRID value opg_apis.get_longlat_from_v_t_cols(
v    IN NVARCHAR2,
t    IN INT,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_LONG_LAT_GEOMETRY
Returns an SDO_GEOMETRY object constructed using X and Y point coordinate values, and optionally an SRID value opg_apis.get_long_lat_geometry(
x    IN NUMBER,
y    IN NUMBER,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_OPTION_VAL
Undocumented opg_apis.get_option_val(
options IN VARCHAR2,
optName IN VARCHAR2      /* should not include '=' */,
defVal  IN VARCHAR2      /* either 'T' or 'F', or NULL */)
RETURN BOOLEAN;
TBD
 
GET_PARALLEL_CLAUSE_FOR_CTAS
Returns a string in the form of "parallel dop" that can be used in a CTAS statement opg_apis.get_parallel_clause_for_ctas(dop IN INTEGER) RETURN VARCHAR2;
TBD
 
GET_PARTITIONS_LIST
Returns a partition list clause opg_apis.get_partitions_list(
num_hash_ptns IN INTEGER,
bShardingDb   IN BOOLEAN DEFAULT FALSE)
RETURN VARCHAR2;
TBD
 
GET_SCN
Returns the current System Change Number: The online documentation is incorrect. opg_apis.get_scn RETURN NUMBER
SELECT mdsys.opg_apis.get_scn
FROM dual;

   GET_SCN
----------
 111700386

SELECT mdsys.opg_apis.get_scn
FROM dual;

   GET_SCN
----------
 111700502
 
GET_SESSION_ID
Returns the Identifier of the current session opg_apis.get_session_id RETURN VARCHAR2;
SELECT opg_apis.get_session_id
FROM dual;

GET_SESSION_ID
---------------
192
 
GET_SPATIAL_PROPERTY_KEY
Undocumented opg_apis.get_spatial_property_key RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_TMP_WORK_TAB_NAME
Undocumented opg_apis.get_tmp_work_tab_name(marker IN VARCHAR2) RETURN VARCHAR2;
TBD
 
GET_VERSION
Returns the current version of the Oracle Spatial and Graph property graph support opg_apis.get_version RETURN VARCHAR2;
SELECT opg_apis.get_version
FROM dual;

GET_VERSION
------------
19.1.0.1 P1
 
GET_VERTEX_TAB_COL_DEF
helper function getS the column definitions in case one needs to create VT$ opg_apis.get_vertex_tab_col_def RETURN VARCHAR2;
SELECT opg_apis.get_vertex_tab_col_def
FROM dual;

GET_VERTEX_TAB_COL_DEF
----------------------------
VID number not null,
 VL nvarchar2(3100),
  K nvarchar2(3100),
  T integer,
  V nvarchar2(15000),
 VN number,
 VT timestamp with time zone,
 SL number,
VTS date,
VTE date,
 FE nvarchar2(4000)
 
GET_WKTGEOMETRY_FROM_V_COL
Returns an SDO_GEOMETRY object based on a geometry in WKT form and optionally an SRID opg_apis.get_wktgeometry_from_v_col(
v    IN NVARCHAR2,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DEGTERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_WKTGEOMETRY_FROM_V_T_COLS
Returns an SDO_GEOMETRY object based on a geometry in WKT (well known text) form, a type value, and optionally an SRID opg_apis.get_wktgeometry_from_v_t_cols(
v    IN NVARCHAR2,
t    IN INT,
srid IN NUMBER DEFAULT 8307)
RETURN mdsys.sdo_geometry DETERMINISTIC PARALLEL_ENABLE;
TBD
 
GET_WORK_TAB_NAME_IF_EMPTY
Undocumented opg_apis.get_work_tab_name_if_empty(
graph_name     IN VARCHAR2,
input_tab_name IN VARCHAR2,
marker         IN VARCHAR2 DEFAULT '$TW')
RETURN VARCHAR2;
TBD
 
GRANT_ACCESS
Grants access privileges on a property graph to another database user -- The privilege argument can contain a mix of 'R', 'S', 'I', 'D', or 'U' (Read, Select, Insert, Delete, and Update)

opg_apis.grant_access(
graph_owner IN VARCHAR2,
graph_name  IN VARCHAR2,
other_user  IN VARCHAR2,
privilege   IN VARCHAR2);
TBD
 
IMP_EDGE_TAB_STATS
Retrieves graph edge table (GE$) statistics from the user statistics table identified by stattab and stores them in the dictionary imported opg_apis.imp_edge_tab_stats(
graph_name    IN VARCHAR2,
stattab       IN VARCHAR2,
statid        IN VARCHAR2 DEFAULT NULL,
cascade       IN BOOLEAN  DEFAULT TRUE,
statown       IN VARCHAR2 DEFAULT NULL,
no_invalidate IN BOOLEAN  DEFAULT FALSE,
force         IN BOOLEAN  DEFAULT FALSE,
stat_category IN VARCHAR2 DEFAULT 'OBJECT_STATS');
TBD
 
IMP_VERTEX_TAB_STATS
Retrieves graph edge table (VT$) statistics from the user statistics table identified by stattab and stores them in the dictionary imported opg_apis.imp_vertex_tab_stats(
graph_name    IN VARCHAR2,
stattab       IN VARCHAR2,
statid        IN VARCHAR2 DEFAULT NULL,
cascade       IN BOOLEAN  DEFAULT TRUE,
statown       IN VARCHAR2 DEFAULT NULL,
no_invalidate IN BOOLEAN  DEFAULT FALSE,
force         IN BOOLEAN  DEFAULT FALSE,
stat_category IN VARCHAR2 DEFAULT 'OBJECT_STATS');
TBD
 
LOCK_EDGES
Undocumented opg_apis.lock_edges(
graph_owner IN  VARCHAR2,
graph_name  IN  VARCHAR2,
lockmode    IN  INT,
lockhandle  OUT VARCHAR2,
wait        IN  BOOLEAN,
txndur      IN  BOOLEAN DEFAULT TRUE)
RETURN INT;
TBD
 
LOCK_INDEX_MATA
Undocumented opg_apis.lock_index_mata(
graph_owner IN  VARCHAR2,
graph_name  IN  VARCHAR2,
lockmode    IN  INT,
lockhandle  OUT VARCHAR2,
wait        IN  BOOLEAN,
txndur      IN  BOOLEAN DEFAULT TRUE)
RETURN INT;
TBD
 
LOCK_SKEL
Undocumented opg_apis.lock_skel(
graph_owner IN  VARCHAR2,
graph_name  IN  VARCHAR2,
lockmode    IN  INT,
lockhandle  OUT VARCHAR2,
wait        IN  BOOLEAN,
txndur      IN  BOOLEAN DEFAULT TRUE)
RETURN INT;
TBD
 
LOCK_VERTICES
Undocumented opg_apis.lock_vertices(
graph_owner IN  VARCHAR2,
graph_name  IN  VARCHAR2,
lockmode    IN  INT,
lockhandle  OUT VARCHAR2,
wait        IN  BOOLEAN,
txndur      IN  BOOLEAN DEFAULT TRUE)
RETURN INT;
TBD
 
NOT_NULL_OR_EMPTY
The documentation in the rdbms/admin file is the reverse of how the function works opg_apis.not_NULL_or_empty(s IN VARCHAR2) RETURN BOOLEAN;
DECLARE
 testVar dbms_id;
BEGIN
  IF opg_apis.not_NULL_or_empty(testVar) THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;

  testVar := 'Morgan''s Library';
  IF opg_apis.not_NULL_or_empty(testVar) THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F
T

PL/SQL procedure successfully completed.
 
PLAN_DONE
Undocumented opg_apis.plan_done(
bPerfTuning IN     BOOLEAN,
nStartTime  IN OUT NUMBER,
nEndTime    IN OUT NUMBER);
TBD
 
PLAN_START
Undocumented opg_apis.plan_start(
bPerfTuning IN     BOOLEAN,
nStartTime  IN OUT NUMBER,
nEndTime    IN OUT NUMBER);
TBD
 
PR
Prepares for page rank calculations opg_apis.pr(
edge_tab_name   IN     VARCHAR2,
d               IN     NUMBER  DEFAULT 0.85,
num_iterations  IN     NUMBER  DEFAULT 10,
convergence     IN     NUMBER  DEFAULT 0.1,
dop             IN     INTEGER DEFAULT 4,
wt_node_pr      IN OUT VARCHAR2,
wt_node_nextpr  IN OUT VARCHAR2,
wt_edge_tab_deg IN OUT VARCHAR2,
wt_delta        IN OUT VARCHAR2,
tablespace      IN     VARCHAR2 DEFAULT NULL,
options         IN     VARCHAR2 DEFAULT NULL,
num_vertices       OUT NUMBER);
TBD
 
PREPARE_TEXT_INDEX
Performs preparatory work needed before a text index can be created on any NVARCHAR2 columns opg_apis.prepare_text_index;
exec opg_apis.prepare_text_index;

PL/SQL procedure successfully completed.
 
PROCESS_TRACE_SETTING
Trace setting configuration opg_apis.process_trace_setting(options IN VARCHAR2);
TBD
 
PR_CLEANUP
Performs cleanup after performing page rank calculations opg_apis.pr_cleanup(
edge_tab_name   IN     VARCHAR2,
wt_node_pr      IN OUT VARCHAR2,
wt_node_nextpr  IN OUT VARCHAR2,
wt_edge_tab_deg IN OUT VARCHAR2,
wt_delta        IN OUT VARCHAR2,
options         IN     VARCHAR2 DEFAULT NULL);
TBD
 
PR_PREP
Prepares for page rank calculations opg_apis.pr_prep(
edge_tab_name   IN     VARCHAR2,
wt_node_pr      IN OUT VARCHAR2,
wt_node_nextpr  IN OUT VARCHAR2,
wt_edge_tab_deg IN OUT VARCHAR2,
wt_delta        IN OUT VARCHAR2,
options         IN     VARCHAR2 DEFAULT NULL);
TBD
 
RELEASE_LOCK
Undocumented opg_apis.release_lock(lockhandle IN INT);
TBD
 
RENAME_PG
Renames a property graph opg_apis.rename_pg(
graph_name     IN VARCHAR2,
new_graph_name IN VARCHAR2);
TBD
 
REVOKE_ACCESS
Revokes access to a property graph from another user opg_apis.revoke_access(
graph_owner IN VARCHAR2,
graph_name  IN VARCHAR2,
other_user  IN VARCHAR2,
privilege   IN VARCHAR2);
TBD
 
SET_SESSION_PARAM
Sets session parameters opg_apis.set_session_param(
param_name IN VARCHAR2,
value      IN BOOLEAN);
TBD
 
SHOW_PATH_BD
Undocumented opg_apis.show_path_bd(
node    IN  NUMBER,
src     IN  NUMBER,
dest    IN  NUMBER,
expTab  IN  VARCHAR2,
weights OUT VARCHAR2)
RETURN VARCHAR2;
TBD
 
SPARSIFY_GRAPH
Performs sparsification (edge trimming) for a property graph edge table opg_apis.sparsify_graph(
edge_tab_name IN     VARCHAR2,
threshold     IN     NUMBER  DEFAULT 0.5,
min_keep      IN     INTEGER DEFAULT 1,
dop           IN     INTEGER DEFAULT 4,
wt_out_tab    IN OUT VARCHAR2,
wt_und_tab    IN OUT VARCHAR2,
wt_hsh_tab    IN OUT VARCHAR2,
wt_mch_tab    IN OUT VARCHAR2,
tbs           IN     VARCHAR2 DEFAULT NULL,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
SPARSIFY_GRAPH_CLEANUP
Cleans up after sparsification (edge trimming) for a property graph edge table opg_apis.sparsify_graph_cleanup(
edge_tab_name IN     VARCHAR2,
wt_out_tab    IN OUT VARCHAR2,
wt_und_tab    IN OUT VARCHAR2,
wt_hsh_tab    IN OUT VARCHAR2,
wt_mch_tab    IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
SPARSIFY_GRAPH_PREP
Prepares working table names that are necessary to run sparsification for a property graph edge table opg_apis.sparsify_graph_prep(
edge_tab_name IN     VARCHAR2,
wt_out_tab    IN OUT VARCHAR2,
wt_und_tab    IN OUT VARCHAR2,
wt_hsh_tab    IN OUT VARCHAR2,
wt_mch_tab    IN OUT VARCHAR2,
options       IN     VARCHAR2 DEFAULT NULL);
TBD
 
START_FTSL
Undocumented opg_apis.start_ftsl;
exec opg_apis.start_ftsl;

PL/SQL procedure successfully completed.
 
TRUNCATE_AND_DROP_IGNORE
Undocumented opg_apis.truncate_and_drop_ignore(
tname    IN VARCHAR2,
err_code IN NUMBER);
TBD
 
VALIDATE_NAME
Undocumented opg_apis.validate_name(s IN VARCHAR2) RETURN VARCHAR2;
TBD
 
VALIDATE_NON_GRAPHNAME
Validates the name of a tablespace, user, column, etc. opg_apis.validate_non_graphname(s IN VARCHAR2) RETURN VARCHAR2;
TBD
 
VALIDATE_TAB_VIEW_NAME
Returns a safe name for the given name of a table or a view opg_apis.validate_tab_view_name(s IN VARCHAR2) RETURN VARCHAR2;
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
OPG_GRAPHOP
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-2022 Daniel A. Morgan All Rights Reserved
  DBSecWorx