public class PgqlConnection
extends java.lang.Object
PgqlStatement
and
PgqlPreparedStatement
objects for executing PGQL
queries against graphs stored in Oracle Database.Modifier and Type | Method and Description |
---|---|
void |
clearGraphMetadataCache()
Clear the cache that stores graph metadata
|
void |
clearTranslationCache()
Clear the cache that stores translations
|
PgqlStatement |
createStatement()
Creates a new PgqlStatement object, which is used to execute
PGQL queries
|
void |
disableGraphMetadataCache()
Disable the cache that stores graph metadata
|
void |
disableTranslationCache()
Disable the cache that stores translations
|
void |
enableGraphMetadataCache()
Enable the cache that stores graph metadata
|
void |
enableTranslationCache()
Enable the cache that stores translations
|
static PgqlConnection |
getConnection(java.sql.Connection conn)
Factory method to get
PgqlConnection instance. |
java.lang.String |
getGraph()
Get the graph name on which PGQL queries will be executed
for this connection.
|
long |
getGraphMetadataRefreshInterval()
get the time interval in milliseconds to determine the frequency to check for graph
metadata changes in order to re-cache the necessary metadata for correct query
execution.
|
java.sql.Connection |
getJdbcConnection()
Get the JDBC connection that is used to execute PGQL queries
|
int |
getMetadataFetchSize()
Get fetch size that is used when loading graph metadata
|
java.lang.String |
getSchema()
Get the schema name that will be used to execute PGQL queries
with this connection.
|
PgqlPreparedStatement |
prepareStatement(java.lang.String pgql)
Creates a new PgqlPreparedStatement object, which represents a
pre-compiled PGQL statement.
|
PgqlPreparedStatement |
prepareStatement(java.lang.String pgql,
int timeout,
int parallel,
int dynamicSampling,
int maxResults,
java.lang.String matchOptions,
java.lang.String options)
Creates a new PgqlPreparedStatement object, which represents a
pre-compiled PGQL statement.
|
PgqlPreparedStatement |
prepareStatement(java.lang.String pgql,
java.lang.String matchOptions,
java.lang.String options)
Creates a new PgqlPreparedStatement object, which represents a
pre-compiled PGQL statement.
|
void |
setGraph(java.lang.String graph)
Sets the graph name on which PGQL queries will be executed
for this connection.
|
void |
setGraphMetadataCacheMaxCapacity(int maxCapacity)
Set max capacity value for the graph metadata cache
|
void |
setGraphMetadataRefreshInterval(long interval)
Set a time interval in milliseconds to determine the frequency to check for graph
metadata changes in order to re-cache the necessary metadata for correct query
execution.
|
void |
setMetadataFetchSize(int metadataFetchSize)
Set fetch size that should be used when loading graph metadata
|
void |
setSchema(java.lang.String schema)
Sets the schema name that will be used to execute PGQL
queries with this connection.
|
void |
setTranslationCacheMaxCapacity(int maxCapacity)
Set max capacity value for the translation cache
|
public void clearGraphMetadataCache()
public void clearTranslationCache()
public PgqlStatement createStatement()
PgqlStatement
object that can be used
to perform PGQL queriespublic void disableGraphMetadataCache()
public void disableTranslationCache()
public void enableGraphMetadataCache()
public void enableTranslationCache()
public static PgqlConnection getConnection(java.sql.Connection conn)
PgqlConnection
instance.conn
- a JDBC connectionpublic java.lang.String getGraph()
public long getGraphMetadataRefreshInterval()
public java.sql.Connection getJdbcConnection()
public int getMetadataFetchSize()
public java.lang.String getSchema() throws PgqlToSqlException
PgqlToSqlException
- if a database access error occurs or
this method is called on a closed connectionpublic PgqlPreparedStatement prepareStatement(java.lang.String pgql)
pgql
- the PGQL query to compilePgqlPreparedStatement
object that
can be used to efficiently execute the same
query multiple timespublic PgqlPreparedStatement prepareStatement(java.lang.String pgql, int timeout, int parallel, int dynamicSampling, int maxResults, java.lang.String matchOptions, java.lang.String options)
pgql
- the PGQL query to compiletimeout
- the number of seconds for query execution
to finishparallel
- the degree of parallelism to use for
query and modify executiondynamicSampling
- the value for dynamic samplingmaxResults
- the maximum number of rows returnedmatchOptions
- additional options used to influence
query translation and executionoptions
- additional options used to influence
modify translation and executionPgqlPreparedStatement
object that
can be used to efficiently execute the same
query multiple timespublic PgqlPreparedStatement prepareStatement(java.lang.String pgql, java.lang.String matchOptions, java.lang.String options)
pgql
- the PGQL query to compilematchOptions
- additional options used to influence
query translation and executionoptions
- additional options used to influence
modify translation and executionPgqlPreparedStatement
object that
can be used to efficiently execute the same
query multiple timespublic void setGraph(java.lang.String graph)
graph
- the name of the graphpublic void setGraphMetadataCacheMaxCapacity(int maxCapacity)
maxCapacity
- value for max capacitypublic void setGraphMetadataRefreshInterval(long interval)
interval
- the time interval in milliseconds to check if refreshing of
graph metadata is neededpublic void setMetadataFetchSize(int metadataFetchSize)
metadataFetchSize
- value for metadata fetch sizepublic void setSchema(java.lang.String schema)
schema
- the name of the schemapublic void setTranslationCacheMaxCapacity(int maxCapacity)
maxCapacity
- value for max capacity