public class Quoting
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.HashSet<java.lang.String> |
UCSQL2003KEYWORDS |
Modifier and Type | Method and Description |
---|---|
static boolean |
equalsIgnoreQuotingAndCase(java.lang.String a,
java.lang.String b)
Compares a String to another String, ignoring case considerations and quoting.
|
static boolean |
equalsWROSearchPattern(java.lang.String a,
java.lang.String b) |
static boolean |
equalsWROSearchPattern(java.lang.String a,
java.lang.String cand1,
java.lang.String cand2) |
java.lang.String |
getQuote()
Gets the quote character, null if quoting is not supported.
|
static Quoting |
getQuoting(Session session)
Gets the
Quoting for a given session. |
boolean |
hasCorrectCase(java.lang.String identifier) |
static boolean |
isPotentialIdentifierQuote(char c) |
boolean |
isQuoted(java.lang.String identifier)
Checks if an identifier is quoted.
|
java.lang.String |
normalizeCase(java.lang.String identifier) |
static java.lang.String |
normalizeIdentifier(java.lang.String identifier)
Normalizes an identifier.
|
java.lang.String |
quote(java.lang.String identifier)
Quotes an identifier.
|
java.lang.String |
requote(java.lang.String identifier)
Quotes an identifier only if it is already quoted (potentially with a different quoting-string).
|
java.lang.String |
requote(java.lang.String identifier,
boolean force)
Quotes an identifier only if it is already quoted (potentially with a different quoting-string).
|
static java.lang.String |
staticUnquote(java.lang.String identifier)
Remove quotes from identifier.
|
java.lang.String |
unquote(java.lang.String identifier)
Remove quotes from identifier.
|
static java.lang.String |
unquotedTableName(Table t,
ExecutionContext executionContext)
Gets unquoted qualified table name.
|
Quoting |
withIdentifierQuoteString(java.lang.String identifierQuoteString)
Creates new Quoting with different identifierQuoteString.
|
public static final java.util.HashSet<java.lang.String> UCSQL2003KEYWORDS
public Quoting(Session session) throws java.sql.SQLException
session
- the database sessionjava.sql.SQLException
public static Quoting getQuoting(Session session) throws java.sql.SQLException
Quoting
for a given session.session
- the database sessionjava.sql.SQLException
public java.lang.String quote(java.lang.String identifier)
identifier
- the identifierpublic boolean hasCorrectCase(java.lang.String identifier)
public boolean isQuoted(java.lang.String identifier)
identifier
- the identifiertrue
if identifier is quotedpublic java.lang.String unquote(java.lang.String identifier)
identifier
- the identifierpublic static java.lang.String staticUnquote(java.lang.String identifier)
identifier
- the identifierpublic java.lang.String requote(java.lang.String identifier)
identifier
- the identifierpublic java.lang.String requote(java.lang.String identifier, boolean force)
identifier
- the identifierpublic static java.lang.String unquotedTableName(Table t, ExecutionContext executionContext)
t
- the tablepublic java.lang.String getQuote()
public static boolean isPotentialIdentifierQuote(char c)
public Quoting withIdentifierQuoteString(java.lang.String identifierQuoteString)
identifierQuoteString
- public static java.lang.String normalizeIdentifier(java.lang.String identifier)
normalizeIdentifier(a).equals(normalizeIdentifier(b)) iff a and b identify the same thing
identifier
- the identifierpublic java.lang.String normalizeCase(java.lang.String identifier)
public static boolean equalsIgnoreQuotingAndCase(java.lang.String a, java.lang.String b)
a
- first Stringb
- second Stringtrue
if a equals bpublic static boolean equalsWROSearchPattern(java.lang.String a, java.lang.String cand1, java.lang.String cand2)
public static boolean equalsWROSearchPattern(java.lang.String a, java.lang.String b)