Package oracle.pgx.api.subgraph
Class PgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>
java.lang.Object
oracle.pgx.api.subgraph.AbstractSubgraphReader<R>
oracle.pgx.api.subgraph.PgqlBasedSubgraphReader<R,P>
- Type Parameters:
R- The subgraph loader type.P- The prepared query type.
- Direct Known Subclasses:
PgSqlSubgraphReader,PgViewSubgraphReader,PreparedPgSqlPgqlQuery,PreparedPgViewPgqlQuery
public abstract class PgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>
extends AbstractSubgraphReader<R>
Common base class for subgraph loaders that use PGQL queries to declare a subgraph.
-
Constructor Summary
ConstructorsConstructorDescriptionPgqlBasedSubgraphReader(PgxSession session, oracle.pgx.api.subgraph.internal.KeystoreLookup keystoreLookup, Function<GraphConfig, PgxFuture<PgxGraph>> readFunction, SourceType graphSourceType, String owner, String dbGraphName) -
Method Summary
Modifier and TypeMethodDescriptionconnections(int numConnections) sets the number of connections to open to load the data in paralleldataSourceId(String dataSourceId) sets the dataSourceId to which to connectescapeKeysWithPgxSpecialCharacters(boolean value) If this setting is applied, keys with special characters will be ignored while loading subgraphsets the jdbcUrl to use for connecting to the DBkeystoreAlias(String keystoreAlias) sets the keystore alias to retrieve the password from the keystoreLoad the subgraph.Load the subgraph.sets the password to use for connecting to the databaseabstract PpreparedPgqlQuery(String query) Adds a prepared query to list of queries that will be executed to load the subgraph.Adds another filtering query to the list of queries that will be executed to load the subgraph.sets the username of the DB user to use to connect to the DBwithConfig(PartitionedGraphConfig config) sets the graph configuration to use for loading the subgraph.Methods inherited from class oracle.pgx.api.subgraph.AbstractSubgraphReader
load, load
-
Constructor Details
-
PgqlBasedSubgraphReader
public PgqlBasedSubgraphReader(PgxSession session, oracle.pgx.api.subgraph.internal.KeystoreLookup keystoreLookup, Function<GraphConfig, PgxFuture<PgxGraph>> readFunction, SourceType graphSourceType, String owner, String dbGraphName)
-
-
Method Details
-
withConfig
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
sets the dataSourceId to which to connect- Parameters:
dataSourceId- the datasourceId- Returns:
- this loader
-
jdbcUrl
sets the jdbcUrl to use for connecting to the DB- Parameters:
jdbcUrl- the jdbc url- Returns:
- this loader
-
username
sets the username of the DB user to use to connect to the DB- Parameters:
userName- the username- Returns:
- this loader
-
keystoreAlias
sets the keystore alias to retrieve the password from the keystore- Parameters:
keystoreAlias- the keystore alias- Returns:
- this loader
-
password
sets the password to use for connecting to the database- Parameters:
password- the password- Returns:
- this loader
-
connections
sets the number of connections to open to load the data in parallel- Parameters:
numConnections- the number of connections- Returns:
- this loader
-
escapeKeysWithPgxSpecialCharacters
If this setting is applied, keys with special characters will be ignored while loading subgraph- Returns:
- this loader
-
queryPgql
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
Adds a prepared query to list of queries that will be executed to load the subgraph. The query has to also start with aMATCHclause. 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.
-
loadAsync
Description copied from class:AbstractSubgraphReaderLoad the subgraph.- Overrides:
loadAsyncin classAbstractSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>> - Returns:
- The subgraph.
-
loadAsync
Description copied from class:AbstractSubgraphReaderLoad the subgraph.- Specified by:
loadAsyncin classAbstractSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>> - Parameters:
graphName- the name of the graph- Returns:
- The subgraph.
-