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 PgqlViewGraphExpander
connections(int numConnections)
sets the number of connections to open to load the data in parallelPgqlViewGraphExpander
dataSourceId(java.lang.String dataSourceId)
sets the dataSourceId to which to connectPgqlViewGraphExpander
edgePropertiesMergingStrategy(PropertyMergeStrategy edgePropertyMergeStrategy)
Set the strategy for how edge properties of duplicate elements are handled.PgxGraph
expand()
Call the expand operation and await execution.PgxGraph
expand(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.PgxGraph
expandNewSnapshot()
Blocking version ofAbstractGraphExpander.expandNewSnapshotAsync()
.PgxFuture<PgxGraph>
expandNewSnapshotAsync()
Call the expand operation.PgqlViewGraphExpander
fromPgPgql(java.lang.String pgGraphName)
Expand from a (different) PG PGQL.PgqlViewGraphExpander
fromPgPgql(java.lang.String schemaName, java.lang.String pgGraphName)
Expand from a (different) PG PGQL.PgqlViewGraphExpander
fromPgSql(java.lang.String sqlGraphName)
Expand from a (different) SQL Property Graph.PgqlViewGraphExpander
fromPgSql(java.lang.String schemaName, java.lang.String sqlGraphName)
Expand from a (different) SQL Property Graph.PgqlViewGraphExpander
jdbcUrl(java.lang.String jdbcUrl)
sets the jdbcUrl to use for connecting to the DBPgqlViewGraphExpander
keystoreAlias(java.lang.String keystoreAlias)
sets the keystore alias to retrieve the password from the keystorePgqlViewGraphExpander
password(java.lang.String password)
sets the password to use for connecting to the databasePreparedPgViewPgqlQuery
preparedPgqlQuery(java.lang.String query)
Add a new prepared PGQL query to the expansion.PgqlViewGraphExpander
queryPgql(java.lang.String query)
Add a PGQL query to the expansion.PgqlViewGraphExpander
username(java.lang.String userName)
sets the username of the DB user to use to connect to the DBPgqlViewGraphExpander
vertexPropertiesMergingStrategy(PropertyMergeStrategy vertexPropertyMergeStrategy)
Set the strategy for how vertex properties of duplicate elements are handled.PreparedPgViewPgqlQuery
withArg(int position, QueryArgumentType type, java.lang.Object value)
PgqlViewGraphExpander
withConfig(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:
withArg
in interfaceoracle.pgx.api.subgraph.internal.PreparedQueryBuilder<PreparedPgViewPgqlQuery>
-
expandAsync
public PgxFuture<PgxGraph> expandAsync()
Description copied from class:AbstractGraphExpander
Call the expand operation.- Overrides:
expandAsync
in classAbstractGraphExpander<PgqlViewGraphExpander>
- Returns:
- The new graph.
-
expandAsync
public PgxFuture<PgxGraph> expandAsync(java.lang.String newGraphName)
Description copied from class:AbstractGraphExpander
Call the expand operation.- Overrides:
expandAsync
in classAbstractGraphExpander<PgqlViewGraphExpander>
- Returns:
- The new graph.
-
expandNewSnapshotAsync
public PgxFuture<PgxGraph> expandNewSnapshotAsync()
Description copied from class:AbstractGraphExpander
Call the expand operation. This creates a new snapshot of the base graph, instead of a new graph.- Overrides:
expandNewSnapshotAsync
in classAbstractGraphExpander<PgqlViewGraphExpander>
- Returns:
- The new graph.
-
expandNewSnapshot
public PgxGraph expandNewSnapshot() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from class:AbstractGraphExpander
Blocking version ofAbstractGraphExpander.expandNewSnapshotAsync()
. Calls the expand operation and awaits execution. This creates a new snapshot, instead of a new graph.- Overrides:
expandNewSnapshot
in 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:AbstractGraphExpander
Call the expand operation and await execution.- Overrides:
expand
in 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:AbstractGraphExpander
Call the expand operation and await execution.- Overrides:
expand
in 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:AbstractGraphExpander
Set the strategy for how vertex properties of duplicate elements are handled. The default strategy is defined byPropertyMergeStrategy.getDefault()
.- Overrides:
vertexPropertiesMergingStrategy
in classAbstractGraphExpander<PgqlViewGraphExpander>
- Parameters:
vertexPropertyMergeStrategy
- The vertex property merge strategy.- Returns:
- This expander.
-
edgePropertiesMergingStrategy
public PgqlViewGraphExpander edgePropertiesMergingStrategy(PropertyMergeStrategy edgePropertyMergeStrategy)
Description copied from class:AbstractGraphExpander
Set the strategy for how edge properties of duplicate elements are handled. The default strategy is defined byPropertyMergeStrategy.getDefault()
.- Overrides:
edgePropertiesMergingStrategy
in classAbstractGraphExpander<PgqlViewGraphExpander>
- Parameters:
edgePropertyMergeStrategy
- The edge property merge strategy.- Returns:
- This expander.
-
fromPgPgql
public PgqlViewGraphExpander fromPgPgql(java.lang.String pgGraphName)
Description copied from class:PgqlViewGraphExpander
Expand from a (different) PG PGQL.- Overrides:
fromPgPgql
in 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:PgqlViewGraphExpander
Expand from a (different) PG PGQL.- Overrides:
fromPgPgql
in 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:PgqlViewGraphExpander
Expand from a (different) SQL Property Graph.- Overrides:
fromPgSql
in 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:PgqlViewGraphExpander
Expand from a (different) SQL Property Graph.- Overrides:
fromPgSql
in 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:PgqlViewGraphExpander
Add a PGQL query to the expansion. Additional data matching this query will be loaded.- Overrides:
queryPgql
in classPgqlViewGraphExpander
- Parameters:
query
- The query.- Returns:
- This expander.
-
preparedPgqlQuery
public PreparedPgViewPgqlQuery preparedPgqlQuery(java.lang.String query)
Description copied from class:PgqlViewGraphExpander
Add 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:
preparedPgqlQuery
in classPgqlViewGraphExpander
- Parameters:
query
- The query.- Returns:
- A builder where query arguments must be provided.
-
withConfig
public PgqlViewGraphExpander withConfig(PartitionedGraphConfig config)
Description copied from class:AbstractGraphExpander
Specify 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:
withConfig
in classAbstractGraphExpander<PgqlViewGraphExpander>
- Parameters:
config
- The graph config.- Returns:
- This expander.
-
dataSourceId
public PgqlViewGraphExpander dataSourceId(java.lang.String dataSourceId)
Description copied from class:PgqlViewGraphExpander
sets the dataSourceId to which to connect- Overrides:
dataSourceId
in classPgqlViewGraphExpander
- Parameters:
dataSourceId
- the datasourceId- Returns:
- this loader
-
jdbcUrl
public PgqlViewGraphExpander jdbcUrl(java.lang.String jdbcUrl)
Description copied from class:PgqlViewGraphExpander
sets the jdbcUrl to use for connecting to the DB- Overrides:
jdbcUrl
in classPgqlViewGraphExpander
- Parameters:
jdbcUrl
- the jdbc url- Returns:
- this loader
-
username
public PgqlViewGraphExpander username(java.lang.String userName)
Description copied from class:PgqlViewGraphExpander
sets the username of the DB user to use to connect to the DB- Overrides:
username
in classPgqlViewGraphExpander
- Parameters:
userName
- the username- Returns:
- this loader
-
keystoreAlias
public PgqlViewGraphExpander keystoreAlias(java.lang.String keystoreAlias)
Description copied from class:PgqlViewGraphExpander
sets the keystore alias to retrieve the password from the keystore- Overrides:
keystoreAlias
in classPgqlViewGraphExpander
- Parameters:
keystoreAlias
- the keystore alias- Returns:
- this loader
-
password
public PgqlViewGraphExpander password(java.lang.String password)
Description copied from class:PgqlViewGraphExpander
sets the password to use for connecting to the database- Overrides:
password
in classPgqlViewGraphExpander
- Parameters:
password
- the password- Returns:
- this loader
-
connections
public PgqlViewGraphExpander connections(int numConnections)
Description copied from class:PgqlViewGraphExpander
sets the number of connections to open to load the data in parallel- Overrides:
connections
in classPgqlViewGraphExpander
- Parameters:
numConnections
- the number of connections- Returns:
- this loader
-
-