Package oracle.pgx.api.expansion
Class PreparedPgViewPgqlQuery
- java.lang.Object
-
- oracle.pgx.api.expansion.AbstractGraphExpander<PgqlViewGraphExpander>
-
- oracle.pgx.api.expansion.PgqlViewGraphExpander
-
- oracle.pgx.api.expansion.PreparedPgViewPgqlQuery
-
- All Implemented Interfaces:
oracle.pgx.api.subgraph.internal.PreparedQueryBuilder<PreparedPgViewPgqlQuery>,PreparedPgqlQueryBuilder<PreparedPgViewPgqlQuery>
public class PreparedPgViewPgqlQuery extends PgqlViewGraphExpander implements PreparedPgqlQueryBuilder<PreparedPgViewPgqlQuery>
A configuration builder for graph expansion using a prepared PGQL query. Use this class to provide all the required arguments for the query or to continue configuring the expand operation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PgqlViewGraphExpanderconnections(int numConnections)sets the number of connections to open to load the data in parallelPgqlViewGraphExpanderdataSourceId(java.lang.String dataSourceId)sets the dataSourceId to which to connectPgqlViewGraphExpanderedgePropertiesMergingStrategy(PropertyMergeStrategy edgePropertyMergeStrategy)Set the strategy for how edge properties of duplicate elements are handled.PgxGraphexpand()Call the expand operation and await execution.PgxGraphexpand(java.lang.String newGraphName)Call the expand operation and await execution.PgxFuture<PgxGraph>expandAsync()Call the expand operation.PgxFuture<PgxGraph>expandAsync(java.lang.String newGraphName)Call the expand operation.PgxGraphexpandNewSnapshot()Blocking version ofAbstractGraphExpander.expandNewSnapshotAsync().PgxFuture<PgxGraph>expandNewSnapshotAsync()Call the expand operation.PgqlViewGraphExpanderfromPgPgql(java.lang.String pgGraphName)Expand from a (different) PG PGQL.PgqlViewGraphExpanderfromPgPgql(java.lang.String schemaName, java.lang.String pgGraphName)Expand from a (different) PG PGQL.PgqlViewGraphExpanderfromPgSql(java.lang.String sqlGraphName)Expand from a (different) SQL Property Graph.PgqlViewGraphExpanderfromPgSql(java.lang.String schemaName, java.lang.String sqlGraphName)Expand from a (different) SQL Property Graph.PgqlViewGraphExpanderjdbcUrl(java.lang.String jdbcUrl)sets the jdbcUrl to use for connecting to the DBPgqlViewGraphExpanderkeystoreAlias(java.lang.String keystoreAlias)sets the keystore alias to retrieve the password from the keystorePgqlViewGraphExpanderowner(java.lang.String owner)PgqlViewGraphExpanderpassword(java.lang.String password)sets the password to use for connecting to the databasePreparedPgViewPgqlQuerypreparedPgqlQuery(java.lang.String query)Add a new prepared PGQL query to the expansion.PgqlViewGraphExpanderqueryPgql(java.lang.String query)Add a PGQL query to the expansion.PgqlViewGraphExpanderschema(java.lang.String schema)PgqlViewGraphExpanderusername(java.lang.String userName)sets the username of the DB user to use to connect to the DBPgqlViewGraphExpandervertexPropertiesMergingStrategy(PropertyMergeStrategy vertexPropertyMergeStrategy)Set the strategy for how vertex properties of duplicate elements are handled.PreparedPgViewPgqlQuerywithArg(int position, QueryArgumentType type, java.lang.Object value)PgqlViewGraphExpanderwithConfig(PartitionedGraphConfig config)Specify a graph config used to load the additional graph data.-
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 PreparedPgViewPgqlQuery withArg(int position, QueryArgumentType type, java.lang.Object value)
- Specified by:
withArgin interfaceoracle.pgx.api.subgraph.internal.PreparedQueryBuilder<PreparedPgViewPgqlQuery>
-
expandAsync
public PgxFuture<PgxGraph> expandAsync()
Description copied from class:AbstractGraphExpanderCall the expand operation.- Overrides:
expandAsyncin classAbstractGraphExpander<PgqlViewGraphExpander>- Returns:
- The new graph.
-
expandAsync
public PgxFuture<PgxGraph> expandAsync(java.lang.String newGraphName)
Description copied from class:AbstractGraphExpanderCall the expand operation.- Overrides:
expandAsyncin classAbstractGraphExpander<PgqlViewGraphExpander>- Returns:
- The new graph.
-
expandNewSnapshotAsync
public PgxFuture<PgxGraph> expandNewSnapshotAsync()
Description copied from class:AbstractGraphExpanderCall the expand operation. This creates a new snapshot of the base graph, instead of a new graph.- Overrides:
expandNewSnapshotAsyncin classAbstractGraphExpander<PgqlViewGraphExpander>- Returns:
- The new graph.
-
expandNewSnapshot
public PgxGraph expandNewSnapshot() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from class:AbstractGraphExpanderBlocking version ofAbstractGraphExpander.expandNewSnapshotAsync(). Calls the expand operation and awaits execution. This creates a new snapshot, instead of a new graph.- Overrides:
expandNewSnapshotin classAbstractGraphExpander<PgqlViewGraphExpander>- Returns:
- The new graph.
- Throws:
java.util.concurrent.ExecutionException- when the execution fails.java.lang.InterruptedException- when the operation gets interrupted.
-
expand
public PgxGraph expand() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from class:AbstractGraphExpanderCall the expand operation and await execution.- Overrides:
expandin classAbstractGraphExpander<PgqlViewGraphExpander>- Returns:
- The new graph.
- Throws:
java.util.concurrent.ExecutionException- when the execution fails.java.lang.InterruptedException- when the operation gets interrupted.
-
expand
public PgxGraph expand(java.lang.String newGraphName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from class:AbstractGraphExpanderCall the expand operation and await execution.- Overrides:
expandin classAbstractGraphExpander<PgqlViewGraphExpander>- Parameters:
newGraphName- The new graph name.- Returns:
- The new graph.
- Throws:
java.util.concurrent.ExecutionException- when the execution fails.java.lang.InterruptedException- when the operation gets interrupted.
-
vertexPropertiesMergingStrategy
public PgqlViewGraphExpander vertexPropertiesMergingStrategy(PropertyMergeStrategy vertexPropertyMergeStrategy)
Description copied from class:AbstractGraphExpanderSet the strategy for how vertex properties of duplicate elements are handled. The default strategy is defined byPropertyMergeStrategy.getDefault().- Overrides:
vertexPropertiesMergingStrategyin classAbstractGraphExpander<PgqlViewGraphExpander>- Parameters:
vertexPropertyMergeStrategy- The vertex property merge strategy.- Returns:
- This expander.
-
edgePropertiesMergingStrategy
public PgqlViewGraphExpander edgePropertiesMergingStrategy(PropertyMergeStrategy edgePropertyMergeStrategy)
Description copied from class:AbstractGraphExpanderSet the strategy for how edge properties of duplicate elements are handled. The default strategy is defined byPropertyMergeStrategy.getDefault().- Overrides:
edgePropertiesMergingStrategyin classAbstractGraphExpander<PgqlViewGraphExpander>- Parameters:
edgePropertyMergeStrategy- The edge property merge strategy.- Returns:
- This expander.
-
fromPgPgql
public PgqlViewGraphExpander fromPgPgql(java.lang.String pgGraphName)
Description copied from class:PgqlViewGraphExpanderExpand from a (different) PG PGQL.- Overrides:
fromPgPgqlin classPgqlViewGraphExpander- Parameters:
pgGraphName- The name of the graph.- Returns:
- This expander.
-
fromPgPgql
public PgqlViewGraphExpander fromPgPgql(java.lang.String schemaName, java.lang.String pgGraphName)
Description copied from class:PgqlViewGraphExpanderExpand from a (different) PG PGQL.- Overrides:
fromPgPgqlin classPgqlViewGraphExpander- Parameters:
schemaName- The name of the schema.pgGraphName- The name of the graph.- Returns:
- This expander.
-
fromPgSql
public PgqlViewGraphExpander fromPgSql(java.lang.String sqlGraphName)
Description copied from class:PgqlViewGraphExpanderExpand from a (different) SQL Property Graph.- Overrides:
fromPgSqlin classPgqlViewGraphExpander- Parameters:
sqlGraphName- The SQL Graph name.- Returns:
- This expander.
-
fromPgSql
public PgqlViewGraphExpander fromPgSql(java.lang.String schemaName, java.lang.String sqlGraphName)
Description copied from class:PgqlViewGraphExpanderExpand from a (different) SQL Property Graph.- Overrides:
fromPgSqlin classPgqlViewGraphExpander- Parameters:
schemaName- The SQL Schema name.sqlGraphName- The SQL Graph name.- Returns:
- This expander.
-
queryPgql
public PgqlViewGraphExpander queryPgql(java.lang.String query)
Description copied from class:PgqlViewGraphExpanderAdd a PGQL query to the expansion. Additional data matching this query will be loaded.- Overrides:
queryPgqlin classPgqlViewGraphExpander- Parameters:
query- The query.- Returns:
- This expander.
-
preparedPgqlQuery
public PreparedPgViewPgqlQuery preparedPgqlQuery(java.lang.String query)
Description copied from class:PgqlViewGraphExpanderAdd a new prepared PGQL query to the expansion. Additional data matching this query will be loaded. This returns a new builder where arguments for the query must be provided.- Overrides:
preparedPgqlQueryin classPgqlViewGraphExpander- Parameters:
query- The query.- Returns:
- A builder where query arguments must be provided.
-
withConfig
public PgqlViewGraphExpander withConfig(PartitionedGraphConfig config)
Description copied from class:AbstractGraphExpanderSpecify a graph config used to load the additional graph data. This config will always be used instead of the config of the base graph.- Overrides:
withConfigin classAbstractGraphExpander<PgqlViewGraphExpander>- Parameters:
config- The graph config.- Returns:
- This expander.
-
dataSourceId
public PgqlViewGraphExpander dataSourceId(java.lang.String dataSourceId)
Description copied from class:PgqlViewGraphExpandersets the dataSourceId to which to connect- Overrides:
dataSourceIdin classPgqlViewGraphExpander- Parameters:
dataSourceId- the datasourceId- Returns:
- this loader
-
jdbcUrl
public PgqlViewGraphExpander jdbcUrl(java.lang.String jdbcUrl)
Description copied from class:PgqlViewGraphExpandersets the jdbcUrl to use for connecting to the DB- Overrides:
jdbcUrlin classPgqlViewGraphExpander- Parameters:
jdbcUrl- the jdbc url- Returns:
- this loader
-
username
public PgqlViewGraphExpander username(java.lang.String userName)
Description copied from class:PgqlViewGraphExpandersets the username of the DB user to use to connect to the DB- Overrides:
usernamein classPgqlViewGraphExpander- Parameters:
userName- the username- Returns:
- this loader
-
keystoreAlias
public PgqlViewGraphExpander keystoreAlias(java.lang.String keystoreAlias)
Description copied from class:PgqlViewGraphExpandersets the keystore alias to retrieve the password from the keystore- Overrides:
keystoreAliasin classPgqlViewGraphExpander- Parameters:
keystoreAlias- the keystore alias- Returns:
- this loader
-
password
public PgqlViewGraphExpander password(java.lang.String password)
Description copied from class:PgqlViewGraphExpandersets the password to use for connecting to the database- Overrides:
passwordin classPgqlViewGraphExpander- Parameters:
password- the password- Returns:
- this loader
-
schema
public PgqlViewGraphExpander schema(java.lang.String schema)
-
owner
public PgqlViewGraphExpander owner(java.lang.String owner)
-
connections
public PgqlViewGraphExpander connections(int numConnections)
Description copied from class:PgqlViewGraphExpandersets the number of connections to open to load the data in parallel- Overrides:
connectionsin classPgqlViewGraphExpander- Parameters:
numConnections- the number of connections- Returns:
- this loader
-
-