public class PgqlExecution extends java.lang.Object implements PgqlPreparedStatement
PgqlStatement and
PgqlPreparedStatement interfaces for executing
PGQL queries against graphs stored in Oracle Database.
Refer to the documentation of these interfaces for further explanation and sample code.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases this PgqlStatment's database and JDBC resources.
|
boolean |
execute(int parallel,
int dynamicSampling,
java.lang.String matchOptions,
java.lang.String options)
Executes a PGQL Query, Modify or Create/Drop operation on this
instance's property graph.
|
boolean |
execute(java.lang.String pgql,
int parallel,
int dynamicSampling,
java.lang.String matchOptions,
java.lang.String options)
Executes a PGQL Modify operation on this instance's property graph.
|
boolean |
execute(java.lang.String matchOptions,
java.lang.String options)
Executes a PGQL Query, Modify or Create/Drop operation on this
instance's property graph.
|
boolean |
execute(java.lang.String pgql,
java.lang.String matchOptions,
java.lang.String options)
Executes a PGQL Query, Modify or Create/Drop operation on this
instance's property graph.
|
PgqlResultSet |
executeQuery(int timeout,
int parallel,
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.
|
PgqlResultSet |
executeQuery(java.lang.String options)
Translates this instance's PGQL statement into a SQL statement
and executes the SQL against this instance's property graph.
|
PgqlResultSet |
executeQuery(java.lang.String pgql,
int timeout,
int parallel,
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.
|
PgqlResultSet |
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 |
getBatchSize()
Returns the number of commands that should be batched when executing updates
|
int |
getFetchSize()
Returns the the number of rows that should be fetched from the database when more
rows are needed for a query result.
|
long |
getModifyCount()
Returns the number of rows that were modified
by last execute operation
|
PgqlResultSet |
getResultSet()
Returns the current result as a PgqlResultSet object.
|
void |
setArray(int parameterIndex,
java.util.List<?> x)
Sets the designated parameter to the given Java List value.
|
void |
setBatchSize(int batchSize)
Sets the number of commands that should be batched when executing updates
|
void |
setBoolean(int parameterIndex,
boolean x)
Sets the designated parameter to the given Java boolean value.
|
void |
setDate(int parameterIndex,
java.time.LocalDate x)
Sets the designated parameter to the given Java LocalDate value.
|
void |
setDouble(int parameterIndex,
double x)
Sets the designated parameter to the given Java double value.
|
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.
|
void |
setFloat(int parameterIndex,
float x)
Sets the designated parameter to the given Java float value.
|
void |
setInt(int parameterIndex,
int x)
Sets the designated parameter to the given Java int value.
|
void |
setLong(int parameterIndex,
long x)
Sets the designated parameter to the given Java long value.
|
void |
setString(int parameterIndex,
java.lang.String x)
Sets the designated parameter to the given Java String value.
|
void |
setTime(int parameterIndex,
java.time.LocalTime x)
Sets the designated parameter to the given Java LocalTime value.
|
void |
setTimestamp(int parameterIndex,
java.time.LocalDateTime x)
Sets the designated parameter to the given Java LocalDateTime value.
|
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x)
Sets the designated parameter to the given Java Timestamp value.
|
void |
setTimestampWithTimezone(int parameterIndex,
java.time.OffsetDateTime x)
Sets the designated parameter to the given Java OffsetDateTime value.
|
void |
setTimeWithTimezone(int parameterIndex,
java.time.OffsetTime x)
Sets the designated parameter to the given Java OffsetTime value.
|
PgqlSqlQueryTrans |
translateQuery()
Translates this instance's PGQL statement into a SQL statement.
|
PgqlSqlQueryTrans |
translateQuery(int parallel,
int dynamicSampling,
int maxResults,
java.lang.String options)
Translates this instance's PGQL statement into a SQL statement.
|
PgqlSqlQueryTrans |
translateQuery(java.lang.String options)
Translates this instance's PGQL statement into a SQL statement.
|
PgqlSqlQueryTrans |
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.
|
PgqlSqlQueryTrans |
translateQuery(java.lang.String pgql,
java.lang.String options)
Translates this instance's PGQL statement into a SQL statement.
|
PgqlSqlTrans |
translateStatement()
Translates this instance's PGQL statement into a series
of SQL statements.
|
PgqlSqlTrans |
translateStatement(int parallel,
int dynamicSampling,
int maxResults,
java.lang.String matchOptions,
java.lang.String options)
Translates this instance's PGQL statement into a series
of SQL statements.
|
PgqlSqlTrans |
translateStatement(java.lang.String pgql,
int parallel,
int dynamicSampling,
int maxResults,
java.lang.String matchOptions,
java.lang.String options)
Translates the given PGQL statement into a series
of SQL statements.
|
PgqlSqlTrans |
translateStatement(java.lang.String matchOptions,
java.lang.String options)
Translates this instance's PGQL statement into a series
of SQL statements.
|
PgqlSqlTrans |
translateStatement(java.lang.String pgql,
java.lang.String matchOptions,
java.lang.String options)
Translates the given PGQL statement into a series
of SQL statements.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecute, executeQueryexecutepublic void close()
throws oracle.pgql.lang.PgqlException
close in interface java.lang.AutoCloseableclose in interface PgqlStatementclose in interface oracle.pgql.lang.PreparedStatementoracle.pgql.lang.PgqlExceptionpublic boolean execute(int parallel,
int dynamicSampling,
java.lang.String matchOptions,
java.lang.String options)
throws PgqlToSqlException,
oracle.pgql.lang.PgqlException
Supported query options (matchOptions) are the same as those for executeQuery.
Supported modify options are:
STREAMING=T Use result sets instead of temporary tables to perform the update.
AUTO_COMMIT=F Do not commit after performing the modify operation.
DELETE_CASCADE=F Do not delete incoming/outgoing edges when deleting a vertex.
execute in interface PgqlPreparedStatementparallel - the degree of parallelism to use for query
and modify executiondynamicSampling - the value for dynamic samplingmatchOptions - additional options used to influence query
translation and executionoptions - additional options used to influence modify
translation and executionPgqlToSqlException - if a server-side error occurs during
translation or SQL executionoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic boolean execute(java.lang.String pgql,
int parallel,
int dynamicSampling,
java.lang.String matchOptions,
java.lang.String options)
throws PgqlToSqlException,
oracle.pgql.lang.PgqlException
Supported query options (matchOptions) are the same as those for executeQuery.
Supported modify options are:
STREAMING=T Use result sets instead of temporary tables to perform the update.
AUTO_COMMIT=F Do not commit after performing the modify operation.
DELETE_CASCADE=F Do not delete incoming/outgoing edges when deleting a vertex.
execute in interface PgqlStatementpgql - the PGQL modify to executeparallel - the degree of parallelism to use for query
and update executiondynamicSampling - the value for dynamic samplingmatchOptions - additional options used to influence query
translation and executionoptions - additional options used to influence modify
translation and executionPgqlToSqlException - if a server-side error occurs during
translation or SQL executionoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic boolean execute(java.lang.String matchOptions,
java.lang.String options)
throws PgqlToSqlException,
oracle.pgql.lang.PgqlException
Supported query options (matchOptions) are the same as those for executeQuery.
Supported modify options are:
STREAMING=T Use result sets instead of temporary tables to perform update.
AUTO_COMMIT=F Do not commit after performing the modify operation.
DELETE_CASCADE=F Do not delete incoming/outgoing edges when deleting a vertex.
execute in interface PgqlPreparedStatementmatchOptions - additional options used to influence query
translation and executionoptions - additional options used to influence modify
translation and executionPgqlToSqlException - if a server-side error occurs during
translation or SQL executionoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic boolean execute(java.lang.String pgql,
java.lang.String matchOptions,
java.lang.String options)
throws PgqlToSqlException,
oracle.pgql.lang.PgqlException
Supported query options (matchOptions) are the same as those for executeQuery.
Supported modify options are:
STREAMING=T Use result sets instead of temporary tables to perform the update.
AUTO_COMMIT=F Do not commit after performing the modify operation.
DELETE_CASCADE=F Do not delete incoming/outgoing edges when deleting a vertex.
execute in interface PgqlStatementpgql - the PGQL to executematchOptions - additional options used to influence query
translation and executionoptions - additional options used to influence modify
translation and executionPgqlToSqlException - if a server-side error occurs during
translation or SQL executionoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlResultSet executeQuery(int timeout, int parallel, int dynamicSampling, int maxResults, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
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.
executeQuery in interface PgqlPreparedStatementtimeout - the number of seconds for query execution
to finishparallel - 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
translation and executionPgqlResultSet object with
the result of the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translation or SQL executionoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlResultSet executeQuery(java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
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.
executeQuery in interface PgqlPreparedStatementoptions - additional options used to influence query
translation and executionPgqlResultSet object with
the result of the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translation or SQL executionoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlResultSet executeQuery(java.lang.String pgql, int timeout, int parallel, int dynamicSampling, int maxResults, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
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.
executeQuery in interface PgqlStatementpgql - the PGQL query to executetimeout - the number of seconds for query execution
to finishparallel - 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
translation and executionPgqlResultSet object with
the result of the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translation or SQL executionoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlResultSet executeQuery(java.lang.String pgql, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
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.
executeQuery in interface PgqlStatementpgql - the PGQL query to executeoptions - additional options used to influence query
translation and executionPgqlResultSet object with
the result of the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translation or SQL executionoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic int getBatchSize()
getBatchSize in interface PgqlStatementpublic int getFetchSize()
getFetchSize in interface PgqlStatementpublic long getModifyCount()
PgqlStatementgetModifyCount in interface PgqlStatementpublic PgqlResultSet getResultSet()
getResultSet in interface PgqlStatementgetResultSet in interface oracle.pgql.lang.PreparedStatementPgqlResultSet object with the result
of the last executed PGQL query, or null if the query
last executed PGQL was not a Select statementpublic void setArray(int parameterIndex,
java.util.List<?> x)
throws oracle.pgql.lang.PgqlException
setArray in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueoracle.pgql.lang.PgqlExceptionpublic void setBatchSize(int batchSize)
setBatchSize in interface PgqlStatementbatchSize - the update batch sizepublic void setBoolean(int parameterIndex,
boolean x)
setBoolean in interface PgqlPreparedStatementsetBoolean in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuepublic void setDate(int parameterIndex,
java.time.LocalDate x)
throws oracle.pgql.lang.PgqlException
setDate in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueoracle.pgql.lang.PgqlExceptionpublic void setDouble(int parameterIndex,
double x)
setDouble in interface PgqlPreparedStatementsetDouble in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuepublic void setFetchSize(int fetchSize)
setFetchSize in interface PgqlStatementfetchSize - the query fetch sizepublic void setFloat(int parameterIndex,
float x)
setFloat in interface PgqlPreparedStatementsetFloat in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuepublic void setInt(int parameterIndex,
int x)
setInt in interface PgqlPreparedStatementsetInt in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuepublic void setLong(int parameterIndex,
long x)
setLong in interface PgqlPreparedStatementsetLong in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuepublic void setString(int parameterIndex,
java.lang.String x)
setString in interface PgqlPreparedStatementsetString in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuepublic void setTime(int parameterIndex,
java.time.LocalTime x)
throws oracle.pgql.lang.PgqlException
setTime in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueoracle.pgql.lang.PgqlExceptionpublic void setTimestamp(int parameterIndex,
java.time.LocalDateTime x)
throws oracle.pgql.lang.PgqlException
setTimestamp in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueoracle.pgql.lang.PgqlExceptionpublic void setTimestamp(int parameterIndex,
java.sql.Timestamp x)
Timestamp values are assumed to be in Coordinated Universal Time (UTC).
setTimestamp in interface PgqlPreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuepublic void setTimestampWithTimezone(int parameterIndex,
java.time.OffsetDateTime x)
throws oracle.pgql.lang.PgqlException
setTimestampWithTimezone in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueoracle.pgql.lang.PgqlExceptionpublic void setTimeWithTimezone(int parameterIndex,
java.time.OffsetTime x)
throws oracle.pgql.lang.PgqlException
setTimeWithTimezone in interface oracle.pgql.lang.PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valueoracle.pgql.lang.PgqlExceptionpublic PgqlSqlQueryTrans translateQuery() throws PgqlToSqlException, oracle.pgql.lang.PgqlException
translateQuery in interface PgqlPreparedStatementPgqlSqlQueryTrans object with
the SQL translation and column metadata for
the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlQueryTrans translateQuery(int parallel, int dynamicSampling, int maxResults, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
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.
translateQuery in interface PgqlPreparedStatementparallel - 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
translationPgqlSqlQueryTrans object with
the SQL translation and column metadata for
the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlQueryTrans translateQuery(java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
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.
translateQuery in interface PgqlPreparedStatementoptions - additional options used to influence query
translationPgqlSqlQueryTrans object with
the SQL translation and column metadata for
the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlQueryTrans 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_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.
translateQuery in interface PgqlStatementpgql - 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
translationPgqlSqlQueryTrans object with
the SQL translation and column metadata for
the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlQueryTrans translateQuery(java.lang.String pgql, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
Supported query options are:
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.
translateQuery in interface PgqlStatementpgql - the PGQL query to translateoptions - additional options used to influence query
translationPgqlSqlQueryTrans object with
the SQL translation and column metadata for
the provided PGQL queryPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlTrans translateStatement() throws PgqlToSqlException, oracle.pgql.lang.PgqlException
PgqlPreparedStatementtranslateStatement in interface PgqlPreparedStatementPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlTrans translateStatement(int parallel, int dynamicSampling, int maxResults, java.lang.String matchOptions, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
PgqlPreparedStatementtranslateStatement in interface PgqlPreparedStatementparallel - the degree of parallelism to use for query
executiondynamicSampling - the value for dynamic samplingmaxResults - the maximum number of rows returnedmatchOptions - additional options used to influence query
translation and executionoptions - additional options used to influence DDL/DML
translation and executionPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlTrans translateStatement(java.lang.String pgql, int parallel, int dynamicSampling, int maxResults, java.lang.String matchOptions, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
PgqlStatementtranslateStatement in interface PgqlStatementpgql - the PGQL statement to translateparallel - the degree of parallelism to use for query
executiondynamicSampling - the value for dynamic samplingmaxResults - the maximum number of rows returnedmatchOptions - additional options used to influence query
translation and executionoptions - additional options used to influence DDL/DML
translation and executionPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlTrans translateStatement(java.lang.String matchOptions, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
PgqlPreparedStatementtranslateStatement in interface PgqlPreparedStatementmatchOptions - additional options used to influence query
translation and executionoptions - additional options used to influence DDL/DML
translation and executionPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed Statementpublic PgqlSqlTrans translateStatement(java.lang.String pgql, java.lang.String matchOptions, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
PgqlStatementtranslateStatement in interface PgqlStatementpgql - the PGQL statement to translatematchOptions - additional options used to influence query
translation and executionoptions - additional options used to influence DDL/DML
translation and executionPgqlToSqlException - if a server-side error occurs during
translationoracle.pgql.lang.PgqlException - if a server-side error occurs or this method
is called on a closed StatementCopyright © 2015 - 2020 Oracle and/or its affiliates. All Rights Reserved.