Closed
Description
Hi,
Follow up on #995 with a separate issue. Attempting to use Expressions.just
to work around #995, I learned that SelectBuilder ignores Expressions.just
and "silently" generates invalid SQL. Consider the following code:
Table transport = Table.create("transport");
Table transportCall = Table.create("transport_call");
Select finalSelect = Select.builder().select(transportCall.asterisk())
.from(transportCall)
.join(transport).on(Expressions.just("bar")).equals(Expressions.just("foo"))
.build();
This generates the following invalid SQL:
SELECT transport_call.*
FROM transport_call
JOIN transport ON
Notice how everything after ON-clause is omitted. (If you add a .where(...)
then you will end up with JOIN transport ON WHERE ...
)