This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/master by this push:
new e476fc63f UnescapedColumnNode seems unused
e476fc63f is described below
commit e476fc63f1889877cb6ab31760508197225674c7
Author: Andrus Adamchik <[email protected]>
AuthorDate: Sun Jul 5 16:37:58 2026 -0400
UnescapedColumnNode seems unused
---
.../access/sqlbuilder/ColumnNodeBuilder.java | 15 +------
.../sqlbuilder/sqltree/UnescapedColumnNode.java | 52 ----------------------
2 files changed, 2 insertions(+), 65 deletions(-)
diff --git
a/cayenne/src/main/java/org/apache/cayenne/access/sqlbuilder/ColumnNodeBuilder.java
b/cayenne/src/main/java/org/apache/cayenne/access/sqlbuilder/ColumnNodeBuilder.java
index a6b43ace5..6394accf4 100644
---
a/cayenne/src/main/java/org/apache/cayenne/access/sqlbuilder/ColumnNodeBuilder.java
+++
b/cayenne/src/main/java/org/apache/cayenne/access/sqlbuilder/ColumnNodeBuilder.java
@@ -19,13 +19,12 @@
package org.apache.cayenne.access.sqlbuilder;
-import java.util.Objects;
-
import org.apache.cayenne.access.sqlbuilder.sqltree.ColumnNode;
import org.apache.cayenne.access.sqlbuilder.sqltree.Node;
-import org.apache.cayenne.access.sqlbuilder.sqltree.UnescapedColumnNode;
import org.apache.cayenne.map.DbAttribute;
+import java.util.Objects;
+
/**
* @since 4.2
*/
@@ -33,8 +32,6 @@ public class ColumnNodeBuilder implements ExpressionTrait {
private final String table;
private final String column;
-
- private boolean unescaped;
private String alias;
private DbAttribute attribute;
@@ -54,11 +51,6 @@ public class ColumnNodeBuilder implements ExpressionTrait {
return this;
}
- public ColumnNodeBuilder unescaped() {
- this.unescaped = true;
- return this;
- }
-
public ColumnNodeBuilder attribute(DbAttribute attribute) {
this.attribute = attribute;
return this;
@@ -74,9 +66,6 @@ public class ColumnNodeBuilder implements ExpressionTrait {
@Override
public Node build() {
- if(unescaped) {
- return new UnescapedColumnNode(table, column, alias, attribute);
- }
return new ColumnNode(table, column, alias, attribute);
}
diff --git
a/cayenne/src/main/java/org/apache/cayenne/access/sqlbuilder/sqltree/UnescapedColumnNode.java
b/cayenne/src/main/java/org/apache/cayenne/access/sqlbuilder/sqltree/UnescapedColumnNode.java
deleted file mode 100644
index 7f397910b..000000000
---
a/cayenne/src/main/java/org/apache/cayenne/access/sqlbuilder/sqltree/UnescapedColumnNode.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ****************************************************************/
-
-package org.apache.cayenne.access.sqlbuilder.sqltree;
-
-import org.apache.cayenne.access.sqlbuilder.SQLAppendable;
-import org.apache.cayenne.map.DbAttribute;
-
-/**
- * @since 4.2
- */
-public class UnescapedColumnNode extends ColumnNode {
-
- public UnescapedColumnNode(String table, String column, String alias,
DbAttribute attribute) {
- super(table, column, alias, attribute);
- }
-
- @Override
- public SQLAppendable append(SQLAppendable buffer) {
- buffer.appendTokenSeparator();
- if (table != null) {
- buffer.append(table).append('.');
- }
- buffer.append(column);
- if (alias != null) {
- buffer.appendTokenSeparator().appendQuoted(alias);
- }
-
- return buffer;
- }
-
- @Override
- public Node copy() {
- return new UnescapedColumnNode(table, column, alias, attribute);
- }
-}