public interface PgqlStatement
extends java.lang.AutoCloseable
A typical usage is shown below.
PgqlConnection pgqlConn = PgqlConnection.getConnection(conn);
// If schema is not specified, JDBC Connection schema is used
pgqlConn.setSchema("SCOTT");
pgqlConn.setGraph("GRAPH");
PgqlStatement pgqlStmt = pgqlConn.createStatement();
PgqlResultSet rs = pgqlStmt.executeQuery(pgqlString, "");
while(rs.next()) {
// process result (e.g., value of name column)
String nameVal = rs.getString("name");
}
rs.close();
stmt.close();
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases this PgqlStatment's database and JDBC resources.
|
default boolean |
execute(java.lang.String pgql)
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 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(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 |
setBatchSize(int batchSize)
Sets the number of commands that should be batched when executing updates
|
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.
|
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(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 pgql,
java.lang.String matchOptions,
java.lang.String options)
Translates the given PGQL statement into a series
of SQL statements.
|
void close() throws oracle.pgql.lang.PgqlException
Closing this PgqlStatement will close all PgqlResultSets that were created from it.
close
in interface java.lang.AutoCloseable
oracle.pgql.lang.PgqlException
default boolean execute(java.lang.String pgql) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
pgql
- the PGQL modify to executePgqlToSqlException
- 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 Statementboolean 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.
pgql
- 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 Statementboolean 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.
pgql
- the PGQL modify 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 StatementPgqlResultSet 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.
pgql
- 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 StatementPgqlResultSet 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.
pgql
- 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 Statementint getBatchSize()
int getFetchSize()
long getModifyCount()
PgqlResultSet getResultSet()
PgqlResultSet
object with the result
of the last executed PGQL query, or null if the query
last executed PGQL was not a Select statementvoid setBatchSize(int batchSize)
batchSize
- the update batch sizevoid setFetchSize(int fetchSize)
fetchSize
- the query fetch sizePgqlSqlQueryTrans 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.
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
translationPgqlSqlTrans
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 StatementPgqlSqlQueryTrans 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.
pgql
- the PGQL query to translateoptions
- additional options used to influence query
translationPgqlSqlTrans
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 StatementPgqlSqlTrans 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
pgql
- 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 StatementPgqlSqlTrans translateStatement(java.lang.String pgql, java.lang.String matchOptions, java.lang.String options) throws PgqlToSqlException, oracle.pgql.lang.PgqlException
pgql
- 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.