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 org.springframework.data.relational.core.sql.DefaultIdentifierProcessingcreate(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 org.springframework.data.relational.core.sql.DefaultIdentifierProcessing 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
Converts aStringrepresenting a bare name of an identifier to aStringwith proper quoting applied.- Parameters:
identifier- the name of an identifier. Must not be null.- Returns:
- a quoted name of an identifier. Guaranteed to be not null.
-
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.
-