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 bc3685aa EMPIREDB-410 additional join overload
bc3685aa is described below

commit bc3685aac43325ad6dc667806df88615ec004258
Author: Rainer Döbele <[email protected]>
AuthorDate: Fri May 5 10:38:06 2023 +0200

    EMPIREDB-410
    additional join overload
---
 .../src/main/java/org/apache/empire/db/DBCommand.java | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/empire-db/src/main/java/org/apache/empire/db/DBCommand.java 
b/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
index 1296ba67..5540fae6 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
@@ -705,6 +705,19 @@ public abstract class DBCommand extends DBCommandExpr
         return this;
     }
 
+    /**
+     * Adds a join to the list of join expressions.
+     * 
+     * @param join the join expression
+     * @param joinType the type of join
+     * @return itself (this) 
+     */
+    public final DBCommand join(DBJoinExpr join, DBJoinType joinType)
+    {
+        join.setType(joinType);
+        return join(join);
+    }
+
     /**
      * Adds a left join to the list of join expressions.
      * @param join the join expression
@@ -712,8 +725,7 @@ public abstract class DBCommand extends DBCommandExpr
      */
     public final DBCommand joinLeft(DBJoinExpr join)
     {
-        join.setType(DBJoinType.LEFT);
-        return join(join);
+        return join(join, DBJoinType.LEFT);
     }
 
     /**
@@ -723,8 +735,7 @@ public abstract class DBCommand extends DBCommandExpr
      */
     public final DBCommand joinRight(DBJoinExpr join)
     {
-        join.setType(DBJoinType.RIGHT);
-        return join(join);
+        return join(join, DBJoinType.RIGHT);
     }
 
     /**

Reply via email to