Package oracle.pgx.api.subgraph
Class PreparedPgSqlPgqlQuery
- java.lang.Object
-
- oracle.pgx.api.subgraph.AbstractSubgraphReader<R>
-
- oracle.pgx.api.subgraph.PgqlBasedSubgraphReader<R,P>
-
- oracle.pgx.api.subgraph.PreparedPgSqlPgqlQuery
-
- All Implemented Interfaces:
oracle.pgx.api.subgraph.internal.PreparedQueryBuilder<PreparedPgSqlPgqlQuery>,PreparedPgqlQueryBuilder<PreparedPgSqlPgqlQuery>
public class PreparedPgSqlPgqlQuery extends PgqlBasedSubgraphReader<R,P> implements PreparedPgqlQueryBuilder<PreparedPgSqlPgqlQuery>
A configuration builder for initial subgraph reading using a prepared PGQL query. Use this class to provide all the required arguments for the query or to continue configuring the read operation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rconnections(int numConnections)sets the number of connections to open to load the data in parallelRdataSourceId(java.lang.String dataSourceId)sets the dataSourceId to which to connectRjdbcUrl(java.lang.String jdbcUrl)sets the jdbcUrl to use for connecting to the DBRkeystoreAlias(java.lang.String keystoreAlias)sets the keystore alias to retrieve the password from the keystorePgxGraphload(java.lang.String graphName)Blocking version ofAbstractSubgraphReader.loadAsync(String).PgxFuture<PgxGraph>loadAsync()Load the subgraph.PgxFuture<PgxGraph>loadAsync(java.lang.String graphName)Load the subgraph.Rowner(java.lang.String owner)Rpassword(java.lang.String password)sets the password to use for connecting to the databasePpreparedPgqlQuery(java.lang.String query)Adds a prepared query to list of queries that will be executed to load the subgraph.RqueryPgql(java.lang.String query)Adds another filtering query to the list of queries that will be executed to load the subgraph.Rschema(java.lang.String schema)Rusername(java.lang.String userName)sets the username of the DB user to use to connect to the DBPreparedPgSqlPgqlQuerywithArg(int position, QueryArgumentType type, java.lang.Object value)RwithConfig(PartitionedGraphConfig config)sets the graph configuration to use for loading the subgraph.-
Methods inherited from class oracle.pgx.api.subgraph.AbstractSubgraphReader
load
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.pgx.api.subgraph.PreparedPgqlQueryBuilder
withBooleanArg, withDateArg, withDoubleArg, withFloatArg, withIntegerArg, withLongArg, withStringArg, withTimeArg, withTimestampArg, withTimestampWithTimezoneArg, withTimeWithTimezoneArg
-
-
-
-
Method Detail
-
withArg
public PreparedPgSqlPgqlQuery withArg(int position, QueryArgumentType type, java.lang.Object value)
- Specified by:
withArgin interfaceoracle.pgx.api.subgraph.internal.PreparedQueryBuilder<PreparedPgSqlPgqlQuery>
-
load
public PgxGraph load(java.lang.String graphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from class:AbstractSubgraphReaderBlocking version ofAbstractSubgraphReader.loadAsync(String). Starts the reading operation and awaits its completion.- Overrides:
loadin classAbstractSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>>- Parameters:
graphName- the graph name- Returns:
- The loaded subgraph.
- Throws:
java.util.concurrent.ExecutionException- When the operation failed.java.lang.InterruptedException- When the asynchronous operation is interrupted.
-
withConfig
public R withConfig(PartitionedGraphConfig config)
Description copied from class:PgqlBasedSubgraphReadersets 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.- Overrides:
withConfigin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
config- the configuration of the graph to load- Returns:
- this loader
-
dataSourceId
public R dataSourceId(java.lang.String dataSourceId)
Description copied from class:PgqlBasedSubgraphReadersets the dataSourceId to which to connect- Overrides:
dataSourceIdin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
dataSourceId- the datasourceId- Returns:
- this loader
-
jdbcUrl
public R jdbcUrl(java.lang.String jdbcUrl)
Description copied from class:PgqlBasedSubgraphReadersets the jdbcUrl to use for connecting to the DB- Overrides:
jdbcUrlin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
jdbcUrl- the jdbc url- Returns:
- this loader
-
username
public R username(java.lang.String userName)
Description copied from class:PgqlBasedSubgraphReadersets the username of the DB user to use to connect to the DB- Overrides:
usernamein classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
userName- the username- Returns:
- this loader
-
keystoreAlias
public R keystoreAlias(java.lang.String keystoreAlias)
Description copied from class:PgqlBasedSubgraphReadersets the keystore alias to retrieve the password from the keystore- Overrides:
keystoreAliasin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
keystoreAlias- the keystore alias- Returns:
- this loader
-
password
public R password(java.lang.String password)
Description copied from class:PgqlBasedSubgraphReadersets the password to use for connecting to the database- Overrides:
passwordin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
password- the password- Returns:
- this loader
-
schema
public R schema(java.lang.String schema)
-
owner
public R owner(java.lang.String owner)
-
connections
public R connections(int numConnections)
Description copied from class:PgqlBasedSubgraphReadersets the number of connections to open to load the data in parallel- Overrides:
connectionsin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
numConnections- the number of connections- Returns:
- this loader
-
queryPgql
public R queryPgql(java.lang.String query)
Description copied from class:PgqlBasedSubgraphReaderAdds 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 ...).- Overrides:
queryPgqlin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
query- the PGQL query to use for filtering- Returns:
- this loader
-
loadAsync
public PgxFuture<PgxGraph> loadAsync(java.lang.String graphName)
Description copied from class:AbstractSubgraphReaderLoad the subgraph.- Overrides:
loadAsyncin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
graphName- the name of the graph- Returns:
- The subgraph.
-
loadAsync
public PgxFuture<PgxGraph> loadAsync()
Description copied from class:AbstractSubgraphReaderLoad the subgraph.- Overrides:
loadAsyncin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Returns:
- The subgraph.
-
preparedPgqlQuery
public P preparedPgqlQuery(java.lang.String query)
Description copied from class:PgqlBasedSubgraphReaderAdds 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.- Specified by:
preparedPgqlQueryin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>,P extends PgqlBasedSubgraphReader<R,P> & PreparedPgqlQueryBuilder<P>>- Parameters:
query- The PGQL query.- Returns:
- A builder used for providing arguments of the prepared query.
-
-