Skip to content

Commit e71c2b9

Browse files
committed
#369 - Polishing.
Remove unused code.
1 parent 02c9a87 commit e71c2b9

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java

-46
Original file line numberDiff line numberDiff line change
@@ -736,50 +736,4 @@ public TypeInformation<?> getTypeHint() {
736736
return this.property.getTypeInformation();
737737
}
738738
}
739-
740-
/**
741-
* Models the ANSI SQL {@code UPPER} function.
742-
* <p>
743-
* Results in a rendered function: {@code UPPER(<expression>)}.
744-
*/
745-
private class Upper implements Expression {
746-
private Literal<Object> delegate;
747-
748-
/**
749-
* Creates new instance of this class with the given expression. Only expressions of type {@link Column} and
750-
* {@link org.springframework.data.relational.core.sql.BindMarker} are supported.
751-
*
752-
* @param expression expression to be uppercased (must not be {@literal null})
753-
*/
754-
private Upper(Expression expression) {
755-
Assert.notNull(expression, "Expression must not be null!");
756-
String functionArgument;
757-
if (expression instanceof org.springframework.data.relational.core.sql.BindMarker) {
758-
functionArgument = expression instanceof Named ? ((Named) expression).getName().getReference()
759-
: expression.toString();
760-
} else if (expression instanceof Column) {
761-
functionArgument = "";
762-
Table table = ((Column) expression).getTable();
763-
if (table != null) {
764-
functionArgument = toSql(table.getName()) + ".";
765-
}
766-
functionArgument += toSql(((Column) expression).getName());
767-
} else {
768-
throw new IllegalArgumentException("Unable to ignore case expression of type " + expression.getClass().getName()
769-
+ ". Only " + Column.class.getName() + " and "
770-
+ org.springframework.data.relational.core.sql.BindMarker.class.getName() + " types are supported");
771-
}
772-
this.delegate = SQL.literalOf((Object) ("UPPER(" + functionArgument + ")"));
773-
}
774-
775-
@Override
776-
public void visit(Visitor visitor) {
777-
delegate.visit(visitor);
778-
}
779-
780-
@Override
781-
public String toString() {
782-
return delegate.toString();
783-
}
784-
}
785739
}

0 commit comments

Comments
 (0)