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
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 keystoreBlocking version ofAbstractSubgraphReader.loadAsync(String).Load the subgraph.Load the subgraph.sets the password to use for connecting to the databasepreparedPgqlQuery(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 DBwithArg(int position, QueryArgumentType type, Object value) withConfig(PartitionedGraphConfig config) sets the graph configuration to use for loading the subgraph.Methods inherited from class oracle.pgx.api.subgraph.AbstractSubgraphReader
loadMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface oracle.pgx.api.subgraph.PreparedPgqlQueryBuilder
withBooleanArg, withDateArg, withDoubleArg, withFloatArg, withIntegerArg, withLongArg, withStringArg, withTimeArg, withTimestampArg, withTimestampWithTimezoneArg, withTimeWithTimezoneArg
-
Method Details
-
withArg
- Specified by:
withArgin interfaceoracle.pgx.api.subgraph.internal.PreparedQueryBuilder<PreparedPgSqlPgqlQuery>
-
load
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:
ExecutionException- When the operation failed.InterruptedException- When the asynchronous operation is interrupted.
-
withConfig
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
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
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
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
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
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
-
connections
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
-
escapeKeysWithPgxSpecialCharacters
Description copied from class:PgqlBasedSubgraphReaderIf this setting is applied, keys with special characters will be ignored while loading subgraph- Overrides:
escapeKeysWithPgxSpecialCharactersin classPgqlBasedSubgraphReader<R extends PgqlBasedSubgraphReader<R,P>, P extends PgqlBasedSubgraphReader<R, P> & PreparedPgqlQueryBuilder<P>> - Returns:
- this loader
-
queryPgql
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
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
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
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.
-