public class OraclePropertyGraph extends OraclePropertyGraphBase implements OraclePropertyGraphAnalytics, OracleChangeTracker
Modifier and Type | Class and Description |
---|---|
static class |
OraclePropertyGraph.Sort
This enumeration denotes the sorting order for function getTopK
|
OraclePropertyGraphBase.OptimizationFlag
TransactionalGraph.Conclusion
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_NUMBER_FORMAT
This constant denotes the default number format used in SQL Statements
|
static String |
DEFAULT_TIME_FORMAT
This constant denotes the default datetime format used in SQL Statements
|
CSV_DATE_TIME_FORMATS, CSV_DT_KEYWORD_BOOLEAN, CSV_DT_KEYWORD_BYTE, CSV_DT_KEYWORD_CHAR, CSV_DT_KEYWORD_DATE, CSV_DT_KEYWORD_DOUBLE, CSV_DT_KEYWORD_FLOAT, CSV_DT_KEYWORD_INTEGER, CSV_DT_KEYWORD_JSON, CSV_DT_KEYWORD_LONG, CSV_DT_KEYWORD_RDF, CSV_DT_KEYWORD_SHORT, CSV_DT_KEYWORD_SPATIAL, CSV_DT_KEYWORD_STRING, OPG_DATETIME_FORMAT, TYPE_DT_BOOL, TYPE_DT_BYTE, TYPE_DT_CHAR, TYPE_DT_DATE, TYPE_DT_DOUBLE, TYPE_DT_EMPTY, TYPE_DT_FLOAT, TYPE_DT_INTEGER, TYPE_DT_JSON, TYPE_DT_LONG, TYPE_DT_SERI, TYPE_DT_SHORT, TYPE_DT_SPATIAL, TYPE_DT_STRING, TYPE_DT_URI
ERR_ARG_CANNOT_BE_NULL, ERR_CODE_NOT_IN_LIST, ERR_DOP_CONSTRAINT, ERR_E_AUTO_IDX_MUST_SOLR_OR_LUCENE, ERR_E_AUTO_IDX_NOT_EXIST, ERR_E_DS_MUSTBE_FILE_OR_IS, ERR_E_MAX_LINE_CONSTRAINT, ERR_EDGE_DIR_NOT_BOTH, ERR_EDGE_WORK_TBL_NOT_CLEAN, ERR_GRAPH_NAME_CANT_BENULL, ERR_HIT_EXCEPTION, ERR_HIT_INTERRUPT, ERR_HIT_IO, ERR_HIT_OPGE, ERR_HIT_PARSEE, ERR_ID_CANNOT_BE_NULL, ERR_IDX_KEY_CANNOT_BE_NULL, ERR_IDX_KEY_NOT_NULL, ERR_IDX_KEYS_NOT_NULL, ERR_IN_DS_EDGE_CANTBE_NULL, ERR_IN_DS_VERT_CANTBE_NULL, ERR_IN_E_FLAT_DOESNT_EXIST, ERR_IN_V_FLAT_DOESNT_EXIST, ERR_INPUT_LIST_NOT_NULL, ERR_INPUT_NOT_NULL, ERR_INVALID_CHANGE_ACTION, ERR_INVALID_NUM_FIELDS, ERR_INVALID_NUM_NOARG, ERR_INVALID_NUMBER, ERR_INVALID_VAL, ERR_KEY_CANNOT_BE_ID, ERR_KEY_CANNOT_BE_NULL, ERR_KEY_CANNOT_BE_NULL_EMPTY, ERR_KEY_NOT_SET_TO, ERR_NO_ELEM_TO_BE_CONSUMED, ERR_NO_OP_SUPPORTED, ERR_NOT_IMPLEMENTED_YET, ERR_NOT_ORACLE_V_E, ERR_NUM_PART_CONSTRAINT, ERR_OFFSET_CONSTRAINT, ERR_OFFSET_E_MUST_BE_POS, ERR_OFFSET_V_MUST_BE_POS, ERR_OPT_FLAG_EDGE_INVALID, ERR_OPT_FLAG_VERT_INVALID, ERR_ORA_TEXT_INVALID_KEY, ERR_ORA_TEXT_ONLY_AUTO, ERR_OUTPUT_LIST_NOT_NULL, ERR_PG_ALREADY_EXISTS, ERR_PG_NOT_EMPTY, ERR_PG_NOT_NULL, ERR_SIZE_MUST_BE_POS, ERR_TIMEOUT_TAB_CREATION, ERR_TXT_IDX_NOT_FOUND, ERR_TYPE_ID_NOT_RECO, ERR_UNSUPPORTED_VAL_TYP, ERR_USER_REQ_OP_CANCEL, ERR_V_AUTO_IDX_MUST_SOLR_OR_LUCENE, ERR_V_AUTO_IDX_NOT_EXIST, ERR_V_DS_MUSTBE_FILE_OR_IS, ERR_V_MAX_LINE_CONSTRAINT, ERR_VALUE_CANNOT_BE_NULL, INFO_EMP_K_NO_P_VAL, INFO_NUL_K_NO_P_VAL
Modifier and Type | Method and Description |
---|---|
void |
addAttributeToAllEdges(EdgeOpCallback eoc,
boolean skipStoreToCache,
int dop,
ProgressListener pl)
Adds an attribute to all edges based on the specified
EdgeOpCallback . |
void |
addAttributeToAllVertices(VertexOpCallback voc,
boolean skipStoreToCache,
int dop,
ProgressListener pl)
Adds an attribute to all vertices based on the specified
VertexOpCallback . |
Edge |
addEdge(Object id,
Vertex outVertex,
Vertex inVertex,
String label)
Adds an edge to the graph instance.
|
Vertex |
addVertex(Object id)
Adds an vertex to the graph instance.
|
void |
analyze(float estimatePercent,
String methodOpt)
Collects statistics for this graph.
|
void |
analyze(float estimatePercent,
String methodOpt,
int dop)
Collects statistics for this graph.
|
void |
analyze(int dop)
Collects statistics for this graph.
|
void |
analyzeAuto(int dop)
Collects statistics for this graph.
|
void |
clearCache()
Clears the internal Vertex and Edge cache.
|
void |
clearRepository()
Removes all vertices and edges from this property graph instance.
|
void |
clearUpdateQueue()
Clears the update action queue.
|
void |
commit()
Commit changes done to this property graph instance.
|
void |
commit(boolean bCommitIndices)
Commit changes done to this property graph instance.
|
long |
countEdges(int dop,
ProgressListener pll)
Counts all edges using parallel scans and the specified DOP.
|
static long |
countTriangle(Connection conn,
String szEdgeTabName,
StringBuilder sbUndirWorkTab,
int iNumSubPtns,
int iDOP,
String szTBS,
String szOptions)
Returns the number of triangles that exist
in this graph.
|
long |
countTriangle(StringBuilder sbUndirWorkTab)
Returns the number of triangles that exist
in this graph which is treated as undirected.
|
long |
countTriangle(StringBuilder sbUndirWorkTab,
int iNumSubPtns,
int iDOP,
String szTBS,
String szOptions)
Returns the number of triangles that exist
in this graph.
|
void |
countTriangleCleanup(StringBuilder sbUndirBMTab,
StringBuilder sbMapWorkTab,
StringBuilder sbUndirAMTab,
String szOptions)
This method does cleanup work after running triangle calculations.
|
void |
countTrianglePrep(StringBuilder sbUndirBMTab,
StringBuilder sbMapWorkTab,
StringBuilder sbUndirAMTab,
String szOptions)
This method does preparation work before running triangle calculations.
|
static long |
countTriangleRenum(Connection conn,
String szEdgeTabName,
StringBuilder sbUndirBMTab,
StringBuilder sbMapWorkTab,
StringBuilder sbUndirAMTab,
int iNumSubPtns,
int iDOP,
String szTBS,
String szOptions)
Returns the number of triangles that exist
in this graph (treated as undirected).
|
long |
countTriangleRenum(StringBuilder sbUndirBMTab,
StringBuilder sbMapWorkTab,
StringBuilder sbUndirAMTab,
int iNumSubPtns,
int iDOP,
String szTBS,
String szOptions)
Returns the number of triangles that exist
in this graph (treated as undirected).
|
long |
countVertices(int dop,
ProgressListener pll)
Counts all vertices using parallel scan with dop threads
|
void |
createDefaultSpatialIndexOnEdges(int dop)
This API creates a default Spatial index on edges.
|
void |
createDefaultSpatialIndexOnEdges(int dop,
boolean bLocal,
boolean bUseV2)
This API creates a default Spatial index on edges.
|
void |
createDefaultSpatialIndexOnVertices(int dop)
This API creates a default Spatial index on vertices.
|
void |
createDefaultSpatialIndexOnVertices(int dop,
boolean bLocal,
boolean bUseV2)
This API creates a default Spatial index on vertices.
|
void |
createStatTable(String statTableName)
Creates a stat table using DBMS_STATS package.
|
void |
disable()
Disables the session flash back.
|
List<String> |
disableEdgeTableConstraints()
Disables all the database constraints of the edge table.
|
List<String> |
disableEdgeTableIndices()
Disables all database indices of the edge table.
|
List<String> |
disableVertexTableConstraints()
Disables all the database constraints of the vertex table.
|
List<String> |
disableVertexTableIndices()
Disables all database indices of the vertex table
|
void |
dispose()
Closes the graph without commiting any changes
|
boolean |
doesEdgeExistAt(String szEdgeID,
Long longEndSCN)
Returns TRUE if the edge identified by the given edge ID
exist at SCN denoted by the end scn
|
boolean |
doesEdgeExistAt(String szEdgeID,
Long longEndSCN,
int iQueryDOP)
Returns TRUE if the edge identified by the given edge ID
exist at SCN denoted by the end scn
|
boolean |
doesVertexExistAt(String szVertexID,
Long longEndSCN)
Returns TRUE if the vertex identified by the given vertex ID
exist at SCN denoted by the end scn
|
boolean |
doesVertexExistAt(String szVertexID,
Long longEndSCN,
int iQueryDOP)
Returns TRUE if the vertex identified by the given vertex ID
exist at SCN denoted by the end scn
|
void |
dropDefaultSpatialIndexOnEdges()
This API drops the default Spatial index on edges.
|
void |
dropDefaultSpatialIndexOnVertices()
This API drops the default Spatial index on vertices.
|
void |
enableAtSCN(Long longSCN)
Sets the session snapshot to the given SCN value
|
static long |
estimateTriangleRenum(Connection conn,
String szEdgeTabName,
StringBuilder sbUndirBMTab,
StringBuilder sbMapWorkTab,
StringBuilder sbUndirAMTab,
int iNumSubPtns,
int iChunk,
int iDOP,
String szTBS,
String szOptions)
This method estimates the number of triangles that exist
in this graph (treated as undirected).
|
long |
estimateTriangleRenum(StringBuilder sbUndirBMTab,
StringBuilder sbMapWorkTab,
StringBuilder sbUndirAMTab,
int iNumSubPtns,
int iChunk,
int iDOP,
String szTBS,
String szOptions)
This method estimates the number of triangles that exist
in this graph (treated as undirected).
|
void |
expEdgeStat(String statTableName,
String statid)
Exports the edge table statistics into the given stat table.
|
void |
expVertexStat(String statTableName,
String statid)
Exports the vertex table statistics into the given stat table.
|
static void |
findCluster(Connection conn,
String szEdgeTabName,
StringBuilder sbClusters,
StringBuilder sbUndir,
StringBuilder sbCluas,
StringBuilder sbNewas,
StringBuilder sbDelta,
int iDOP,
String szTBS,
String szOptions)
This method finds clusters in a given graph (treated as undirected).
|
void |
findCluster(StringBuilder sbClusters,
StringBuilder sbUndir,
StringBuilder sbCluas,
StringBuilder sbNewas,
StringBuilder sbDelta,
int iDOP,
String szTBS,
String szOptions)
This method finds clusters in this property graph (treated as undirected).
|
void |
findClusterCleanup(StringBuilder sbClusters,
StringBuilder sbUndir,
StringBuilder sbCluas,
StringBuilder sbNewas,
StringBuilder sbDelta,
String szOptions)
This method does cleanup work after running graph cluster detection.
|
void |
findClusterPrep(StringBuilder sbClusters,
StringBuilder sbUndir,
StringBuilder sbCluas,
StringBuilder sbNewas,
StringBuilder sbDelta,
String szOptions)
This method does preparation work before running graph cluster detection.
|
LinkedList<String> |
getConstraintNames(String szTabName)
Gets a List of all the database constraints associated to the given table.
|
Long |
getCurrentSCN()
Returns the current SCN by invoking DBMS FLASHBACK API.
|
Long |
getCurrentSCNUnsafe()
Returns the current SCN by invoking DBMS FLASHBACK API.
|
Class |
getDatatypeClassFromValueObjForTextIndex(Object value)
Gets the datatype class from the given value object used when
executing a query over a text index
|
int |
getDefaultDOPPerPtn()
Returns the default DOP used for partition-wise scan
|
OracleEdge |
getEdge(Object id)
Returns the edge referenced by the object identifier.
|
Iterator<EdgeChange> |
getEdgeChanges(Long longStartSCN,
Long longEndSCN)
Returns the changes between the given start SCN and end SCN.
|
Iterator<EdgeChange> |
getEdgeChanges(Long longStartSCN,
Long longEndSCN,
int iQueryDOP)
Returns the edge changes between the given start SCN and end SCN.
|
Iterator<EdgeChange> |
getEdgeChanges(Long longStartSCN,
Long longEndSCN,
int iQueryDOP,
boolean bFilterOutRemovedInserts)
Returns the edge changes between the given start SCN and end SCN.
|
Iterator<EdgeChange> |
getEdgeChanges(Long longStartSCN,
Long longEndSCN,
int iQueryDOP,
boolean bFilterOutRemovedInserts,
String[] keys)
Returns the edge changes between the given start SCN and end SCN.
|
OracleEdgeBase |
getEdgeInstance(Long eid,
boolean bCreateIfAbsentFromCache,
boolean bSkipStoreToCache)
Returns an instance of OracleEdgeBase.
|
OracleEdgeBase |
getEdgeInstance(OracleVertexBase outVertex,
OracleVertexBase inVertex,
String edgeLabel,
Long eid,
boolean bCreateIfAbsentFromCache,
boolean bSkipStoreToCache)
Returns an instance of OracleEdgeBase.
|
int |
getEdgePartitionsNumber()
Returns the number of HASH partitions of the edge table.
|
int |
getEdgePropertyNames(int dop,
int timeout,
Set<String> propertyNames,
ProgressListener pl)
Gets the property names of all edges using parallel scans and the specified DOP.
|
Iterable<Edge> |
getEdges()
Returns an iterable to all the edges in the graph.
|
Iterable<Edge> |
getEdges(boolean bOrderBySVID)
Returns an iterable to all the edges in the graph.
|
Iterable<Edge> |
getEdges(boolean bOrderBySVID,
Long longEndSCN)
Returns an iterable to all the edges in the graph from the given SCN.
|
Iterable<Edge> |
getEdges(boolean bOrderBySVID,
Long longEndSCN,
String[] keys,
EdgeFilterCallback efc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an
Iterable to all the edges in the graph that have any of the specified keys and
satisfy the specified edge filter callback. |
Iterable<Edge>[] |
getEdges(Connection[] connArray)
Returns an array of iterables to all the edges in the graph.
|
Iterable<Edge>[] |
getEdges(Connection[] connArray,
boolean bOrderBySVID)
Returns an array of iterables to all the edges in the graph.
|
Iterable<Edge>[] |
getEdges(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN)
Returns an array of iterables to all the edges in the graph.
|
Iterable<Edge>[] |
getEdges(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID)
Returns an array of iterables to all the edges in the graph.
|
Iterable<Edge>[] |
getEdges(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String key)
Returns an array of iterables to all the edges in the graph that have a particular key.
|
Iterable<Edge>[] |
getEdges(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String[] keys)
Returns an array of iterables to all the edges in the graph that have any of the specified keys.
|
Iterable<Edge> |
getEdges(Long longEndSCN)
Returns an iterable to all the edges in the graph from the given SCN.
|
Iterable<Edge> |
getEdges(ResultSet rs,
EdgeFilterCallback efc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an
Iterable to all the edges from the ResultSet that
satisfy the specified edge filter callback. |
Iterable<Edge> |
getEdges(String[] keys,
EdgeFilterCallback efc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an
Iterable to all the edges in the graph that have any of the specified keys and
satisfy the specified edge filter callback. |
Iterable<Edge> |
getEdges(String key,
Object value,
Class dtClass,
boolean acceptWildcard,
boolean useLuceneSyntax)
Return an iterable to all matching edges that have a particular key/value property.
|
Iterable<Edge>[] |
getEdgesNonPartitioned(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN,
boolean bSkipStoreToCache,
String[] keys)
Returns an array of iterables to all the edges in the graph that have any of the specified keys.
|
Iterable<Edge>[] |
getEdgesNonPartitioned(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN,
String[] keys)
Returns an array of iterables to all the edges in the graph that have any of the specified keys.
|
Iterable<Edge>[] |
getEdgesPartitioned(Connection[] connArray,
boolean skipStoreToCache,
int startPartitionID)
Returns an array of iterables to all the edges in the graph.
|
Iterable<Edge>[] |
getEdgesPartitioned(Connection[] connArray,
boolean bSkipStoreToCache,
int startPartitionID,
EdgeFilterCallback efc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an array of iterables to all the edges in the graph that
satisfy the specified edge filter callback.
|
Iterable<Edge>[] |
getEdgesPartitioned(Connection[] connArray,
boolean skipStoreToCache,
int startPartitionID,
String[] keys)
Returns an array of iterables to all the edges in the graph that have any of the specified keys.
|
Iterable<Edge>[] |
getEdgesPartitioned(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String[] keys)
Returns an array of iterables to all the edges in the graph that have any of the specified keys.
|
Iterable<Edge>[] |
getEdgesPartitioned(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String[] keys,
EdgeFilterCallback efc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an array of iterables to all the edges in the graph that
satisfy the specified edge filter callback.
|
Iterable<Edge>[] |
getEdgesPartitioned(Connection[] connArray,
boolean bOrderBySVID,
Long longEndSCN,
String[] keys)
Returns an array of iterables to all the edges in the graph that have any of the specified keys.
|
Iterable<Edge>[] |
getEdgesPartitioned(ResultSet[] rsArray,
boolean bSkipStoreToCache,
EdgeFilterCallback efc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an array of iterables to all the edges from the given array of ResultSet
objects that satisfy the specified edge filter callback.
|
String |
getEdgeTabIdxName(String szCode)
Returns the name of an index of the edge table for the specified
code
|
String |
getEdgeTabName()
Returns the name of the edge table
|
Features |
getFeatures()
Gets the particular features of the graph implementation.
|
String |
getGraphName()
Returns the name of this property graph instance
|
String |
getGraphOwner()
Returns the owner name of the graph.
|
LinkedList<String> |
getIndexNames(String szTabName)
Gets a List of all the database indexes associated to the given table.
|
<T extends Element> |
getIndexParameters(String indexName,
Class<T> indexClass)
Gets the index parameters associated to the given text index.
|
static OraclePropertyGraph |
getInstance(Oracle oracle,
String szGraphName)
Returns an instance of OraclePropertyGraph using the Oracle connection
and graph name provided.
|
static OraclePropertyGraph |
getInstance(Oracle oracle,
String szGraphName,
int iHashPartitionsNum)
Returns an instance of OraclePropertyGraph using the Oracle connection
and graph name provided.
|
static OraclePropertyGraph |
getInstance(Oracle oracle,
String szGraphName,
int iHashPartitionsNum,
int iDOP,
String szTBS,
String szOptions)
Returns an instance of OraclePropertyGraph using the Oracle connection
and graph name provided.
|
static OraclePropertyGraph |
getInstance(Oracle oracle,
String szGraphOwner,
String szGraphName,
int iHashPartitionsNum,
int iDOP,
String szTBS,
String szOptions)
Returns an instance of OraclePropertyGraph using the Oracle connection
and graph name provided.
|
static OraclePropertyGraph |
getInstance(oracle.pgx.config.PgRdbmsGraphConfig config)
Gets an OraclePropertyGraph instance from a PGX PgRdbmsGraphConfig object
|
Set<Long> |
getInvalidEdgeIDSet(int dop,
ProgressListener pl)
Gets a set of invalid edges that are stored in the property graph.
|
long |
getMaxEdgeID(int dop,
ProgressListener pl)
Get the maximum edge ID using parallel scan and the specified DOP.
|
long |
getMaxVertexID(int dop,
ProgressListener pl)
Get maximum vertex ID using parallel scans and the specified DOP.
|
long |
getMinEdgeID(int dop,
ProgressListener pl)
Get the minimum edge ID using parallel scan with dop threads
|
long |
getMinVertexID(int dop,
ProgressListener pl)
Get minimum vertex ID using parallel scans and the specified DOP.
|
String |
getNumberToCharSqlFormatString()
Gets the Char SQL Format used to format a number into a string
|
long |
getOperationQueueSize()
Get the size of the operation queue
|
Oracle |
getOracle()
Returns the underlying Oracle instance associated with the property graph instance
|
static Oracle |
getOracle(oracle.pgx.config.PgRdbmsGraphConfig config)
Gets an Oracle object from a PGX PgRdbmsGraphConfig object
|
OracleIndexManager |
getOracleIndexManager()
Gets the Oracle Index Manager associated to this property graph instance.
|
boolean |
getPGViewOnRDFFlag()
Validates if this property graph instance comes from a Property Graph
view over RDF data
|
int |
getQueryFetchSize()
Returns the query fetch size when scanning the vertex and edge tables
|
Iterator<Long> |
getRemovedEdges(Long longStartSCN,
Long longEndSCN,
int iQueryDOP,
String szOptions)
Returns an ordered iterator of IDs of Edges
that involved in DELETE operations happened between
the two given SCNs.
|
Iterator<Long> |
getRemovedVertices(Long longStartSCN,
Long longEndSCN,
int iQueryDOP,
String szOptions)
Returns an ordered iterator of IDs of Vertices
that involved in DELETE operations happened between
the two given SCNs.
|
int |
getRowPrefetch()
Returns the number of rows to prefetch when executing a SQL query over
the Property graph data tables
|
String |
getSessionID()
Returns the current database Session ID
|
int |
getSessionQueryDOP()
Returns the degree of parallel query execution at the session level.
|
String |
getSkeletonTabIdxName(String szCode)
Returns the name of an index of the graph GT table for the specified
code
|
String |
getSkeletonTabName()
Returns the name of the graph skeleton table
|
String |
getSnapshotTabName()
Returns the name of the PGX snapshot table
|
String |
getTextIndexDirectoryPrefix()
Returns the name of this property graph instance
|
String |
getTextIndexTabName()
Returns the name of the index metadata table
|
String |
getTimeToCharSqlFormatString()
Gets the Char SQL Format used to format a datetime into a string
|
static ResultSet |
getTopK(Connection conn,
StringBuilder sbTabName,
int iColIdx,
OraclePropertyGraph.Sort sort,
int k,
int iDOP)
Returns the top K rows of a given table.
|
ResultSet |
getTopK(StringBuilder sbTabName,
int iColIdx,
OraclePropertyGraph.Sort sort,
int k)
Returns the top K rows of a given table.
|
ResultSet |
getTopK(StringBuilder sbTabName,
int iColIdx,
OraclePropertyGraph.Sort sort,
int k,
int iDOP)
Returns the top K rows of a given table.
|
OracleVertex |
getVertex(Object id)
Returns the vertex referenced by the object identifier.
|
Iterator<VertexChange> |
getVertexChanges(Long longStartSCN,
Long longEndSCN)
Returns the changes between the given start SCN and end SCN.
|
Iterator<VertexChange> |
getVertexChanges(Long longStartSCN,
Long longEndSCN,
int iQueryDOP)
Returns the vertex changes between the given start SCN and end SCN using the given
query degree of parallelism.
|
Iterator<VertexChange> |
getVertexChanges(Long longStartSCN,
Long longEndSCN,
int iQueryDOP,
boolean bFilterOutRemovedInserts)
Returns the vertex changes between the given start SCN and end SCN.
|
Iterator<VertexChange> |
getVertexChanges(Long longStartSCN,
Long longEndSCN,
int iQueryDOP,
boolean bFilterOutRemovedInserts,
String[] keys)
Returns the vertex changes between the given start SCN and end SCN.
|
Set<Long> |
getVertexIDSet(int dop,
ProgressListener pl)
Gets a set of Vertex IDs that are stored in the property graph
|
OracleVertexBase |
getVertexInstance(Long vid,
boolean bCreateIfAbsentFromCache,
boolean bSkipStoreToCache)
Returns an instance of OracleVertexBase.
|
int |
getVertexPartitionsNumber()
Returns the number of HASH partitions of the vertex table.
|
int |
getVertexPropertyNames(int dop,
int timeout,
Set<String> propertyNames,
ProgressListener pl)
Gets the property names of all vertices using parallel scans and the specified DOP.
|
String |
getVertexTabIdxName(String szCode)
Returns the name of an index of the vertex table for the specified
code
|
String |
getVertexTabName()
Returns the name of the vertex table
|
Iterable<Vertex> |
getVertices()
Returns an iterable to all the vertices in the graph.
|
Iterable<Vertex>[] |
getVertices(Connection[] connArray)
Returns an array of iterables to all the vertices in the graph.
|
Iterable<Vertex>[] |
getVertices(Connection[] connArray,
Long longEndSCN)
Returns an array of iterables to all the vertices in the graph.
|
Iterable<Vertex>[] |
getVertices(Connection[] connArray,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID)
Returns an array of iterables to all the vertices in the graph.
|
Iterable<Vertex>[] |
getVertices(Connection[] connArray,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String key)
Returns an array of iterables to all the vertices in the graph that have a particular key.
|
Iterable<Vertex>[] |
getVertices(Connection[] connArray,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String[] keys)
Returns an array of iterables to all the vertices in the graph that have any of the specified keys.
|
Iterable<Vertex> |
getVertices(Long longEndSCN,
String[] keys,
VertexFilterCallback vfc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an
Iterable to all the vertices in the graph that have any of the specified keys and
satisfy the specified vertex filter callback. |
Iterable<Vertex> |
getVertices(ResultSet rs,
VertexFilterCallback vfc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an iterable to all the relevant vertices in the graph.
|
Iterable<Vertex> |
getVertices(String[] keys,
VertexFilterCallback vfc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an
Iterable to all the vertices in the graph that have any of the specified keys and
satisfy the specified vertex filter callback. |
Iterable<Vertex> |
getVertices(String key,
Object value,
Class dtClass,
boolean acceptWildcard,
boolean useLuceneSyntax)
Return an iterable to all matching vertices that have a particular key/value property.
|
Iterable<Vertex>[] |
getVerticesNonPartitioned(Connection[] connArray,
Long longEndSCN,
boolean bSkipStoreToCache,
String[] keys)
Returns an array of iterables to all the vertices in the graph that have any of the specified keys.
|
Iterable<Vertex>[] |
getVerticesNonPartitioned(Connection[] connArray,
Long longEndSCN,
String[] keys)
Returns an array of iterables to all the vertices in the graph that have any of the specified keys.
|
Iterable<Vertex>[] |
getVerticesPartitioned(Connection[] connArray,
boolean skipStoreToCache,
int startPartitionID)
Returns an array of iterables to all the vertices in the graph.
|
Iterable<Vertex>[] |
getVerticesPartitioned(Connection[] connArray,
boolean skipStoreToCache,
int startPartitionID,
String[] keys)
Returns an array of iterables to all the vertices in the graph that have any of the specified keys.
|
Iterable<Vertex>[] |
getVerticesPartitioned(Connection[] connections,
boolean bSkipStoreToCache,
int startPartitionID,
VertexFilterCallback vfc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an array of iterables to all the vertices in the graph that
satisfy the specified vertex filter callback.
|
Iterable<Vertex>[] |
getVerticesPartitioned(Connection[] connArray,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String[] keys)
Returns an array of iterables to all the vertices in the graph that have any of the specified keys.
|
Iterable<Vertex>[] |
getVerticesPartitioned(Connection[] connArray,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String[] keys,
VertexFilterCallback vfc)
Returns an array of iterables to all the vertices in the graph that
have any of the specified keys and satisfy the specified vertex filter callback.
|
Iterable<Vertex>[] |
getVerticesPartitioned(Connection[] connArray,
Long longEndSCN,
boolean bSkipStoreToCache,
int iStartPartitionID,
String[] keys,
VertexFilterCallback vfc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an array of iterables to all the vertices in the graph that
have any of the specified keys and satisfy the specified vertex filter callback.
|
Iterable<Vertex>[] |
getVerticesPartitioned(Connection[] connArray,
Long longEndSCN,
String[] keys)
Returns an array of iterables to all the vertices in the graph that have any of the specified keys.
|
Iterable<Vertex>[] |
getVerticesPartitioned(ResultSet[] rsArray,
boolean bSkipStoreToCache,
VertexFilterCallback vfc,
OraclePropertyGraphBase.OptimizationFlag flag)
Returns an array of iterables to all the vertices in the graph that
satisfy the specified vertex filter callback.
|
Date |
getVTE()
Get the end valid time used in the property graph
|
Date |
getVTS()
Get the start valid time used in the property graph
|
void |
grantAccess(String user,
String privilege)
Grants access of this property graph to another user
|
void |
impEdgeStat(String statTableName,
String statid)
Imports the edge table statistics from the given stat table.
|
void |
impVertexStat(String statTableName,
String statid)
Imports the vertex table statistics from the given stat table.
|
boolean |
isDB11g()
Returns if this property graph instance is working against an 11g
database
|
boolean |
isVirtualPropertyGraph()
Validates if this property graph instance is based on a view
|
static long |
pageRank(Connection conn,
String szEdgeTabName,
StringBuilder sbNodePR,
StringBuilder sbNodeNextPR,
StringBuilder sbEdgeTabDeg,
StringBuilder sbDelta,
float d,
int iNumIterations,
float convergence,
int iDOP,
String szTBS,
String szOptions)
This method calculates the page rank values of vertices in the given graph.
|
long |
pageRank(StringBuilder sbNodePR,
StringBuilder sbNodeNextPR,
StringBuilder sbEdgeTabDeg,
StringBuilder sbDelta,
float d,
int iNumIterations,
float convergence,
int iDOP,
String szTBS,
String szOptions)
This method calculates the page rank values of vertices in this graph.
|
void |
pageRankCleanup(StringBuilder sbNodePR,
StringBuilder sbNodeNextPR,
StringBuilder sbEdgeTabDeg,
StringBuilder sbDelta,
String szOptions)
This method does cleanup work before running page rank calculation.
|
void |
pageRankPrep(StringBuilder sbNodePR,
StringBuilder sbNodeNextPR,
StringBuilder sbEdgeTabDeg,
StringBuilder sbDelta,
String szOptions)
This method does preparation work before running page rank calculation.
|
ResultSet[] |
parallelExecuteStatements(PreparedStatement[] stmtArray)
Executes the given statements in parallel and returns an array of result sets
from each statement.
|
String |
parseValueToCharSQLFormatString(Object value)
Parses a numeric or datetime value object into the String format
required by SQL (Oracle Text) using the CharSQL formats used in this
property graph instance.
|
void |
rebuildAllIndexPartitions(String szIdx,
int iDop)
Rebuilds all the index partitions for the given database index.
|
void |
rebuildEdgeTableConstraints(List<String> llConstraints,
int dop,
String szOptions)
This method rebuilds all the database constraints of the edge table.
|
void |
rebuildEdgeTableIndices(List<String> llIndices,
int dop,
String szOptions)
Rebuilds all database indices of the edge table.
|
void |
rebuildVertexTableConstraints(List<String> llConstraints,
int dop,
String szOptions)
Rebuilds all the database constraints of the vertex table.
|
void |
rebuildVertexTableIndices(List<String> llIndices,
int dop,
String szOptions)
Rebuilds all database indices of the vertex table.
|
void |
refreshIndices(long lStartSCN,
long lEndSCN)
Refreshes all the text indices based on the changes done during the given
SCN window.
|
void |
removeAttributeFromAllEdges(EdgeOpCallback eoc,
boolean skipStoreToCache,
int dop,
ProgressListener pl)
Removes an attribute from all edges based on the specified
EdgeOpCallback . |
void |
removeAttributeFromAllVertices(VertexOpCallback voc,
boolean skipStoreToCache,
int dop,
ProgressListener pl)
Removes an attribute from all vertices based on the specified
VertexOpCallback . |
void |
removeEdge(Edge edge)
Removes the provided edge from the graph.
|
void |
removeVertex(Vertex vertex)
Removes the provided vertex from the graph.
|
void |
rollback()
Rollbacks the operations done to this property graph instance
|
void |
setDefaultDOPPerPtn(int i)
This method sets the default DOP used for partition-wise scan.
|
void |
setLabel(String policy,
String label)
Sets the label for the current session.
|
void |
setNumberToCharSqlFormatString(String format)
Sets the Char SQL Format used to format a number into a string
|
void |
setPGViewOnRDFFlag(boolean flag)
Specifies if this property graph instance comes from a Property Graph
view over RDF data
|
void |
setQueryFetchSize(int size)
Sets the query fetch size used when scanning the vertex and edge tables
|
void |
setRowLabel(String policy,
String label)
Sets the row label for the current session.
|
void |
setRowPrefetch(int i)
Sets the number of rows to prefetch when executing a SQL query over
the Property graph data tables
|
void |
setSessionQueryDOP(int dop)
Sets the degree of parallel query execution at the session level.
|
void |
setTimeToCharSqlFormatString(String format)
Sets the Char SQL Format used to format a datetime into a string
|
void |
setVTE(Date dateVTE)
Set the end valid time used in the property graph
|
void |
setVTS(Date dateVTS)
Set the start valid time used in the property graph
|
static String |
shortestPath(Connection conn,
String szEdgeTabName,
Long lStart,
Long lEnd,
StringBuilder sbExpTab,
StringBuilder sbPathWeights,
String szOptions,
Long lSCN)
Returns a shortest path in a string format.
|
String |
shortestPath(Long lStart,
Long lEnd,
StringBuilder sbExpTab)
Returns a shortest path in a string format.
|
String |
shortestPath(Long lStart,
Long lEnd,
StringBuilder sbExpTab,
StringBuilder sbPathWeights,
String szOptions)
Returns a shortest path in a string format.
|
String |
shortestPath(Long lStart,
Long lEnd,
StringBuilder sbExpTab,
String szEdgeTabName,
StringBuilder sbPathWeights,
String szOptions,
Long lSCN)
Returns a shortest path in a string format.
|
String |
shortestPath(OracleVertex vStart,
OracleVertex vEnd,
StringBuilder sbExpTab)
Returns a shortest path in a string format.
|
String |
shortestPath(OracleVertex vStart,
OracleVertex vEnd,
StringBuilder sbExpTab,
StringBuilder sbPathWeights,
String szOptions)
Returns a shortest path in a string format.
|
void |
shortestPathCleanup(StringBuilder sbExpTab,
String szOptions)
This method does clean up after running
shortest path calculations.
|
void |
shortestPathPrep(StringBuilder sbExpTab,
String szOptions)
This method does some preparation work before running
one or multiple shortest path calculations.
|
void |
shutdown()
Commits all the queued operations and properly closes the graph.
|
static void |
sparsifyGraph(Connection conn,
String szEdgeTabName,
float fThreshold,
int iMinKeep,
int iDOP,
StringBuilder sbOutTab,
StringBuilder sbUndTab,
StringBuilder sbHshTab,
StringBuilder sbMchTab,
String szTBS,
String szOptions)
This method sparsifies a given graph (treated as undirected).
|
void |
sparsifyGraph(float fThreshold,
int iMinKeep,
int iDOP,
StringBuilder sbOutTab,
StringBuilder sbUndTab,
StringBuilder sbHshTab,
StringBuilder sbMchTab,
String szTBS,
String szOptions)
This method sparsifies this graph instance (treated as undirected).
|
void |
sparsifyGraphCleanup(StringBuilder sbOutTab,
StringBuilder sbUndTab,
StringBuilder sbHshTab,
StringBuilder sbMchTab,
String szOptions)
This method does cleanup work before running graph sparsification.
|
void |
sparsifyGraphPrep(StringBuilder sbOutTab,
StringBuilder sbUndTab,
StringBuilder sbHshTab,
StringBuilder sbMchTab,
String szOptions)
This method does preparation work before running graph sparsification.
|
String |
toString()
Returns a very succinct String representation of this Graph
instance
|
addAttributeToAllEdges, addAttributeToAllEdges, addAttributeToAllVertices, addAttributeToAllVertices, commitIndices, countEdges, countEdges, countVertices, countVertices, createIndex, createKeyIndex, createKeyIndex, createKeyIndex, dropAllAutoIndices, dropAllIndices, dropAllManualIndices, dropIndex, dropKeyIndex, dropKeyIndex, dropKeyIndex, getAutoIndex, getBatchSize, getConfig, getDefaultEdgeOptFlag, getDefaultIndexParameters, getDefaultVertexOptFlag, getEdgeFilterCallback, getEdgePropertyNames, getEdges, getEdges, getEdges, getEdges, getEdges, getEdges, getEdges, getEdgesUsingTextSearch, getIndex, getIndexedKeys, getIndices, getInvalidEdgeIDSet, getInvalidEdgeIDSet, getJustEdgeIdOptFlag, getJustVertexIdOptFlag, getMaxEdgeID, getMaxEdgeID, getMaxVertexID, getMaxVertexID, getMinEdgeID, getMinEdgeID, getMinVertexID, getMinVertexID, getProgressListener, getQueueSize, getShortestPath, getShortestPath, getSimpleDateFormat, getStringForObj, getVertexFilterCallback, getVertexIDSet, getVertexIDSet, getVertexPropertyNames, getVertices, getVertices, getVertices, getVertices, getVertices, getVertices, getVertices, getVerticesUsingTextSearch, isEdgeAutoIndexEnabled, isEmpty, isTransientPropertyGraphInstance, isVertexAutoIndexEnabled, query, refreshAutoIndices, removeAttributeFromAllEdges, removeAttributeFromAllEdges, removeAttributeFromAllVertices, removeAttributeFromAllVertices, serializableToStr, setBatchSize, setDefaultEdgeOptFlag, setDefaultIndexParameters, setDefaultVertexOptFlag, setEdgeFilterCallback, setProgressListener, setQueueSize, setSolrJavaBinFormat, setTransientPropertyGraphInstance, setVertexFilterCallback, startTransaction, stopTransaction, strToSerializable, sum, useSolrJavaBinFormat
public static final String DEFAULT_NUMBER_FORMAT
public static final String DEFAULT_TIME_FORMAT
public void addAttributeToAllEdges(EdgeOpCallback eoc, boolean skipStoreToCache, int dop, ProgressListener pl)
EdgeOpCallback
.
NOTE the current transaction will be committed.addAttributeToAllEdges
in class OraclePropertyGraphBase
eoc
- an EdgeOpCallback
object.skipStoreToCache
- if true, the edges instances will not be
stored into the cache.dop
- a positive integer defining the number of threads to use when
parallel processing the edges.pl
- a ProgressListener object.public void addAttributeToAllVertices(VertexOpCallback voc, boolean skipStoreToCache, int dop, ProgressListener pl)
VertexOpCallback
.
NOTE the current transaction will be committed.addAttributeToAllVertices
in class OraclePropertyGraphBase
voc
- a VertexOpCallback
object.skipStoreToCache
- if true, the vertices instances will not be
stored into the cache.dop
- a positive integer defining the number of threads to use when
parallel processing the vertices.pl
- a ProgressListener object.public Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label)
addEdge
in interface Graph
addEdge
in class OraclePropertyGraphBase
id
- the id of the edgeoutVertex
- has to be of type OracleVertexinVertex
- has to be of type OracleVertexlabel
- edge labelOracleEdge
object.public Vertex addVertex(Object id)
addVertex
in interface Graph
addVertex
in class OraclePropertyGraphBase
id
- the id of the vertexOracleVertex
object.public void analyze(float estimatePercent, String methodOpt) throws SQLException
It is very important that up-to-date statistics be maintained for a graph to ensure efficient execution of query. The SQL Optimizer needs accurate information to choose a good execution plan.
After a significant amount of change has been done to a graph, this method should be invoked. Notice that however, statistics collection is a time/resource consuming process, so only run it when necessary.
See Oracle documentation "PL/SQL Packages and Types Reference" for detailed explanations of the parameters.
estimatePercent
- has a valid range of [0.000001,100].methodOpt
- A typical value for methodOpt is "FOR ALL COLUMNS
SIZE AUTO"SQLException
- when there is error generated from DBMS_STATS package.public void analyze(float estimatePercent, String methodOpt, int dop) throws SQLException
It is very important that up-to-date statistics be maintained for a graph to ensure efficient execution of query. The SQL Optimizer needs accurate information to choose a good execution plan.
After a significant amount of change has been done to a graph, this method should be invoked. Notice that however, statistics collection is a time/resource consuming process, so only run it when necessary.
See Oracle documentation "PL/SQL Packages and Types Reference" for detailed explanations of the parameters.
estimatePercent
- has a valid range of [0.000001,100].methodOpt
- A typical value for methodOpt is "FOR ALL COLUMNS
SIZE AUTO"dop
- degree of parallelism.SQLException
- when there is error generated from DBMS_STATS package.public void analyze(int dop) throws SQLException
It is very important that up-to-date statistics be maintained for a graph to ensure efficient execution of query. The SQL Optimizer needs accurate information to choose a good execution plan.
After a significant amount of change has been done to a graph, this method should be invoked. Notice that however, statistics collection is a time/resource consuming process, so only run it when necessary.
See Oracle documentation "PL/SQL Packages and Types Reference" for detailed explanations of the parameters.
dop
- degree of parallelism.SQLException
- when there is error generated from DBMS_STATS package.public void analyzeAuto(int dop) throws SQLException
It is very important that up-to-date statistics be maintained for a graph to ensure efficient execution of query. The SQL Optimizer needs accurate information to choose a good execution plan.
After a significant amount of change has been done to a graph, this method should be invoked. Notice that however, statistics collection is a time/resource consuming process, so only run it when necessary.
See Oracle documentation "PL/SQL Packages and Types Reference" for detailed explanations of the parameters.
dop
- degree of parallelism.SQLException
- when there is error generated from DBMS_STATS package.public void clearCache()
clearCache
in class OraclePropertyGraphBase
public void clearRepository() throws SQLException
clearRepository
in class OraclePropertyGraphBase
SQLException
public void clearUpdateQueue()
public void commit()
commit
in interface TransactionalGraph
public void commit(boolean bCommitIndices)
public long countEdges(int dop, ProgressListener pll)
countEdges
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the edges.public static long countTriangle(Connection conn, String szEdgeTabName, StringBuilder sbUndirWorkTab, int iNumSubPtns, int iDOP, String szTBS, String szOptions) throws SQLException
conn
- a JDBC Connection instanceszEdgeTabName
- name of the edge table (or view)sbUndirWorkTab
- a place holder for the name of the undirected working table to be used
for calculating triangles. This argument is relevant when "CREATE_UNDIRECTED=T" option is set.iNumSubPtns
- has to be a positive integer and has to be power of two.
This value represents the number of logical partitions chosen to
do the calculation. Set the value to 1 to avoid using partitioned approach.iDOP
- degree of parallelism to be usedszTBS
- tablespace. It can be NULL.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public long countTriangle(StringBuilder sbUndirWorkTab) throws SQLException
countTriangle
in interface OraclePropertyGraphAnalytics
sbUndirWorkTab
- a place holder for the name of the undirected working table to be used
for calculating triangles.SQLException
public long countTriangle(StringBuilder sbUndirWorkTab, int iNumSubPtns, int iDOP, String szTBS, String szOptions) throws SQLException
countTriangle
in interface OraclePropertyGraphAnalytics
sbUndirWorkTab
- a place holder for the name of the undirected working table to be used
for calculating triangles. This argument is relevant when "CREATE_UNDIRECTED=T" option is set.iNumSubPtns
- has to be a positive integer and has to be power of two.
This value represents the number of logical partitions chosen to
do the calculation. Set the value to 1 to avoid using partitioned approach.iDOP
- degree of parallelism to be usedszTBS
- tablespace. It can be NULL.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public void countTriangleCleanup(StringBuilder sbUndirBMTab, StringBuilder sbMapWorkTab, StringBuilder sbUndirAMTab, String szOptions) throws SQLException
countTriangleCleanup
in interface OraclePropertyGraphAnalytics
sbUndirBMTab
- a place holder for the name of the undirected working table (before mapping) to be used
for calculating triangles.sbMapWorkTab
- a place holder for the name of the map working table to be used
for calculating triangles.sbUndirAMTab
- a place holder for the name of the undirected working table (after mapping) to be used
for calculating triangles.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public void countTrianglePrep(StringBuilder sbUndirBMTab, StringBuilder sbMapWorkTab, StringBuilder sbUndirAMTab, String szOptions) throws SQLException
countTrianglePrep
in interface OraclePropertyGraphAnalytics
sbUndirBMTab
- a place holder for the name of the undirected working table (before mapping) to be used
for calculating triangles.sbMapWorkTab
- a place holder for the name of the map working table to be used
for calculating triangles. The map working table is for renumbering vertices.sbUndirAMTab
- a place holder for the name of the undirected working table (after mapping) to be used
for calculating triangles.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public static long countTriangleRenum(Connection conn, String szEdgeTabName, StringBuilder sbUndirBMTab, StringBuilder sbMapWorkTab, StringBuilder sbUndirAMTab, int iNumSubPtns, int iDOP, String szTBS, String szOptions) throws SQLException
conn
- a JDBC connection to Oracle DatabaseszEdgeTabName
- name of a graph edge table (or view)sbUndirBMTab
- a place holder for the name of the undirected working table (before mapping) to be used
for calculating triangles.sbMapWorkTab
- a place holder for the name of the map working table to be used
for calculating triangles.sbUndirAMTab
- a place holder for the name of the undirected working table (after mapping) to be used
for calculating triangles.iNumSubPtns
- has to be a positive integer and has to be power of two.
This value represents the number of logical partitions chosen to
do the calculation. Set the value to 1 to avoid using partitioned approach.iDOP
- degree of parallelism to be used for creating
a working table holding undirected graph data and for executing
triangle counting query.szTBS
- tablespace. It can be NULL.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public long countTriangleRenum(StringBuilder sbUndirBMTab, StringBuilder sbMapWorkTab, StringBuilder sbUndirAMTab, int iNumSubPtns, int iDOP, String szTBS, String szOptions) throws SQLException
countTriangleRenum
in interface OraclePropertyGraphAnalytics
sbUndirBMTab
- a place holder for the name of the undirected working table (before mapping) to be used
for calculating triangles.sbMapWorkTab
- a place holder for the name of the map working table to be used
for calculating triangles.sbUndirAMTab
- a place holder for the name of the undirected working table (after mapping) to be used
for calculating triangles.iNumSubPtns
- has to be a positive integer and has to be power of two.
This value represents the number of logical partitions chosen to
do the calculation. Set the value to 1 to avoid using partitioned approach.iDOP
- degree of parallelism to be used for creating
a working table holding undirected graph data and for executing
triangle counting query.szTBS
- tablespace. It can be NULL.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public long countVertices(int dop, ProgressListener pll)
countVertices
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the vertices.pll
- a ProgressListener object.public void createDefaultSpatialIndexOnEdges(int dop) throws SQLException
dop
- degree of parallelism used to create the Spatial indexSQLException
public void createDefaultSpatialIndexOnEdges(int dop, boolean bLocal, boolean bUseV2) throws SQLException
dop
- degree of parallelism used to create the Spatial indexbLocal
- creates a local index if truebUseV2
- uses MDSYS.SPATIAL_INDEX_V2 as the indextype if true,
and uses MDSYS.SPATIAL_INDEX as the indextype if false.SQLException
public void createDefaultSpatialIndexOnVertices(int dop) throws SQLException
dop
- degree of parallelism used to create the Spatial indexSQLException
public void createDefaultSpatialIndexOnVertices(int dop, boolean bLocal, boolean bUseV2) throws SQLException
dop
- degree of parallelism used to create the Spatial indexbLocal
- creates a local index if truebUseV2
- uses MDSYS.SPATIAL_INDEX_V2 as the indextype if true,
and uses MDSYS.SPATIAL_INDEX as the indextype if false.SQLException
public void createStatTable(String statTableName) throws SQLException
statTableName
- name of the stat table.SQLException
- when there is error generated from DBMS_STATS package.public void disable() throws SQLException
disable
in interface OracleChangeTracker
SQLException
public List<String> disableEdgeTableConstraints() throws SQLException
SQLException
public List<String> disableEdgeTableIndices() throws SQLException
SQLException
public List<String> disableVertexTableConstraints() throws SQLException
SQLException
public List<String> disableVertexTableIndices() throws SQLException
SQLException
public void dispose()
public boolean doesEdgeExistAt(String szEdgeID, Long longEndSCN) throws SQLException
doesEdgeExistAt
in interface OracleChangeTracker
szEdgeID
- ID of the edgelongEndSCN
- scnSQLException
public boolean doesEdgeExistAt(String szEdgeID, Long longEndSCN, int iQueryDOP) throws SQLException
doesEdgeExistAt
in interface OracleChangeTracker
szEdgeID
- ID of the edgelongEndSCN
- scniQueryDOP
- the degree of parallelism to be used to
do the checkSQLException
public boolean doesVertexExistAt(String szVertexID, Long longEndSCN) throws SQLException
doesVertexExistAt
in interface OracleChangeTracker
szVertexID
- ID of the vertexlongEndSCN
- scnSQLException
public boolean doesVertexExistAt(String szVertexID, Long longEndSCN, int iQueryDOP) throws SQLException
doesVertexExistAt
in interface OracleChangeTracker
szVertexID
- ID of the vertexlongEndSCN
- scniQueryDOP
- the degree of parallelism to be used to
do the checkSQLException
public void dropDefaultSpatialIndexOnEdges() throws SQLException
SQLException
public void dropDefaultSpatialIndexOnVertices() throws SQLException
SQLException
public void enableAtSCN(Long longSCN) throws SQLException
enableAtSCN
in interface OracleChangeTracker
longSCN
- SCN of the snapshotSQLException
public static long estimateTriangleRenum(Connection conn, String szEdgeTabName, StringBuilder sbUndirBMTab, StringBuilder sbMapWorkTab, StringBuilder sbUndirAMTab, int iNumSubPtns, int iChunk, int iDOP, String szTBS, String szOptions) throws SQLException
sbUndirBMTab
- a place holder for the name of the undirected working table (before mapping) to be used
for calculating triangles.sbMapWorkTab
- a place holder for the name of the map working table to be used
for calculating triangles.sbUndirAMTab
- a place holder for the name of the undirected working table (after mapping) to be used
for calculating triangles.iNumSubPtns
- has to be a positive integer and has to be power of two.
This value represents the number of logical partitions chosen to
do the calculation. As the number of logical partitions grows, the estimation will become faster (and less precise).iChunk
- an integer in the range of [0, iNumSubPtns*iNumSubPtns - 1]iDOP
- degree of parallelism to be usedszTBS
- tablespace. It can be NULL.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public long estimateTriangleRenum(StringBuilder sbUndirBMTab, StringBuilder sbMapWorkTab, StringBuilder sbUndirAMTab, int iNumSubPtns, int iChunk, int iDOP, String szTBS, String szOptions) throws SQLException
estimateTriangleRenum
in interface OraclePropertyGraphAnalytics
sbUndirBMTab
- a place holder for the name of the undirected working table (before mapping) to be used
for calculating triangles.sbMapWorkTab
- a place holder for the name of the map working table to be used
for calculating triangles.sbUndirAMTab
- a place holder for the name of the undirected working table (after mapping) to be used
for calculating triangles.iNumSubPtns
- has to be a positive integer and has to be power of two.
This value represents the number of logical partitions chosen to
do the calculation. As the number of logical partitions grows, the estimation will become faster (and less precise).iChunk
- an integer in the range of [0, iNumSubPtns*iNumSubPtns - 1]iDOP
- degree of parallelism to be usedszTBS
- tablespace. It can be NULL.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public void expEdgeStat(String statTableName, String statid) throws SQLException
statTableName
- name of the stat table.statid
- identifier of statisticsSQLException
- when there is error generated from DBMS_STATS package.public void expVertexStat(String statTableName, String statid) throws SQLException
statTableName
- name of the stat table.statid
- identifier of statisticsSQLException
- when there is error generated from DBMS_STATS package.public static void findCluster(Connection conn, String szEdgeTabName, StringBuilder sbClusters, StringBuilder sbUndir, StringBuilder sbCluas, StringBuilder sbNewas, StringBuilder sbDelta, int iDOP, String szTBS, String szOptions) throws SQLException
conn
- a JDBC connection to Oracle DatabaseszEdgeTabName
- name of the edge table (or view). Note that one
can create a view on top of existing edge table to filter out unwanted
edges.sbClusters
- a place holder for the name of the output table that holds cluster assignment
for verticessbUndir
- a place holder for the name of the working table that holds
undirected graphsbCluas
- a place holder for the name of the working table that holds
intermediate cluster assignmentsbNewas
- a place holder for the name of the working table that holds
updated cluster assignmentsbDelta
- a place holder for the name of the working table that holds
delta informationszOptions
- options to be used by the underlying PL/SQL API.SQLException
public void findCluster(StringBuilder sbClusters, StringBuilder sbUndir, StringBuilder sbCluas, StringBuilder sbNewas, StringBuilder sbDelta, int iDOP, String szTBS, String szOptions) throws SQLException
findCluster
in interface OraclePropertyGraphAnalytics
sbClusters
- a place holder for the name of the output table that holds cluster assignment
for verticessbUndir
- a place holder for the name of the working table that holds
undirected graphsbCluas
- a place holder for the name of the working table that holds
intermediate cluster assignmentsbNewas
- a place holder for the name of the working table that holds
updated cluster assignmentsbDelta
- a place holder for the name of the working table that holds
delta informationszOptions
- options to be used by the underlying PL/SQL API.SQLException
public void findClusterCleanup(StringBuilder sbClusters, StringBuilder sbUndir, StringBuilder sbCluas, StringBuilder sbNewas, StringBuilder sbDelta, String szOptions) throws SQLException
findClusterCleanup
in interface OraclePropertyGraphAnalytics
sbClusters
- a place holder for the name of the output table that holds cluster assignment
for verticessbUndir
- a place holder for the name of the working table that holds
undirected graphsbCluas
- a place holder for the name of the working table that holds
intermediate cluster assignmentsbNewas
- a place holder for the name of the working table that holds
updated cluster assignmentsbDelta
- a place holder for the name of the working table that holds
delta informationszOptions
- options to be used by the underlying PL/SQL API.SQLException
public void findClusterPrep(StringBuilder sbClusters, StringBuilder sbUndir, StringBuilder sbCluas, StringBuilder sbNewas, StringBuilder sbDelta, String szOptions) throws SQLException
findClusterPrep
in interface OraclePropertyGraphAnalytics
sbClusters
- a place holder for the name of the output table that holds cluster assignment
for verticessbUndir
- a place holder for the name of the working table that holds
undirected graphsbCluas
- a place holder for the name of the working table that holds
intermediate cluster assignmentsbNewas
- a place holder for the name of the working table that holds
updated cluster assignmentsbDelta
- a place holder for the name of the working table that holds
delta informationszOptions
- options to be used by the underlying PL/SQL API.SQLException
public LinkedList<String> getConstraintNames(String szTabName) throws SQLException
szTabName
- the name of the tableSQLException
public Long getCurrentSCN() throws SQLException
getCurrentSCN
in interface OracleChangeTracker
SQLException
public Long getCurrentSCNUnsafe() throws SQLException
SQLException
public Class getDatatypeClassFromValueObjForTextIndex(Object value)
getDatatypeClassFromValueObjForTextIndex
in class OraclePropertyGraphBase
public int getDefaultDOPPerPtn()
public OracleEdge getEdge(Object id)
getEdge
in interface Graph
getEdge
in class OraclePropertyGraphBase
id
- the object identifier of the referenced edgeOracleEdge
objectpublic Iterator<EdgeChange> getEdgeChanges(Long longStartSCN, Long longEndSCN) throws SQLException
getEdgeChanges
in interface OracleChangeTracker
longStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the
underlying Oracle Database.longEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the
underlying Oracle Database.SQLException
public Iterator<EdgeChange> getEdgeChanges(Long longStartSCN, Long longEndSCN, int iQueryDOP) throws SQLException
getEdgeChanges
in interface OracleChangeTracker
longStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the
underlying Oracle Database.longEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the
underlying Oracle Database.iQueryDOP
- the degree of parallelism to be used to identify changes.SQLException
public Iterator<EdgeChange> getEdgeChanges(Long longStartSCN, Long longEndSCN, int iQueryDOP, boolean bFilterOutRemovedInserts) throws SQLException
getEdgeChanges
in interface OracleChangeTracker
longStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the
underlying Oracle Database.longEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the
underlying Oracle Database.iQueryDOP
- the degree of parallelism to be used to identify changes.bFilterOutRemovedInserts
- if an insert has already been removed by the end of
time period, then do not include it in the iterator.SQLException
public Iterator<EdgeChange> getEdgeChanges(Long longStartSCN, Long longEndSCN, int iQueryDOP, boolean bFilterOutRemovedInserts, String[] keys) throws SQLException
longStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the
underlying Oracle Database.longEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the
underlying Oracle Database.iQueryDOP
- the degree of parallelism to be used to identify changes.bFilterOutRemovedInserts
- if an insert has already been removed by the end of
time period, then do not include it in the iterator.SQLException
public OracleEdgeBase getEdgeInstance(Long eid, boolean bCreateIfAbsentFromCache, boolean bSkipStoreToCache)
getEdgeInstance
in class OraclePropertyGraphBase
eid
- the id of the edgebCreateIfAbsentFromCache
- if false, returns a NULL value if there
is no match in the cache.bSkipStoreToCache
- if true, the vertex instance will not be
stored into the cache.public OracleEdgeBase getEdgeInstance(OracleVertexBase outVertex, OracleVertexBase inVertex, String edgeLabel, Long eid, boolean bCreateIfAbsentFromCache, boolean bSkipStoreToCache)
getEdgeInstance
in class OraclePropertyGraphBase
eid
- the id of the edgeoutVertex
- the outgoing Vertex of the edgeinVertex
- the incoming Vertex of the edgeedgeLabel
- the label for the Edge.bCreateIfAbsentFromCache
- if false, returns a NULL value if there
is no match in the cache.bSkipStoreToCache
- if true, the vertex instance will not be
stored into the cache.public int getEdgePartitionsNumber() throws SQLException
SQLException
public int getEdgePropertyNames(int dop, int timeout, Set<String> propertyNames, ProgressListener pl)
getEdgePropertyNames
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the edgestimeout
- time out in the unit of secondspropertyNames
- a set of property names to be returnedpl
- a ProgressListener object.public Iterable<Edge> getEdges()
getEdges
in interface Graph
getEdges
in class OraclePropertyGraphBase
public Iterable<Edge> getEdges(boolean bOrderBySVID)
bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.public Iterable<Edge> getEdges(boolean bOrderBySVID, Long longEndSCN)
longEndSCN
- the end SCN to read edges frombOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.public Iterable<Edge> getEdges(boolean bOrderBySVID, Long longEndSCN, String[] keys, EdgeFilterCallback efc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
to all the edges in the graph that have any of the specified keys and
satisfy the specified edge filter callback. The information read back from
the edges will be complete or partial based on the optimization flag
specified.keys
- an array of property key names. It can be NULL which implies all vertices in
the graph satisfying the edge filter callback will be returned.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges fromefc
- a EdgeFilterCallback
object specifying the conditions to keep a
edge in the Iterable
.flag
- an OptimizationFlag object specifying if a partial or complete edge object will
be returned. It can be NULL which implies the edges created must be complete.public Iterable<Edge>[] getEdges(Connection[] connArray)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.public Iterable<Edge>[] getEdges(Connection[] connArray, boolean bOrderBySVID)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.public Iterable<Edge>[] getEdges(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges frompublic Iterable<Edge>[] getEdges(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cachepublic Iterable<Edge>[] getEdges(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String key)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].key
- name of the property. It can be NULL which implies all edges in
the graph will be returned.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cachepublic Iterable<Edge>[] getEdges(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all edges in
the graph will be returned.public Iterable<Edge> getEdges(Long longEndSCN)
longEndSCN
- the end SCN to read edges frompublic Iterable<Edge> getEdges(ResultSet rs, EdgeFilterCallback efc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
to all the edges from the ResultSet that
satisfy the specified edge filter callback. The information read back from
the edges will be complete or partial based on the optimization flag
specified.rs
- the resultset where the edges will be read from.efc
- a EdgeFilterCallback
object specifying the conditions to keep a
edge in the Iterable
.flag
- an OptimizationFlag object specifying if a partial or complete edge object will
be returned. It can be NULLl which implies the edges created must be complete.public Iterable<Edge> getEdges(String[] keys, EdgeFilterCallback efc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
to all the edges in the graph that have any of the specified keys and
satisfy the specified edge filter callback. The information read back from
the edges will be complete or partial based on the optimization flag
specified.getEdges
in class OraclePropertyGraphBase
keys
- an array of property key names. It can be NULL which implies all vertices in
the graph satisfying the edge filter callback will be returned.efc
- a EdgeFilterCallback
object specifying the conditions to keep a
edge in the Iterable
.flag
- an OptimizationFlag object specifying if a partial or complete edge object will
be returned. It can be NULL which implies the edges created must be complete.public Iterable<Edge> getEdges(String key, Object value, Class dtClass, boolean acceptWildcard, boolean useLuceneSyntax)
getEdges
in class OraclePropertyGraphBase
key
- the name of the property. It MUST not be NULL.value
- the value of the property. It can be NULL which will cause all edges with the given key to be returned.dtClass
- the class representing the datatype of the property value. This can be
used to cast the property value to a different datatype. For example, if the value is "3.01"
and dtClass is Float.Class, then this value will be treated as a 3.01f. If dtClass is
set to NULL, then the query will be executed by trying to match the value object to
all the supported datatypes.acceptWildcard
- specifies if wild cards can be used in the value object. Wild cards can be used only when
an automatic text index on the given key is present.useLuceneSyntax
- specifies if the value object is using an Apache Lucene Syntax (further
details on Apache Lucene Syntax can be found in https://lucene.apache.org/core/2_9_4/queryparsersyntax.html). If the
automatic index is not enabled ahd this flag is set to true, an Exception will be thrown
as Lucene Syntax is not supported for database lookups.public Iterable<Edge>[] getEdgesNonPartitioned(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN, boolean bSkipStoreToCache, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges frombSkipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all edges in
the graph will be returned.public Iterable<Edge>[] getEdgesNonPartitioned(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges fromkeys
- an array of property key names. It can be NULL which implies all edges in
the graph will be returned.public Iterable<Edge>[] getEdgesPartitioned(Connection[] connArray, boolean skipStoreToCache, int startPartitionID)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.startPartitionID
- the ID of the starting partitionskipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cachepublic Iterable<Edge>[] getEdgesPartitioned(Connection[] connArray, boolean bSkipStoreToCache, int startPartitionID, EdgeFilterCallback efc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.startPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cacheflag
- an OptimizationFlag object specifying if a partial or complete vertex object will
be returned. It can be NULL which implies the vertices created must be complete.efc
- an EdgeFilterCallback
object.public Iterable<Edge>[] getEdgesPartitioned(Connection[] connArray, boolean skipStoreToCache, int startPartitionID, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.startPartitionID
- the ID of the starting partitionskipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all edges in
the graph will be returned.public Iterable<Edge>[] getEdgesPartitioned(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all edges in
the graph will be returned.public Iterable<Edge>[] getEdgesPartitioned(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String[] keys, EdgeFilterCallback efc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all edges in
the graph will be returned.flag
- an OptimizationFlag object specifying if a partial or complete vertex object will
be returned. It can be NULL which implies the vertices created must be complete.efc
- an EdgeFilterCallback
object.public Iterable<Edge>[] getEdgesPartitioned(Connection[] connArray, boolean bOrderBySVID, Long longEndSCN, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the edge table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bOrderBySVID
- if true, the iterator will be further ordered by the SVID column
value.longEndSCN
- the end SCN to read edges fromkeys
- an array of property key names. It can be NULL which implies all edges in
the graph will be returned.public Iterable<Edge>[] getEdgesPartitioned(ResultSet[] rsArray, boolean bSkipStoreToCache, EdgeFilterCallback efc, OraclePropertyGraphBase.OptimizationFlag flag)
rsArray
- a ResultSet
arraybSkipStoreToCache
- if true, the edge instances retrieved by the
scan will not be saved into cacheflag
- an OptimizationFlag object specifying if a partial or complete vertex object will
be returned. It can be NULL which implies the vertices created must be complete.efc
- an EdgeFilterCallback
object.public String getEdgeTabIdxName(String szCode)
szCode
- the index code namepublic String getEdgeTabName()
public Features getFeatures()
getFeatures
in interface Graph
public String getGraphName()
getGraphName
in class OraclePropertyGraphBase
public String getGraphOwner()
public LinkedList<String> getIndexNames(String szTabName) throws SQLException
szTabName
- the name of the tableSQLException
public final <T extends Element> OracleIndexParameters getIndexParameters(String indexName, Class<T> indexClass)
getIndexParameters
in class OraclePropertyGraphBase
indexName
- the name of the manual index to retrieve.indexClass
- the element class that the index is for.OracleIndexParameters
object.public static OraclePropertyGraph getInstance(Oracle oracle, String szGraphName) throws SQLException
oracle
- an Oracle
objectszGraphName
- the name of the graphSQLException
public static OraclePropertyGraph getInstance(Oracle oracle, String szGraphName, int iHashPartitionsNum) throws SQLException
oracle
- an Oracle
objectszGraphName
- the name of the graphiHashPartitionsNum
- number of hash partitions to be used.SQLException
public static OraclePropertyGraph getInstance(Oracle oracle, String szGraphName, int iHashPartitionsNum, int iDOP, String szTBS, String szOptions) throws SQLException
oracle
- an Oracle
objectszGraphName
- the name of the graphiHashPartitionsNum
- number of hash partitions to be used.iDOP
- degree of parallelism to be used for creating the underlying tables and indices.szTBS
- the tablespace name where the property graph tables will be
created.szOptions
- options to be passed on to the underlying OPG_APIS.CREATE_PG API. It can be NULL.SQLException
public static OraclePropertyGraph getInstance(Oracle oracle, String szGraphOwner, String szGraphName, int iHashPartitionsNum, int iDOP, String szTBS, String szOptions) throws SQLException
oracle
- an Oracle
objectszGraphName
- the name of the graphszGraphOwner
- owner of the graph. This may be different from the
login schema.iHashPartitionsNum
- number of hash partitions to be used.iDOP
- degree of parallelism to be used for creating the underlying tables and indices.szTBS
- the tablespace name where the property graph tables will be
created.szOptions
- options to be passed on to the underlying OPG_APIS.CREATE_PG API. It can be NULL.SQLException
public static OraclePropertyGraph getInstance(oracle.pgx.config.PgRdbmsGraphConfig config) throws SQLException
config
- the PGX graph config objectSQLException
public Set<Long> getInvalidEdgeIDSet(int dop, ProgressListener pl)
getInvalidEdgeIDSet
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the vertices and edges.pl
- a ProgressListener object.public long getMaxEdgeID(int dop, ProgressListener pl)
getMaxEdgeID
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the vertices.pl
- a ProgressListener object.public long getMaxVertexID(int dop, ProgressListener pl)
getMaxVertexID
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the vertices.pl
- a ProgressListener object.public long getMinEdgeID(int dop, ProgressListener pl)
getMinEdgeID
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the vertices.pl
- a ProgressListener object.public long getMinVertexID(int dop, ProgressListener pl)
getMinVertexID
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the vertices.pl
- a ProgressListener object.public String getNumberToCharSqlFormatString()
public long getOperationQueueSize()
public Oracle getOracle()
public static Oracle getOracle(oracle.pgx.config.PgRdbmsGraphConfig config) throws SQLException
config
- the PGX graph config objectSQLException
public OracleIndexManager getOracleIndexManager()
getOracleIndexManager
in class OraclePropertyGraphBase
OracleIndexManager
object.public boolean getPGViewOnRDFFlag()
public int getQueryFetchSize()
public Iterator<Long> getRemovedEdges(Long longStartSCN, Long longEndSCN, int iQueryDOP, String szOptions) throws SQLException
getRemovedEdges
in interface OracleChangeTracker
longStartSCN
- start SCNlongEndSCN
- end SCNiQueryDOP
- degree of parallelism to be used for the underlying queryszOptions
- hints for the underlying query.SQLException
public Iterator<Long> getRemovedVertices(Long longStartSCN, Long longEndSCN, int iQueryDOP, String szOptions) throws SQLException
getRemovedVertices
in interface OracleChangeTracker
longStartSCN
- start SCNlongEndSCN
- end SCNiQueryDOP
- degree of parallelism to be used for the underlying queryszOptions
- hints for the underlying query.SQLException
public int getRowPrefetch()
public String getSessionID() throws SQLException
SQLException
public int getSessionQueryDOP()
public String getSkeletonTabIdxName(String szCode)
szCode
- the index code namepublic String getSkeletonTabName()
public String getSnapshotTabName()
public String getTextIndexDirectoryPrefix()
getTextIndexDirectoryPrefix
in class OraclePropertyGraphBase
public String getTextIndexTabName()
public String getTimeToCharSqlFormatString()
public static ResultSet getTopK(Connection conn, StringBuilder sbTabName, int iColIdx, OraclePropertyGraph.Sort sort, int k, int iDOP) throws SQLException
conn
- a JDBC connection to Oracle DatabasesbTabName
- a place holder for the table nameiColIdx
- the column to be sortedsort
- ASC or DESCk
- k rows to be returned. Note that it is an upper boundiDOP
- degree of parallelism to be usedSQLException
public ResultSet getTopK(StringBuilder sbTabName, int iColIdx, OraclePropertyGraph.Sort sort, int k) throws SQLException
sbTabName
- a place holder for the table nameiColIdx
- the column to be sortedsort
- ASC or DESCk
- k rows to be returned. Note that it is an upper boundSQLException
public ResultSet getTopK(StringBuilder sbTabName, int iColIdx, OraclePropertyGraph.Sort sort, int k, int iDOP) throws SQLException
sbTabName
- a place holder for the table nameiColIdx
- the column to be sortedsort
- ASC or DESCk
- k rows to be returned. Note that it is an upper boundiDOP
- degree of parallelism to be usedSQLException
public OracleVertex getVertex(Object id)
getVertex
in interface Graph
getVertex
in class OraclePropertyGraphBase
id
- the object identifier of the referenced vertexVertex
objectpublic Iterator<VertexChange> getVertexChanges(Long longStartSCN, Long longEndSCN) throws SQLException
getVertexChanges
in interface OracleChangeTracker
longStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the
underlying Oracle Database.longEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the
underlying Oracle Database.SQLException
public Iterator<VertexChange> getVertexChanges(Long longStartSCN, Long longEndSCN, int iQueryDOP) throws SQLException
getVertexChanges
in interface OracleChangeTracker
longStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the
underlying Oracle Database.longEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the
underlying Oracle Database.iQueryDOP
- the degree of parallelism to be used to identify changes.SQLException
public Iterator<VertexChange> getVertexChanges(Long longStartSCN, Long longEndSCN, int iQueryDOP, boolean bFilterOutRemovedInserts) throws SQLException
getVertexChanges
in interface OracleChangeTracker
longStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the
underlying Oracle Database.longEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the
underlying Oracle Database.iQueryDOP
- the degree of parallelism to be used to identify changes.bFilterOutRemovedInserts
- if an insert has already been removed by the end of
time period, then do not include it in the iterator.SQLException
public Iterator<VertexChange> getVertexChanges(Long longStartSCN, Long longEndSCN, int iQueryDOP, boolean bFilterOutRemovedInserts, String[] keys) throws SQLException
longStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the
underlying Oracle Database.longEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the
underlying Oracle Database.iQueryDOP
- the degree of parallelism to be used to identify changes.bFilterOutRemovedInserts
- if an insert has already been removed by the end of
time period, then do not include it in the iterator.keys
- an array of property key names. It can be NULL which implies all vertices
changes will be returned.SQLException
public Set<Long> getVertexIDSet(int dop, ProgressListener pl)
getVertexIDSet
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the vertices.pl
- a ProgressListener object.public OracleVertexBase getVertexInstance(Long vid, boolean bCreateIfAbsentFromCache, boolean bSkipStoreToCache)
getVertexInstance
in class OraclePropertyGraphBase
vid
- the id of the vertexbCreateIfAbsentFromCache
- if false, returns a NULL value if there
is no match in the cache.bSkipStoreToCache
- if true, the vertex instance will not be
stored into the cache.public int getVertexPartitionsNumber() throws SQLException
SQLException
public int getVertexPropertyNames(int dop, int timeout, Set<String> propertyNames, ProgressListener pl)
getVertexPropertyNames
in class OraclePropertyGraphBase
dop
- a positive integer defining the number of threads to use when
parallel scanning the verticestimeout
- time out in the unit of secondspropertyNames
- a set of property names to be returnedpl
- a ProgressListener object.public String getVertexTabIdxName(String szCode)
szCode
- the index code namepublic String getVertexTabName()
public Iterable<Vertex> getVertices()
getVertices
in interface Graph
getVertices
in class OraclePropertyGraphBase
public Iterable<Vertex>[] getVertices(Connection[] connArray)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.public Iterable<Vertex>[] getVertices(Connection[] connArray, Long longEndSCN)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.longEndSCN
- the end SCN to read vertices frompublic Iterable<Vertex>[] getVertices(Connection[] connArray, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.longEndSCN
- the end SCN to read vertices fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachepublic Iterable<Vertex>[] getVertices(Connection[] connArray, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String key)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.bSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachelongEndSCN
- the end SCN to read vertices fromiStartPartitionID
- the ID of the starting partitionkey
- name of the property. It can be NULL which implies all edges in
the graph will be returned.public Iterable<Vertex>[] getVertices(Connection[] connArray, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.longEndSCN
- the end SCN to read vertices fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all vertices in
the graph will be returned.public Iterable<Vertex> getVertices(Long longEndSCN, String[] keys, VertexFilterCallback vfc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
to all the vertices in the graph that have any of the specified keys and
satisfy the specified vertex filter callback. The information read back from
the vertices will be complete or partial based on the optimization flag
specified.keys
- an array of property key names. It can be NULL which implies all vertices in
the graph satisfying the vertex filter callback will be returned.vfc
- a VertexFilterCallback
object specifying the conditions to keep a
vertex in the Iterable
.longEndSCN
- the end SCN to read vertices fromflag
- an OptimizationFlag object specifying if a partial or complete vertex object will
be returned. It can be NULL which implies the vertices created must be complete.public Iterable<Vertex> getVertices(ResultSet rs, VertexFilterCallback vfc, OraclePropertyGraphBase.OptimizationFlag flag)
rs
- an result set for matching verticesvfc
- an optional VertexFilterCallback objectflag
- an optional OptimizationFlag object to reduce object sizepublic Iterable<Vertex> getVertices(String[] keys, VertexFilterCallback vfc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
to all the vertices in the graph that have any of the specified keys and
satisfy the specified vertex filter callback. The information read back from
the vertices will be complete or partial based on the optimization flag
specified.getVertices
in class OraclePropertyGraphBase
keys
- an array of property key names. It can be NULL which implies all vertices in
the graph satisfying the vertex filter callback will be returned.vfc
- a VertexFilterCallback
object specifying the conditions to keep a
vertex in the Iterable
.flag
- an OptimizationFlag object specifying if a partial or complete vertex object will
be returned. It can be NULL which implies the vertices created must be complete.public Iterable<Vertex> getVertices(String key, Object value, Class dtClass, boolean acceptWildcard, boolean useLuceneSyntax)
getVertices
in class OraclePropertyGraphBase
key
- the name of the property. It MUST not be NULL.value
- the value of the property. It can be NULL which will cause all vertices with the given key to be returned.dtClass
- the class representing the datatype of the property value. This can be
used to cast the property value to a different datatype. For example, if the value is "3.01"
and dtClass is Float.Class, then this value will be treated as a 3.01f. If dtClass is
set to NULL, then the query will be executed by trying to match the value object to
all the supported datatypes.acceptWildcard
- specifies if wild cards can be used in the value object. Wild cards can be used only when
an automatic text index on the given key is present.useLuceneSyntax
- specifies if the value object is using an Apache Lucene Syntax (further
details on Apache Lucene Syntax can be found in https://lucene.apache.org/core/2_9_4/queryparsersyntax.html). If the
automatic index is not enabled ahd this flag is set to true, an Exception will be thrown
as Lucene Syntax is not supported for database lookups.public Iterable<Vertex>[] getVerticesNonPartitioned(Connection[] connArray, Long longEndSCN, boolean bSkipStoreToCache, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.longEndSCN
- the end SCN to read vertices frombSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all vertices in
the graph will be returned.public Iterable<Vertex>[] getVerticesNonPartitioned(Connection[] connArray, Long longEndSCN, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.keys
- an array of property key names. It can be NULL which implies all vertices in
the graph will be returned.public Iterable<Vertex>[] getVerticesPartitioned(Connection[] connArray, boolean skipStoreToCache, int startPartitionID)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.startPartitionID
- the ID of the starting partitionskipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachepublic Iterable<Vertex>[] getVerticesPartitioned(Connection[] connArray, boolean skipStoreToCache, int startPartitionID, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.startPartitionID
- the ID of the starting partitionskipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all vertices in
the graph will be returned.public Iterable<Vertex>[] getVerticesPartitioned(Connection[] connections, boolean bSkipStoreToCache, int startPartitionID, VertexFilterCallback vfc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connections
- a Connection
array used for concurrent querying
inside the Oracle property graph.startPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cacheflag
- an OptimizationFlag object specifying if a partial or complete vertex object will
be returned. It can be NULL which implies the vertices created must be complete.vfc
- an VertexFilterCallback
object.public Iterable<Vertex>[] getVerticesPartitioned(Connection[] connArray, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.longEndSCN
- the end SCN to read vertices fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all vertices in
the graph will be returned.public Iterable<Vertex>[] getVerticesPartitioned(Connection[] connArray, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String[] keys, VertexFilterCallback vfc)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.longEndSCN
- the end SCN to read vertices fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all vertices in
the graph will be returned.vfc
- an VertexFilterCallback
object.public Iterable<Vertex>[] getVerticesPartitioned(Connection[] connArray, Long longEndSCN, boolean bSkipStoreToCache, int iStartPartitionID, String[] keys, VertexFilterCallback vfc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array].connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.longEndSCN
- the end SCN to read vertices fromiStartPartitionID
- the ID of the starting partitionbSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cachekeys
- an array of property key names. It can be NULL which implies all vertices in
the graph will be returned.flag
- an OptimizationFlag object specifying if a partial or complete vertex object will
be returned. It can be NULL which implies the vertices created must be complete.vfc
- an VertexFilterCallback
object.public Iterable<Vertex>[] getVerticesPartitioned(Connection[] connArray, Long longEndSCN, String[] keys)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.connArray
- a Connection
array used for concurrent querying
inside the Oracle property graph.longEndSCN
- the end SCN to read vertices fromkeys
- an array of property key names. It can be NULL which implies all vertices in
the graph will be returned.public Iterable<Vertex>[] getVerticesPartitioned(ResultSet[] rsArray, boolean bSkipStoreToCache, VertexFilterCallback vfc, OraclePropertyGraphBase.OptimizationFlag flag)
Iterable
array uses a separate connection
provided to fetch a subset of the results from the corresponding partition.
Note that we assign an integer ID (in the range of [0, N - 1]) to all the
partitions in the vertex table with N partitions. The subset of partitions queried will
consist of those partitions with ID value in the range of
[startPartitionID, startPartitionID - 1 + size of connections array]. By
default, the startPartitionID is set to 0.rsArray
- a ResultSet
arraybSkipStoreToCache
- if true, the vertex instances retrieved by the
scan will not be saved into cacheflag
- an OptimizationFlag object specifying if a partial or complete vertex object will
be returned. It can be NULL which implies the vertices created must be complete.vfc
- an VertexFilterCallback
object.public Date getVTE()
public Date getVTS()
public void grantAccess(String user, String privilege) throws SQLException
user
- name of the userprivilege
- a string representing priviledges. "R" for read, "S" for select, "I" for insert,
"D" for delete, and "U" for update. "RIDUS" can be used to grant read, insert, delete, update,
and select in one shot.SQLException
public void impEdgeStat(String statTableName, String statid) throws SQLException
statTableName
- name of the stat table.statid
- identifier of statisticsSQLException
- when there is error generated from DBMS_STATS package.public void impVertexStat(String statTableName, String statid) throws SQLException
statTableName
- name of the stat table.statid
- identifier of statisticsSQLException
- when there is error generated from DBMS_STATS package.public boolean isDB11g()
public boolean isVirtualPropertyGraph()
public static long pageRank(Connection conn, String szEdgeTabName, StringBuilder sbNodePR, StringBuilder sbNodeNextPR, StringBuilder sbEdgeTabDeg, StringBuilder sbDelta, float d, int iNumIterations, float convergence, int iDOP, String szTBS, String szOptions) throws SQLException
conn
- a JDBC connection to Oracle DatabaseszEdgeTabName
- name of a graph edge table (or view)sbNodePR
- a place holder for the name of the working table that holds the page rank
values of the verticessbNodeNextPR
- a place holder for the name of the working table that holds
the page rank values in the next iterationsbEdgeTabDeg
- a place holder for the name of the working table that holds
edges and node degree informationsbDelta
- a place holder for the name of the working table that holds
information about some special verticesd
- damping factor, 0.85f is often used.iNumIterations
- number of iterations to perform PR calculations.convergence
- if positive, then continue PR calculations till sum of
PR value changes is less than this convergence setting.szOptions
- options to be used by the underlying PL/SQL API.iDOP
- degree of parallelism to be used for creating
a working table holding undirected graph data and for executing
triangle counting query.szTBS
- tablespace. It can be NULL.SQLException
public long pageRank(StringBuilder sbNodePR, StringBuilder sbNodeNextPR, StringBuilder sbEdgeTabDeg, StringBuilder sbDelta, float d, int iNumIterations, float convergence, int iDOP, String szTBS, String szOptions) throws SQLException
pageRank
in interface OraclePropertyGraphAnalytics
sbNodePR
- a place holder for the name of the working table that holds the page rank
values of the verticessbNodeNextPR
- a place holder for the name of the working table that holds
the page rank values in the next iterationsbEdgeTabDeg
- a place holder for the name of the working table that holds
edges and node degree informationsbDelta
- a place holder for the name of the working table that holds
information about some special verticesd
- damping factor, 0.85f is often used.iNumIterations
- number of iterations to perform PR calculations.convergence
- if positive, then continue PR calculations till sum of
PR value changes is less than this convergence setting.szOptions
- options to be used by the underlying PL/SQL API.iDOP
- degree of parallelism to be used for creating
a working table holding undirected graph data and for executing
triangle counting query.szTBS
- tablespace. It can be NULL.SQLException
public void pageRankCleanup(StringBuilder sbNodePR, StringBuilder sbNodeNextPR, StringBuilder sbEdgeTabDeg, StringBuilder sbDelta, String szOptions) throws SQLException
pageRankCleanup
in interface OraclePropertyGraphAnalytics
sbNodePR
- a place holder for the name of the working table that holds the page rank
values of the verticessbNodeNextPR
- a place holder for the name of the working table that holds
the page rank values in the next iterationsbEdgeTabDeg
- a place holder for the name of the working table that holds
edges and node degree informationsbDelta
- a place holder for the name of the working table that holds
information about some special verticesszOptions
- options to be used by the underlying PL/SQL API.SQLException
public void pageRankPrep(StringBuilder sbNodePR, StringBuilder sbNodeNextPR, StringBuilder sbEdgeTabDeg, StringBuilder sbDelta, String szOptions) throws SQLException
pageRankPrep
in interface OraclePropertyGraphAnalytics
sbNodePR
- a place holder for the name of the working table that holds the page rank
values of the verticessbNodeNextPR
- a place holder for the name of the working table that holds
the page rank values in the next iterationsbEdgeTabDeg
- a place holder for the name of the working table that holds
edges and node degree informationsbDelta
- a place holder for the name of the working table that holds
information about some special verticesszOptions
- options to be used by the underlying PL/SQL API.SQLException
public ResultSet[] parallelExecuteStatements(PreparedStatement[] stmtArray)
stmtArray
- the array of prepared statements to execute in parallel-public String parseValueToCharSQLFormatString(Object value)
value
- the value to parsepublic void rebuildAllIndexPartitions(String szIdx, int iDop) throws SQLException
szIdx
- the name of the indexiDop
- the degree of parallelism used when executing the processSQLException
public void rebuildEdgeTableConstraints(List<String> llConstraints, int dop, String szOptions) throws SQLException
llConstraints
- a list of constraint namesdop
- degree of parallelismszOptions
- additional SQL options to add as hints during the rebuild.SQLException
public void rebuildEdgeTableIndices(List<String> llIndices, int dop, String szOptions) throws SQLException
llIndices
- a list of index names to rebuilddop
- degree of parallelism used when rebuilding the indicesszOptions
- additonal SQL options used when rebuilding the indices.SQLException
public void rebuildVertexTableConstraints(List<String> llConstraints, int dop, String szOptions) throws SQLException
llConstraints
- a list of constraint namesdop
- degree of parallelismszOptions
- additional SQL options to add as hints during the rebuild.SQLException
public void rebuildVertexTableIndices(List<String> llIndices, int dop, String szOptions) throws SQLException
llIndices
- a list of index names to rebuilddop
- degree of parallelism used when rebuilding the indicesszOptions
- additonal SQL options used when rebuilding the indices.SQLException
public void refreshIndices(long lStartSCN, long lEndSCN)
public void removeAttributeFromAllEdges(EdgeOpCallback eoc, boolean skipStoreToCache, int dop, ProgressListener pl)
EdgeOpCallback
.
NOTE the current transaction will be committed.removeAttributeFromAllEdges
in class OraclePropertyGraphBase
eoc
- a EdgeOpCallback
object.skipStoreToCache
- if true, the edges instances will not be
stored into the cache.dop
- a positive integer defining the number of threads to use when
parallel processing the edges.pl
- a ProgressListener object.public void removeAttributeFromAllVertices(VertexOpCallback voc, boolean skipStoreToCache, int dop, ProgressListener pl)
VertexOpCallback
.
NOTE the current transaction will be committed.removeAttributeFromAllVertices
in class OraclePropertyGraphBase
voc
- a VertexOpCallback
object.skipStoreToCache
- if true, the vertices instances will not be
stored into the cache.dop
- a positive integer defining the number of threads to use when
parallel processing the vertices.pl
- a ProgressListener object.public void removeEdge(Edge edge)
removeEdge
in interface Graph
removeEdge
in class OraclePropertyGraphBase
edge
- an Edge
object to be removedpublic void removeVertex(Vertex vertex)
removeVertex
in interface Graph
vertex
- a Vertex
object to be removedpublic void rollback()
rollback
in interface TransactionalGraph
rollback
in class OraclePropertyGraphBase
public void setDefaultDOPPerPtn(int i)
i
- default DOP used for partition-wise scan. It MUST NOT be negative.public void setLabel(String policy, String label) throws SQLException
policy
- name of the OLS policylabel
- security label nameSQLException
public void setNumberToCharSqlFormatString(String format)
format
- the format used for numeric objectspublic void setPGViewOnRDFFlag(boolean flag)
flag
- use true if this property graph instance comes from a Property Graph
view over RDF datapublic void setQueryFetchSize(int size)
size
- the query fetch sizepublic void setRowLabel(String policy, String label) throws SQLException
policy
- name of the OLS policylabel
- security label nameSQLException
public void setRowPrefetch(int i)
i
- the prefetch sizepublic void setSessionQueryDOP(int dop) throws SQLException
dop
- degree of parallelism. The value can be zero. If the value is negative,
then it is no op.SQLException
public void setTimeToCharSqlFormatString(String format)
format
- the format used for datetime objectspublic void setVTE(Date dateVTE)
public void setVTS(Date dateVTS)
public static String shortestPath(Connection conn, String szEdgeTabName, Long lStart, Long lEnd, StringBuilder sbExpTab, StringBuilder sbPathWeights, String szOptions, Long lSCN) throws SQLException
conn
- a JDBC connection to Oracle DatabaseszEdgeTabName
- name of the edge table (or view). Note that one
can create a view on top of existing edge table to filter out unwanted
edges.lStart
- start vertex integer IDlEnd
- destination vertex integer IDsbPathWeights
- place holder of path weights of the shortest path.
The first number represents the number of vertices on the shortest path,
the second number represents the total weight and the rest numbers
denote weights of edges along the shortest path. All these numbers
are delimited by spaces.szOptions
- options to be passed on to the underlying PL/SQL API.lSCN
- SCN for the edge table. It can be NULL.SQLException
public String shortestPath(Long lStart, Long lEnd, StringBuilder sbExpTab) throws SQLException
shortestPath
in interface OraclePropertyGraphAnalytics
lStart
- start vertex integer IDlEnd
- destination vertex integer IDsbExpTab
- place holder of expansion table nameSQLException
public String shortestPath(Long lStart, Long lEnd, StringBuilder sbExpTab, StringBuilder sbPathWeights, String szOptions) throws SQLException
shortestPath
in interface OraclePropertyGraphAnalytics
lStart
- start vertex integer IDlEnd
- destination vertex integer IDsbExpTab
- place holder of expansion table namesbPathWeights
- place holder of path weights of the shortest path.
The first number represents the number of vertices on the shortest path,
the second number represents the total weight and the rest numbers
denote weights of edges along the shortest path. All these numbers
are delimited by spaces.szOptions
- options to be passed on to the underlying PL/SQL API.SQLException
public String shortestPath(Long lStart, Long lEnd, StringBuilder sbExpTab, String szEdgeTabName, StringBuilder sbPathWeights, String szOptions, Long lSCN) throws SQLException
shortestPath
in interface OraclePropertyGraphAnalytics
lStart
- start vertex integer IDlEnd
- destination vertex integer IDszEdgeTabName
- name of the edge table (or view). Note that one
can create a view on top of existing edge table to filter out unwanted
edges.sbPathWeights
- place holder of path weights of the shortest path.
The first number represents the number of vertices on the shortest path,
the second number represents the total weight and the rest numbers
denote weights of edges along the shortest path. All these numbers
are delimited by spaces.szOptions
- options to be passed on to the underlying PL/SQL API.lSCN
- SCN for the edge table. It can be NULL.SQLException
public String shortestPath(OracleVertex vStart, OracleVertex vEnd, StringBuilder sbExpTab) throws SQLException
shortestPath
in interface OraclePropertyGraphAnalytics
vStart
- start vertex objectvEnd
- destination vertex objectsbExpTab
- place holder of expansion table nameSQLException
public String shortestPath(OracleVertex vStart, OracleVertex vEnd, StringBuilder sbExpTab, StringBuilder sbPathWeights, String szOptions) throws SQLException
shortestPath
in interface OraclePropertyGraphAnalytics
vStart
- start vertex objectvEnd
- destination vertex objectsbExpTab
- place holder of expansion table namesbPathWeights
- place holder of path weights of the shortest path.
The first number represents the number of vertices on the shortest path,
the second number represents the total weight and the rest numbers
denote weights of edges along the shortest path. All these numbers
are delimited by spaces.szOptions
- options to be passed on to the underlying PL/SQL API.SQLException
public void shortestPathCleanup(StringBuilder sbExpTab, String szOptions) throws SQLException
shortestPathCleanup
in interface OraclePropertyGraphAnalytics
sbExpTab
- a place holder for the name of the expansion table to be used
for Bi-directional, Set Style, Dijkstra search.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public void shortestPathPrep(StringBuilder sbExpTab, String szOptions) throws SQLException
shortestPathPrep
in interface OraclePropertyGraphAnalytics
sbExpTab
- a place holder for the name of the expansion table to be used
for Bi-directional, Set Style, Dijkstra search. If sbExpTab is empty,
an intermediate working table will be created and the table name will be
returned in the sbExpTab object.szOptions
- options to be used by the underlying PL/SQL API.SQLException
public void shutdown()
shutdown
in interface Graph
shutdown
in interface TransactionalGraph
public static void sparsifyGraph(Connection conn, String szEdgeTabName, float fThreshold, int iMinKeep, int iDOP, StringBuilder sbOutTab, StringBuilder sbUndTab, StringBuilder sbHshTab, StringBuilder sbMchTab, String szTBS, String szOptions) throws SQLException
sbOutTab
- a place holder for the name of the output table that holds the sparsified graphsbUndTab
- a place holder for the name of the working table that holds
undirected graphsbHshTab
- a place holder for the name of the working table that holds
min hash valuessbMchTab
- a place holder for the name of the working table that holds
match countsszOptions
- options to be used by the underlying PL/SQL API.SQLException
public void sparsifyGraph(float fThreshold, int iMinKeep, int iDOP, StringBuilder sbOutTab, StringBuilder sbUndTab, StringBuilder sbHshTab, StringBuilder sbMchTab, String szTBS, String szOptions) throws SQLException
sbOutTab
- a place holder for the name of the output table that holds the sparsified graphsbUndTab
- a place holder for the name of the working table that holds
undirected graphsbHshTab
- a place holder for the name of the working table that holds
min hash valuessbMchTab
- a place holder for the name of the working table that holds
match countsszOptions
- options to be used by the underlying PL/SQL API.SQLException
public void sparsifyGraphCleanup(StringBuilder sbOutTab, StringBuilder sbUndTab, StringBuilder sbHshTab, StringBuilder sbMchTab, String szOptions) throws SQLException
sbOutTab
- a place holder for the name of the output table that holds the sparsified graphsbUndTab
- a place holder for the name of the working table that holds
undirected graphsbHshTab
- a place holder for the name of the working table that holds
min hash valuessbMchTab
- a place holder for the name of the working table that holds
match countsszOptions
- options to be used by the underlying PL/SQL API.SQLException
public void sparsifyGraphPrep(StringBuilder sbOutTab, StringBuilder sbUndTab, StringBuilder sbHshTab, StringBuilder sbMchTab, String szOptions) throws SQLException
sbOutTab
- a place holder for the name of the output table that holds the sparsified graphsbUndTab
- a place holder for the name of the working table that holds
undirected graphsbHshTab
- a place holder for the name of the working table that holds
min hash valuessbMchTab
- a place holder for the name of the working table that holds
match countsszOptions
- options to be used by the underlying PL/SQL API.SQLException
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.