SheepDogInc/qbe — pull request #1 by bremac (2013-08-16 12:26:30+00:00)
Title: Hack in support for outer joins

This changeset adds support for outer joins. It takes some subtlety to do this - we now use inner joins instead of cross joins, and perform a join the first time we see a new table. Because joins in QBE are only from the model which defines the foreign key, this change also adds the ability to swap join order when new tables are joined in by joining either from or to an existing table.

The only issue now is that one could add a new table from the "models" menu, and reference it before joining on it. This would cause the join to fail. To work around this, we could preprocess the fields to make sure that joins occur before references to field. I'm a bit nervous about doing this right now because of the high complexity of the method.