bun icon indicating copy to clipboard operation
bun copied to clipboard

How to get bun to really use "INNER JOIN" instead of "LEFT JOIN".

Open oderwat opened this issue 4 years ago • 1 comments

I am evaluating bun for usage in one of my projects with an existing (MariaDB) database.

From the documentation I got this example:

image

It says it would use INNER JOIN instead of LEFT JOIN but It just uses LEFT JOIN with the IS NOT NULL clause. It will give the correct results but is it really expected to do it. If yes, I think the wording in the documentation needs to be "To simulate INNER JOIN instead of LEFT JOIN".

I also would like if I can force it to use INNER JOIN, especially if there is always a relation enforced in the database and everything else would be an error.

oderwat avatar Mar 05 '22 22:03 oderwat

If yes, I think the wording in the documentation needs to be "To simulate INNER JOIN instead of LEFT JOIN".

Your understanding is correct - I will update the docs.

I also would like if I can force it to use INNER JOIN

There is currently no way to do that. We discussed this previously, but could not find a nice way to support this.

vmihailenco avatar Mar 06 '22 12:03 vmihailenco