You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@empire-db.apache.org by ja...@glaubitz.org on 2016/09/13 05:46:56 UTC
DBColumnJoinExpr.and()
Hello,
I just noticed that DBColumnJoinExpr.and(...) returns DBJoinExp, not
DBColumnJoinExpr. Is this on purpose? DBCommand.join() returns
DBColumnJoinExpr.
You can't do:
cmd.join(A.ONE, B.ONE, DBJoinType.LEFT).and(A.TWO, B.TWO).and(A.THREE,
B.THREE) [...]
but have to do:
DBColumnJoinExpr j = new DBColumnJoinExpr(A.ONE, B.ONE, DBJoinType.LEFT);
j.and(A.TWO, B.TWO);
j.and(A.THREE, B.THREE);
cmd.join(j);
which is a little bit more clunky IMO.
What do you think? Should we change it?
- jan
Re: DBColumnJoinExpr.and()
Posted by Sascha Kraupa <sa...@gmail.com>.
Hello Jan,
i also noticed this problem a wile ago.
I think, if there is no good reason for this, it should be changed.
Sascha
2016-09-13 7:46 GMT+02:00 <ja...@glaubitz.org>:
> Hello,
>
> I just noticed that DBColumnJoinExpr.and(...) returns DBJoinExp, not
> DBColumnJoinExpr. Is this on purpose? DBCommand.join() returns
> DBColumnJoinExpr.
>
> You can't do:
>
> cmd.join(A.ONE, B.ONE, DBJoinType.LEFT).and(A.TWO, B.TWO).and(A.THREE,
> B.THREE) [...]
>
> but have to do:
>
> DBColumnJoinExpr j = new DBColumnJoinExpr(A.ONE, B.ONE, DBJoinType.LEFT);
> j.and(A.TWO, B.TWO);
> j.and(A.THREE, B.THREE);
> cmd.join(j);
>
> which is a little bit more clunky IMO.
>
> What do you think? Should we change it?
>
> - jan
>
>