public class PgqlUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VT_SUFFIX |
Constructor and Description |
---|
PgqlUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escapeAndEnquoteIdentifier(java.lang.String columnName)
Removes all double quotes in the given string and surrounds the whole string with double quotes.
|
static boolean |
extractBooleanOptionValue(java.lang.String options, java.lang.String optionName, boolean defaultValue)
Extracts option boolean value of the form OPTION=T or OPTION=F from the given options string.
|
static boolean |
extractBooleanProperty(java.lang.String propName, boolean defaultValue)
Extracts the value of a boolean system property and returns it.
|
static int |
extractIntOptionValue(java.lang.String options, java.lang.String optionName, int defaultValue)
Extracts option value of the form OPTION=INT_VALUE from the given options string.
|
static int |
extractIntProperty(java.lang.String propName, int defaultValue)
Extracts the value of an integer system property and returns it.
|
static java.lang.String |
getDistinctVertexTabName(java.sql.Connection conn, java.lang.String graphOwner, java.lang.String graphName)
Returns the fully-qualified distinct vertex table name given the graph name and graph owner name.
|
static java.lang.String |
getEdgeTabName(java.sql.Connection conn, java.lang.String graphOwner, java.lang.String graphName)
Returns the fully-qualified edge table name given the graph name and graph owner name.
|
static java.lang.String |
getSkeletonTabName(java.sql.Connection conn, java.lang.String graphOwner, java.lang.String graphName)
Returns the fully-qualified skeleton table name given the graph name and graph owner name.
|
static java.lang.String |
getTemporaryTabName(java.sql.Connection conn, java.lang.String graphName, java.lang.String suffix)
Returns an enquoted name for a temporary table with prefix ora$ptt_ followed by the given graph name and given suffix.
|
static java.lang.String |
getTemporaryTabName(java.lang.String graphName, java.lang.String suffix)
Returns a name for a temporary table with prefix ora$ptt_ followed by the given graph name and given suffix.
|
static java.lang.String |
getVertexTabName(java.sql.Connection conn, java.lang.String graphOwner, java.lang.String graphName)
Returns the fully-qualified vertex table name given the graph name and graph owner name.
|
static void |
setModifyOptions(ModifyContext modifyCtx, java.lang.String options)
(Re)sets the modify options for this Execution instance.
|
static void |
setQueryOptions(QueryContext ctx, java.lang.String options)
(Re)sets the query options for the input QueryContext instance.
|
static java.lang.String |
unescapePgqlString(java.lang.String str)
Unescapes constant Strings in a PGQL query for matching against stored versions of the same constant.
|
public static final java.lang.String VT_SUFFIX
public static java.lang.String escapeAndEnquoteIdentifier(java.lang.String columnName)
columnName
- the string to escapepublic static boolean extractBooleanOptionValue(java.lang.String options, java.lang.String optionName, boolean defaultValue)
options
- the options string to searchoptionName
- the option to search fordefaultValue
- the default value to use if the option is not setpublic static boolean extractBooleanProperty(java.lang.String propName, boolean defaultValue)
propName
- the system property to extractdefaultValue
- the default value to use if the property is not setpublic static int extractIntOptionValue(java.lang.String options, java.lang.String optionName, int defaultValue)
options
- the options string to searchoptionName
- the option to search fordefaultValue
- the default value to use if the option is not setpublic static int extractIntProperty(java.lang.String propName, int defaultValue)
propName
- the system property to extractdefaultValue
- the default value to use if the property is not setpublic static java.lang.String getDistinctVertexTabName(java.sql.Connection conn, java.lang.String graphOwner, java.lang.String graphName) throws java.sql.SQLException
conn
- the Oracle database connection to usegraphOwner
- the graph owner namegraphName
- the graph namejava.sql.SQLException
- when table name is illegalpublic static java.lang.String getEdgeTabName(java.sql.Connection conn, java.lang.String graphOwner, java.lang.String graphName) throws java.sql.SQLException
conn
- the Oracle database connection to usegraphOwner
- the graph owner namegraphName
- the graph namejava.sql.SQLException
- when table name is illegalpublic static java.lang.String getSkeletonTabName(java.sql.Connection conn, java.lang.String graphOwner, java.lang.String graphName) throws java.sql.SQLException
conn
- the Oracle database connection to usegraphOwner
- the graph owner namegraphName
- the graph namejava.sql.SQLException
- when table name is illegalpublic static java.lang.String getTemporaryTabName(java.sql.Connection conn, java.lang.String graphName, java.lang.String suffix) throws java.sql.SQLException
conn
- the Oracle database connection to usegraphName
- the graph namesuffix
- a suffix for the temporary table namejava.sql.SQLException
- when table name is illegalpublic static java.lang.String getTemporaryTabName(java.lang.String graphName, java.lang.String suffix)
graphName
- the graph namesuffix
- a suffix for the temporary table namepublic static java.lang.String getVertexTabName(java.sql.Connection conn, java.lang.String graphOwner, java.lang.String graphName) throws java.sql.SQLException
conn
- the Oracle database connection to usegraphOwner
- the graph owner namegraphName
- the graph namejava.sql.SQLException
- when table name is illegalpublic static void setModifyOptions(ModifyContext modifyCtx, java.lang.String options)
modifyCtx
- the ModifyContext in which to set optionsoptions
- the options string to processpublic static void setQueryOptions(QueryContext ctx, java.lang.String options)
ctx
- the QueryContext in which to set optionsoptions
- the options string to processpublic static java.lang.String unescapePgqlString(java.lang.String str) throws PgqlToSqlException
str
- the String to unescapePgqlToSqlException