public abstract static class SQLIdentifiers.Quoter extends Object
Modifier and Type | Method and Description |
---|---|
String |
getQuoteString() |
abstract String |
quoteAlways(String identifier)
Quotes an SQL identifier, even if the
SQLIdentifiers.Quoter.quoteIfNeeded(java.lang.String) method
would not have quoted it. |
abstract String |
quoteIfNeeded(String identifier)
Quotes an SQL identifier if needed.
|
String |
unquote(String identifier)
Unquotes an identifier if it is quoted.
|
public abstract String quoteIfNeeded(String identifier)
Anyone generating SQL that will be visible and/or editable by the user should use this method. This helps to avoid unecessary quoting, which affects the readability and clarity of the resulting SQL.
An identifier needs to be quoted if one of the following is true:
identifier
- a SQL identifier. Can not be null.public abstract String quoteAlways(String identifier)
SQLIdentifiers.Quoter.quoteIfNeeded(java.lang.String)
method
would not have quoted it.identifier
- a SQL identifier. Can not be null.public String unquote(String identifier)
identifier
- a SQL identifier. Can not be null.public String getQuoteString()