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

      • 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.