Interface IdentifierProcessing
public interface IdentifierProcessing
An interface describing the processing steps for the conversion of
SqlIdentifier to SQL snippets or column
names.- Since:
- 2.0
- Author:
- Jens Schauder
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEncapsulates the three kinds of letter casing supported.static classA conversion from unquoted identifiers to quoted identifiers. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IdentifierProcessingAnIdentifierProcessingthat can be used for databases adhering to the SQL standard which uses double quotes (") for quoting and makes unquoted literals equivalent to upper case.static final IdentifierProcessingAnIdentifierProcessingwithout applying transformations. -
Method Summary
Modifier and TypeMethodDescriptionstatic IdentifierProcessingcreate(IdentifierProcessing.Quoting quoting, IdentifierProcessing.LetterCasing letterCasing) Create aIdentifierProcessingrule givenIdentifierProcessing.QuotingandIdentifierProcessing.LetterCasingrules.standardizeLetterCase(String identifier) Standardizes the use of upper and lower case letters in an identifier in such a way that semantically the same identifier results from the quoted and the unquoted version.
-
Field Details
-
ANSI
AnIdentifierProcessingthat can be used for databases adhering to the SQL standard which uses double quotes (") for quoting and makes unquoted literals equivalent to upper case. -
NONE
AnIdentifierProcessingwithout applying transformations.
-
-
Method Details
-
create
static IdentifierProcessing create(IdentifierProcessing.Quoting quoting, IdentifierProcessing.LetterCasing letterCasing) Create aIdentifierProcessingrule givenIdentifierProcessing.QuotingandIdentifierProcessing.LetterCasingrules.- Parameters:
quoting- quoting rules.letterCasing-IdentifierProcessing.LetterCasingrules for identifier normalization.- Returns:
- a new
IdentifierProcessingobject.
-
quote
-
standardizeLetterCase
Standardizes the use of upper and lower case letters in an identifier in such a way that semantically the same identifier results from the quoted and the unquoted version. If this is not possible use ofIdentifierProcessing.LetterCasing.AS_ISis recommended.- Parameters:
identifier- an identifier with arbitrary upper and lower cases. must not be null.- Returns:
- an identifier with standardized use of upper and lower case letter. Guaranteed to be not null.
-