Class GenericSubgraphReader


@BetaApi 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, use fromPgPgql(String) to start configuring a reading operation from PG Views, using some PGQL queries.
  • Constructor Details

    • GenericSubgraphReader

      public GenericSubgraphReader(PgxSession session, oracle.pgx.api.subgraph.internal.KeystoreLookup keystoreLookup, Function<GraphConfig,PgxFuture<PgxGraph>> readFunction)
      Create an instance of this generic reader. Do not use this constructor, use PgxSession.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 Details

    • loadAsync

      public PgxFuture<PgxGraph> loadAsync(String graphName)
      Description copied from class: AbstractSubgraphReader
      Load the subgraph.
      Specified by:
      loadAsync in class AbstractSubgraphReader<GenericSubgraphReader>
      Parameters:
      graphName - the name of the graph
      Returns:
      The subgraph.
    • fromPgPgql

      public PgViewSubgraphReader fromPgPgql(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(String schemaName, 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(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(String schemaName, 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.