Skip to content

SqlIdentifier has redundant getReference(IdentifierProcessing) method #1110

@mipo256

Description

@mipo256

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions