public interface OraclePgqlStatement
extends java.lang.AutoCloseable
A typical usage is shown below.
Oracle oracle = new Oracle(jdbcUrl,user,password);
OraclePropertyGraph graph = OraclePropertyGraph.getInstance(oracle,graphName);
OraclePgqlStatement ops =
OraclePgqlExecutionFactory.createStatement(graph);
OraclePgqlResultSet oprs = ops.executeQuery(pgqlString, "USE_GT_TAB=T");
OraclePgqlResultSetMetaData rsmd = oprs.getMetaData();
Iterator<OraclePgqlResult> itr = oprs.getResults().iterator();
while(itr.hasNext()) {
OraclePgqlResult opr = itr.next();
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
OraclePgqlColumnDescriptor.Type t = opr.getColumnType(i);
switch (t) {
case VERTEX:
// process vertex
break;
case EDGE:
// process edge
break;
case VALUE:
// process value
break;
}
}
}
oprs.close();
ops.close();
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases this OraclePgqlStatment's database and JDBC resources.
|
OraclePgqlResultSet |
executeQuery(java.lang.String pgql, int timeout, int parallel, long queryID, int dynamicSampling, int maxResults, java.lang.String options)
Translates this instance's PGQL statement into a SQL statement and executes the SQL against this instance's property graph.
|
OraclePgqlResultSet |
executeQuery(java.lang.String pgql, java.lang.String options)
Translates this instance's PGQL statement into a SQL statement and executes the SQL against this instance's property graph.
|
int |
getFetchSize()
Returns the the number of rows that should be fetched from the database when more rows are needed for a query result.
|
void |
setFetchSize(int fetchSize)
Sets the number of rows that should be fetched from the database when more rows are needed for a query result.
|
OraclePgqlSqlTrans |
translateQuery(java.lang.String pgql, int parallel, int dynamicSampling, int maxResults, java.lang.String options)
Translates this instance's PGQL statement into a SQL statement.
|
OraclePgqlSqlTrans |
translateQuery(java.lang.String pgql, java.lang.String options)
Translates this instance's PGQL statement into a SQL statement.
|
void close() throws java.sql.SQLException
Closing this OraclePgqlStatement will close all OraclePgqlResultSets that were created from it.
close
in interface java.lang.AutoCloseable
java.sql.SQLException
OraclePgqlResultSet executeQuery(java.lang.String pgql, int timeout, int parallel, long queryID, int dynamicSampling, int maxResults, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException, java.sql.SQLException
Supported query options are:
USE_GT_TAB=T Use the GRAPH_NAMEGT$ table instead of the GRAPH_NAMEGE$ table for evaluating edge traversals.
USE_RW=F Use CONNECT BY instead of recursive WITH for unbounded path traversals.
MAX_PATH_LEN=n Traverse at most n hops when evaluating unbounded path traversals.
EDGE_SET_PARTIAL=T Fetch properties for each start and end vertex found when reading edges from the query result.
pgql
- the PGQL query to executetimeout
- the number of seconds for query execution to finishparallel
- the degree of parallelism to use for query executionqueryID
- the query IDdynamicSampling
- the value for dynamic samplingmaxResults
- the maximum number of rows returnedoptions
- additional options used to influence query translation and executionOraclePgqlResultSet
object with the result of the provided PGQL queryPgqlToSqlException
oracle.pgql.lang.PgqlException
java.sql.SQLException
OraclePgqlResultSet executeQuery(java.lang.String pgql, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException, java.sql.SQLException
Supported query options are:
USE_GT_TAB=T Use the GRAPH_NAMEGT$ table instead of the GRAPH_NAMEGE$ table for evaluating edge traversals.
USE_RW=F Use CONNECT BY instead of recursive WITH for unbounded path traversals.
MAX_PATH_LEN=n Traverse at most n hops when evaluating unbounded path traversals.
EDGE_SET_PARTIAL=T Fetch properties for each start and end vertex found when reading edges from the query result.
pgql
- the PGQL query to executeoptions
- additional options used to influence query translation and executionOraclePgqlResultSet
object with the result of the provided PGQL queryPgqlToSqlException
oracle.pgql.lang.PgqlException
java.sql.SQLException
int getFetchSize()
void setFetchSize(int fetchSize)
fetchSize
- the query fetch sizeOraclePgqlSqlTrans translateQuery(java.lang.String pgql, int parallel, int dynamicSampling, int maxResults, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
USE_GT_TAB=T Use the GRAPH_NAMEGT$ table instead of the GRAPH_NAMEGE$ table for evaluating edge traversals.
USE_RW=F Use CONNECT BY instead of recursive WITH for unbounded path traversals.
MAX_PATH_LEN=n Traverse at most n hops when evaluating unbounded path traversals.
EDGE_SET_PARTIAL=T Fetch properties for each start and end vertex found when reading edges from the query result.
pgql
- the PGQL query to translateparallel
- the degree of parallelism to use for query executiondynamicSampling
- the value for dynamic samplingmaxResults
- the maximum number of rows returnedoptions
- additional options used to influence query translationOraclePgqlSqlTrans
object with the SQL translation and column metadata for the provided PGQL queryPgqlToSqlException
oracle.pgql.lang.PgqlException
OraclePgqlSqlTrans translateQuery(java.lang.String pgql, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
USE_GT_TAB=T Use the GRAPH_NAMEGT$ table instead of the GRAPH_NAMEGE$ table for evaluating edge traversals.
USE_RW=F Use CONNECT BY instead of recursive WITH for unbounded path traversals.
MAX_PATH_LEN=n Traverse at most n hops when evaluating unbounded path traversals.
EDGE_SET_PARTIAL=T Fetch properties for each start and end vertex found when reading edges from the query result.
pgql
- the PGQL query to translateoptions
- additional options used to influence query translationOraclePgqlSqlTrans
object with the SQL translation and column metadata for the provided PGQL queryPgqlToSqlException
oracle.pgql.lang.PgqlException
Copyright © 2017, 2018 Oracle and/or its affiliates. All Rights Reserved.