From e71c2b9b71b217f5385364fa8430bdb3d5e62fd4 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 22 May 2020 09:25:08 +0200 Subject: [PATCH] #369 - Polishing. Remove unused code. --- .../data/r2dbc/query/QueryMapper.java | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java b/src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java index 69beac3f..a4aa231a 100644 --- a/src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java +++ b/src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java @@ -736,50 +736,4 @@ public class QueryMapper { return this.property.getTypeInformation(); } } - - /** - * Models the ANSI SQL {@code UPPER} function. - *

- * Results in a rendered function: {@code UPPER()}. - */ - private class Upper implements Expression { - private Literal delegate; - - /** - * Creates new instance of this class with the given expression. Only expressions of type {@link Column} and - * {@link org.springframework.data.relational.core.sql.BindMarker} are supported. - * - * @param expression expression to be uppercased (must not be {@literal null}) - */ - private Upper(Expression expression) { - Assert.notNull(expression, "Expression must not be null!"); - String functionArgument; - if (expression instanceof org.springframework.data.relational.core.sql.BindMarker) { - functionArgument = expression instanceof Named ? ((Named) expression).getName().getReference() - : expression.toString(); - } else if (expression instanceof Column) { - functionArgument = ""; - Table table = ((Column) expression).getTable(); - if (table != null) { - functionArgument = toSql(table.getName()) + "."; - } - functionArgument += toSql(((Column) expression).getName()); - } else { - throw new IllegalArgumentException("Unable to ignore case expression of type " + expression.getClass().getName() - + ". Only " + Column.class.getName() + " and " - + org.springframework.data.relational.core.sql.BindMarker.class.getName() + " types are supported"); - } - this.delegate = SQL.literalOf((Object) ("UPPER(" + functionArgument + ")")); - } - - @Override - public void visit(Visitor visitor) { - delegate.visit(visitor); - } - - @Override - public String toString() { - return delegate.toString(); - } - } }