Class PgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,​P>,​P extends PgqlBasedSubgraphReader<R,​P> & PreparedPgqlQueryBuilder<P>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      R connections​(int numConnections)
      sets the number of connections to open to load the data in parallel
      R dataSourceId​(java.lang.String dataSourceId)
      sets the dataSourceId to which to connect
      R jdbcUrl​(java.lang.String jdbcUrl)
      sets the jdbcUrl to use for connecting to the DB
      R keystoreAlias​(java.lang.String keystoreAlias)
      sets the keystore alias to retrieve the password from the keystore
      PgxFuture<PgxGraph> loadAsync()
      Load the subgraph.
      PgxFuture<PgxGraph> loadAsync​(java.lang.String graphName)
      Load the subgraph.
      R password​(java.lang.String password)
      sets the password to use for connecting to the database
      abstract P preparedPgqlQuery​(java.lang.String query)
      Adds a prepared query to list of queries that will be executed to load the subgraph.
      R queryPgql​(java.lang.String query)
      Adds another filtering query to the list of queries that will be executed to load the subgraph.
      R username​(java.lang.String userName)
      sets the username of the DB user to use to connect to the DB
      R withConfig​(PartitionedGraphConfig config)
      sets the graph configuration to use for loading the subgraph.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PgqlBasedSubgraphReader

        public PgqlBasedSubgraphReader​(PgxSession session,
                                       oracle.pgx.api.subgraph.internal.KeystoreLookup keystoreLookup,
                                       java.util.function.Function<GraphConfig,​PgxFuture<PgxGraph>> readFunction,
                                       SourceType graphSourceType,
                                       java.lang.String owner,
                                       java.lang.String dbGraphName)
    • Method Detail

      • withConfig

        public R withConfig​(PartitionedGraphConfig config)
        sets the graph configuration to use for loading the subgraph. It has to correspond to a graph configuration for a graph that comes from a PG view.
        Parameters:
        config - the configuration of the graph to load
        Returns:
        this loader
      • dataSourceId

        public R dataSourceId​(java.lang.String dataSourceId)
        sets the dataSourceId to which to connect
        Parameters:
        dataSourceId - the datasourceId
        Returns:
        this loader
      • jdbcUrl

        public R jdbcUrl​(java.lang.String jdbcUrl)
        sets the jdbcUrl to use for connecting to the DB
        Parameters:
        jdbcUrl - the jdbc url
        Returns:
        this loader
      • username

        public R username​(java.lang.String userName)
        sets the username of the DB user to use to connect to the DB
        Parameters:
        userName - the username
        Returns:
        this loader
      • keystoreAlias

        public R keystoreAlias​(java.lang.String keystoreAlias)
        sets the keystore alias to retrieve the password from the keystore
        Parameters:
        keystoreAlias - the keystore alias
        Returns:
        this loader
      • password

        public R password​(java.lang.String password)
        sets the password to use for connecting to the database
        Parameters:
        password - the password
        Returns:
        this loader
      • connections

        public R connections​(int numConnections)
        sets the number of connections to open to load the data in parallel
        Parameters:
        numConnections - the number of connections
        Returns:
        this loader
      • queryPgql

        public R queryPgql​(java.lang.String query)
        Adds another filtering query to the list of queries that will be executed to load the subgraph. The query has to be starting at the first MATCH pattern (e.g. MATCH (u)-[e]->(v) WHERE ...).
        Parameters:
        query - the PGQL query to use for filtering
        Returns:
        this loader
      • preparedPgqlQuery

        public abstract P preparedPgqlQuery​(java.lang.String query)
        Adds a prepared query to list of queries that will be executed to load the subgraph. The query has to also start with a MATCH clause. This returns a builder which can be used to specify arguments for the prepared query. All the arguments must be provided before the reading operation is triggered.
        Parameters:
        query - The PGQL query.
        Returns:
        A builder used for providing arguments of the prepared query.