R
- The subgraph loader type.P
- The prepared query type.public abstract class PgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>> extends AbstractSubgraphReader<R>
Constructor and Description |
---|
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) |
Modifier and Type | Method and 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.
|
load, load
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)
public R connections(int numConnections)
numConnections
- the number of connectionspublic R dataSourceId(java.lang.String dataSourceId)
dataSourceId
- the datasourceIdpublic R jdbcUrl(java.lang.String jdbcUrl)
jdbcUrl
- the jdbc urlpublic R keystoreAlias(java.lang.String keystoreAlias)
keystoreAlias
- the keystore aliaspublic PgxFuture<PgxGraph> loadAsync()
AbstractSubgraphReader
loadAsync
in class AbstractSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>>
public PgxFuture<PgxGraph> loadAsync(java.lang.String graphName)
AbstractSubgraphReader
loadAsync
in class AbstractSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>>
graphName
- the name of the graphpublic R password(java.lang.String password)
password
- the passwordpublic abstract P preparedPgqlQuery(java.lang.String query)
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.query
- The PGQL query.public R queryPgql(java.lang.String query)
query
- the PGQL query to use for filteringpublic R username(java.lang.String userName)
userName
- the usernamepublic R withConfig(PartitionedGraphConfig config)
config
- the configuration of the graph to load