Package oracle.pgx.api.subgraph
Class GenericSubgraphReader
- java.lang.Object
-
- oracle.pgx.api.subgraph.AbstractSubgraphReader<GenericSubgraphReader>
-
- oracle.pgx.api.subgraph.GenericSubgraphReader
-
public class GenericSubgraphReader extends AbstractSubgraphReader<GenericSubgraphReader>
Entry point for subgraph reading. This reader does not support any operation by itself. To use the initial subgraph reading feature, specify a source. You may, for example, usefromPgPgql(String)
to start configuring a reading operation from PG Views, using some PGQL queries.
-
-
Constructor Summary
Constructors Constructor Description GenericSubgraphReader(PgxSession session, oracle.pgx.api.subgraph.internal.KeystoreLookup keystoreLookup, java.util.function.Function<GraphConfig,PgxFuture<PgxGraph>> readFunction)
Create an instance of this generic reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PgViewSubgraphReader
fromPgPgql(java.lang.String graphName)
Read a subgraph from PG PGQL, using a set of PGQL queries.PgViewSubgraphReader
fromPgPgql(java.lang.String schemaName, java.lang.String graphName)
Read a subgraph from PG PGQL, using a set of PGQL queries.PgSqlSubgraphReader
fromPgSql(java.lang.String graphName)
Read a subgraph of a SQL Property Graph, using a set of PGQL queries.PgSqlSubgraphReader
fromPgSql(java.lang.String schemaName, java.lang.String graphName)
Read a subgraph of a SQL Property Graph, using a set of PGQL queries.PgxFuture<PgxGraph>
loadAsync(java.lang.String graphName)
Load the subgraph.-
Methods inherited from class oracle.pgx.api.subgraph.AbstractSubgraphReader
load, load, loadAsync
-
-
-
-
Constructor Detail
-
GenericSubgraphReader
public GenericSubgraphReader(PgxSession session, oracle.pgx.api.subgraph.internal.KeystoreLookup keystoreLookup, java.util.function.Function<GraphConfig,PgxFuture<PgxGraph>> readFunction)
Create an instance of this generic reader. Do not use this constructor, usePgxSession.readSubgraph()
to acquire an instance instead.- Parameters:
session
- The session for the read operation.keystoreLookup
- A helper of looking up keystore entries.readFunction
- A function used to read the actual subgraph.
-
-
Method Detail
-
loadAsync
public PgxFuture<PgxGraph> loadAsync(java.lang.String graphName)
Description copied from class:AbstractSubgraphReader
Load the subgraph.- Specified by:
loadAsync
in classAbstractSubgraphReader<GenericSubgraphReader>
- Parameters:
graphName
- the name of the graph- Returns:
- The subgraph.
-
fromPgPgql
public PgViewSubgraphReader fromPgPgql(java.lang.String graphName)
Read a subgraph from PG PGQL, using a set of PGQL queries.- Parameters:
graphName
- The name of the graph in the database.- Returns:
- A config builder for the read operation.
-
fromPgPgql
public PgViewSubgraphReader fromPgPgql(java.lang.String schemaName, java.lang.String graphName)
Read a subgraph from PG PGQL, using a set of PGQL queries.- Parameters:
graphName
- The name of the graph in the database.schemaName
- The name of the schema in the database.- Returns:
- A config builder for the read operation.
-
fromPgSql
public PgSqlSubgraphReader fromPgSql(java.lang.String graphName)
Read a subgraph of a SQL Property Graph, using a set of PGQL queries.- Parameters:
graphName
- The SQL graph name.- Returns:
- A config builder for the read operation.
-
fromPgSql
public PgSqlSubgraphReader fromPgSql(java.lang.String schemaName, java.lang.String graphName)
Read a subgraph of a SQL Property Graph, using a set of PGQL queries.- Parameters:
graphName
- The SQL schema name.graphName
- The SQL graph name.- Returns:
- A config builder for the read operation.
-
-