You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by do...@apache.org on 2019/07/11 13:02:08 UTC
[empire-db] branch master updated: EMPIREDB-295: bufix
addRerferencedColumns()
This is an automated email from the ASF dual-hosted git repository.
doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git
The following commit(s) were added to refs/heads/master by this push:
new 96bca5e EMPIREDB-295: bufix addRerferencedColumns()
96bca5e is described below
commit 96bca5ecfb6f460c179d3dae0a4ba251e0a47273
Author: Rainer Döbele <do...@apache.org>
AuthorDate: Thu Jul 11 15:02:01 2019 +0200
EMPIREDB-295: bufix addRerferencedColumns()
---
.../org/apache/empire/db/expr/column/DBFuncExpr.java | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/empire-db/src/main/java/org/apache/empire/db/expr/column/DBFuncExpr.java b/empire-db/src/main/java/org/apache/empire/db/expr/column/DBFuncExpr.java
index 0e4f766..605b20f 100644
--- a/empire-db/src/main/java/org/apache/empire/db/expr/column/DBFuncExpr.java
+++ b/empire-db/src/main/java/org/apache/empire/db/expr/column/DBFuncExpr.java
@@ -18,10 +18,13 @@
*/
package org.apache.empire.db.expr.column;
+import java.util.Set;
+
// Java
import org.apache.empire.data.DataType;
import org.apache.empire.db.DBColumn;
import org.apache.empire.db.DBColumnExpr;
+import org.apache.empire.db.DBExpr;
/**
@@ -112,6 +115,23 @@ public class DBFuncExpr extends DBAbstractFuncExpr
}
/**
+ * @see org.apache.empire.db.DBExpr#addReferencedColumns(Set)
+ */
+ @Override
+ public void addReferencedColumns(Set<DBColumn> list)
+ {
+ super.addReferencedColumns(list);
+ if (this.params==null)
+ return;
+ // Check params
+ for (int i=0; i<this.params.length; i++)
+ { // add referenced columns
+ if (params[i] instanceof DBExpr)
+ ((DBExpr)params[i]).addReferencedColumns(list);
+ }
+ }
+
+ /**
* Creates the SQL-Command adds a function to the SQL-Command.
*
* @param sql the SQL-Command