6.8.5 Java APIs for Executing SELECT Queries
This section describes the APIs to execute SELECT
queries
in the In-Memory graph server (PGX).
- Executing SELECT Queries Against a Graph in the In-memory Graph Server (PGX)
ThePgxGraph.queryPgql(String query)
method executes the query in the current session. The method returns aPgqlResultSet
. - Executing SELECT Queries Against a PGX Session
ThePgxSession.queryPgql(String query)
method executes the given query in the session and returns aPgqlResultSet
. - Iterating Through a Result Set
There are two ways to iterate through a result set: in a JDBC-like manner or using the Java Iterator interface. - Printing a Result Set
The following methods ofPgqlResultSet (package oracle.pgx.api)
are used to print a result set: