-
Notifications
You must be signed in to change notification settings - Fork 377
Description
I have noticed that SqlIdentifier has redundant SqlIdentifier#getReference(IdentifierProcessing) method. The thing is, in accordance to the documentation, this method should:
Return the reference name after applying {@link IdentifierProcessing} rules.
But the thing this method does not apply anything in reality and acts in identical manner to SqlIdentifier#getReference(). Nither the DefaultSqlIdentifer, nor DerivedSqlIdentifier do not do basically anything to their underlying sql parameter name (neadless to say about CompositeSqlIdentifier), for example:
DerivedSqlIdentifier:
@Override
public String getReference(IdentifierProcessing processing) {
return this.name;
}
And DefaultSqlIdentifier:
@Override
public String getReference(IdentifierProcessing processing) {
return name;
}
So, in reality, this method does not differ from SqlIdentifier#getReference() - it really confuses. Even more - we already have SqlIdentifier#toSql(IdentifierProcessing) which it really intended to apply IdentifierProcessing to the SqlIdentifier. I assume that this is an architectural miscalculation. Jens @schauder, I think we need to clean this up in order to eliminate confusion.